chore(app-emulation): remove unused patches

These have all been merged upstream.
This commit is contained in:
Brandon Philips 2014-06-06 15:28:13 -07:00
parent e4c3f52d6e
commit 3d33f2d023
3 changed files with 0 additions and 157 deletions

View File

@ -1,41 +0,0 @@
From b4ccd7cbfb5f2c7c4b6c963c4c12e41500e7ad55 Mon Sep 17 00:00:00 2001
From: Brandon Philips <brandon@ifup.co>
Date: Fri, 9 May 2014 18:05:54 -0700
Subject: [PATCH] fix(daemon): ensure the /var/lib/docker dir exists
The btrfs driver attempts to stat the /var/lib/docker directory to
ensure it exists. If it doesn't exist then it bails with an unhelpful
log line:
```
2014/05/10 00:51:30 no such file or directory
```
In 0.10 the directory was created but quickly digging through the logs I
can't tell what sort of re-ordering of code caused this regression.
Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
---
daemon/daemon.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/daemon/daemon.go b/daemon/daemon.go
index 00b6d9e..7901f8e 100644
--- a/daemon/daemon.go
+++ b/daemon/daemon.go
@@ -680,6 +680,12 @@ func NewDaemonFromDirectory(config *daemonconfig.Config, eng *engine.Engine) (*D
if !config.EnableSelinuxSupport {
selinux.SetDisabled()
}
+
+ // Create the root directory if it doesn't exists
+ if err := os.MkdirAll(config.Root, 0700); err != nil && !os.IsExist(err) {
+ return nil, err
+ }
+
// Set the default driver
graphdriver.DefaultDriver = config.GraphDriver
--
1.9.1

View File

@ -1,53 +0,0 @@
From 3905a076a6b387868cb337e49e198261849ef1e4 Mon Sep 17 00:00:00 2001
From: Brandon Philips <brandon@ifup.co>
Date: Fri, 28 Feb 2014 20:43:08 -0800
Subject: [PATCH] fix(api): serve until the "acceptconnections" job
This fixes a bug that I encountered when using socket activation with
docker 0.8.1. When running the first `docker run` it would return:
"create: command not found".
The root cause was the socket activation code path was starting to
listen before the "initserver" job had finished. This meant that the
"create" handler hand't been registered yet leading to the command not
found error.
In log format it looks like this:
```
[/var/lib/docker|9d2e78e9] +job initserver()
2014/03/01 04:05:35 Listening for HTTP on fd ()
[/var/lib/docker|0d71c177] +job create()
create: command not found
[/var/lib/docker|0d71c177] -job create()
[/var/lib/docker|0d71c177] +job acceptconnections()
[/var/lib/docker|0d71c177] -job initserver() = OK (0)
```
To fix the issue select on the activationLock and block until the
"acceptconnections" job has ran.
Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
---
api/api.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/api/api.go b/api/api.go
index 8d9bae9..981eb40 100644
--- a/api/api.go
+++ b/api/api.go
@@ -1127,6 +1127,11 @@ func ServeFd(addr string, handle http.Handler) error {
chErrors := make(chan error, len(ls))
+ // We don't want to start serving on these sockets until the
+ // "initserver" job has completed. Otherwise required handlers
+ // won't be ready.
+ <-activationLock
+
// Since ListenFD will return one or more sockets we have
// to create a go func to spawn off multiple serves
for i := range ls {
--
1.8.1.4

View File

@ -1,63 +0,0 @@
From 000a37fe9d13a173ab46fcd5b8e693950a438f98 Mon Sep 17 00:00:00 2001
From: Brandon Philips <brandon@ifup.co>
Date: Fri, 16 May 2014 15:01:25 -0700
Subject: [PATCH] fix(daemon): prepend host /etc/hosts instead of bind mounting
systemd systems do not require a /etc/hosts file exists since an nss
module is shipped that creates localhost implicitly. So, mounting
/etc/hosts can fail on these sorts of systems, as was reported on CoreOS
in issue #5812.
Instead of trying to bind mount just copy the hosts entries onto the
containers private /etc/hosts.
Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
---
daemon/container.go | 12 ++++++++++--
daemon/volumes.go | 5 ++++-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/daemon/container.go b/daemon/container.go
index 9ca94b2..54e720d 100644
--- a/daemon/container.go
+++ b/daemon/container.go
@@ -879,9 +879,17 @@ func (container *Container) initializeNetworking() error {
container.Config.Hostname = parts[0]
container.Config.Domainname = parts[1]
}
- container.HostsPath = "/etc/hosts"
- return container.buildHostnameFile()
+ content, err := ioutil.ReadFile("/etc/hosts")
+ if os.IsNotExist(err) {
+ return container.buildHostnameAndHostsFiles("")
+ }
+ if err != nil {
+ return err
+ }
+
+ container.HostsPath = path.Join(container.root, "hostname")
+ return ioutil.WriteFile(container.HostsPath, content, 0644)
} else if container.hostConfig.NetworkMode.IsContainer() {
// we need to get the hosts files from the container to join
nc, err := container.getNetworkedContainer()
diff --git a/daemon/volumes.go b/daemon/volumes.go
index eac743b..f96ce05 100644
--- a/daemon/volumes.go
+++ b/daemon/volumes.go
@@ -40,8 +40,11 @@ func setupMountsForContainer(container *Container) error {
{container.ResolvConfPath, "/etc/resolv.conf", false, true},
}
- if container.HostnamePath != "" && container.HostsPath != "" {
+ if container.HostnamePath != "" {
mounts = append(mounts, execdriver.Mount{container.HostnamePath, "/etc/hostname", false, true})
+ }
+
+ if container.HostsPath != "" {
mounts = append(mounts, execdriver.Mount{container.HostsPath, "/etc/hosts", false, true})
}
--
1.8.1.4