Commit Graph

709 Commits

Author SHA1 Message Date
Justin Cormack
8a5d7ecadf Fix directories under /var after formatting
- /var/lock test
- add /var/cache subdirectories
- move old boot2docker directories

fix #801
fix #792

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-28 16:12:51 +00:00
Justin Cormack
9dd0b21f61 Use the upstream binfmt script not out custom one
This makes the binfmt package much simpler, just a config file.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-28 13:53:14 +00:00
Justin Cormack
0a4b71edbe Use the procfs script to mount binfmt
This means our script does not need to do mount.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-28 12:17:23 +00:00
David Scott
79f8a87569 Fix filesystem resize by calling e2fsck -f first
Previously when the block device was resized the partition table was also
resized but the filesystem was not. For an increase from 64GiB to 128GiB
the console showed:

     * Configuring host block device .../dev/vda1: clean, 62/4194304 files, 604445/16776960 blocks
    Resizing disk partition: Unpartitioned space /dev/vda: 64 GiB, 68719476736 bytes, 134217728 sectors
    resize2fs 1.43.3 (04-Sep-2016)
    Please run 'e2fsck -f /dev/vda1' first.

    /dev/vda1: clean, 62/4194304 files, 604445/16776960 blocks

This patch makes `resize2fs` happy by running `e2fsck -f` beforehand as
requested.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-11-28 11:32:12 +00:00
Justin Cormack
997550c1a2 Remove last references to EXPERIMENTAL
Only support 1.13 now, experimental is a runtime flag.

see #647

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-24 13:37:07 +00:00
Justin Cormack
28baa22239 Use daemon version in diagnostics
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-24 12:23:27 +00:00
Justin Cormack
32253f83da Update to Docker 1.13.0-rc2
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-23 21:40:23 +00:00
Justin Cormack
545b12ee7d Explicitly use slirp-proxy in iptables
So as to allow a read only root filesystem, we use the proxy
path config option to override the Docker proxy for 1.13.

This means that the iptables override needs to call this binary
not the original docker-proxy binary to allow port forwarding.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-23 13:48:27 +00:00
Justin Cormack
a95ada36a2 Do not create swap file if the disk is small
- on very small disks, eg CI, do not create a swap file.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-23 11:25:19 +00:00
Justin Cormack
cd5b2a8f98 Resize device if there is free space
If the block device has unused free space, extend the filesystem on it.

Fix #120

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-22 21:59:53 +00:00
Justin Cormack
841bbf2d17 Merge pull request #774 from nathanleclaire/azure_init_beta12
Azure init beta12
2016-11-21 23:54:17 +00:00
Nathan LeClaire
b51d28e734 Include version and daemon.json in Azure init script
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2016-11-21 15:43:19 -08:00
Justin Cormack
3f2eb7630e fix typo making swap file
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-21 23:02:44 +00:00
Justin Cormack
59353f78c0 Update Docker init script for 1.13
- never update root filesystem see #583
- remove tests for earlier docker versions
- only use iptables override on desktop

fix #753

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-21 21:15:24 +00:00
Justin Cormack
8c19491820 Merge pull request #764 from justincormack/extend
Simplify file system format code
2016-11-21 19:53:43 +00:00
Justin Cormack
7730fa15ca Simplify file system format code
- use our own code rather than Alpine setup-disk
- remove alpine setup code as not needed
- do not create swap partitions
- create swap file on desktop editions for now (may remove)

Fix #619

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-21 18:35:13 +00:00
Justin Cormack
380e760779 Merge pull request #702 from justincormack/syslog
Syslog support for docker logs
2016-11-21 17:47:31 +00:00
Justin Cormack
41caff5065 update c build base image
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-18 23:32:47 +00:00
Justin Cormack
f69f9a3427 Use syslog local0 for docker logs
This allows log rotation, redirect via syslog etc.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-18 16:23:41 +00:00
Justin Cormack
c05ba1397e Update check-config for Linux 4.8
Temporarily using unmerged version until upstream.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-18 11:50:36 +00:00
Justin Cormack
2759c51105 Merge pull request #743 from justincormack/no-bind-log
Do not try to bind mount logs onto host on osx
2016-11-18 10:43:50 +00:00
Justin Cormack
2e4ee1a73f Default to experimental if not specified in daemon.json
Most editions were shipping with experimental; now it is a daemon
flag this seems the best behaviour.

Only do this on recent dockerd as we are still supporting 1.12 for
a while longer.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-17 20:46:44 +00:00
Justin Cormack
d45bf3d89b upgrade Docker to 1.13.0-rc1
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-16 16:48:26 +00:00
Justin Cormack
66c03d8cd5 Do not try to bind mount logs onto host on osx
This is not working well, and was binding over the logs, and losing
logs. We need a uniform approach on all platforms, planned to be
syslog.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-16 16:08:03 +00:00
Justin Cormack
3fe2457e9e Merge pull request #738 from ijc25/master
diagnostics: Collect networking and swarm node + service info
2016-11-16 15:57:33 +00:00
Justin Cormack
32020f01f6 always wait for vsudd pidfile
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-16 13:07:32 +00:00
Ian Campbell
f8eca9f52e diagnostics: Collect networking and swarm node + service info
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-11-15 17:21:03 +00:00
Justin Cormack
06c4325294 Merge pull request #734 from justincormack/diagnostic-fixes
Fixes to diagnostics
2016-11-15 11:53:10 +00:00
Justin Cormack
b646642194 Fixes and improvements to diagnostics
- We now only have nslookup not dig.
- Use curl not wget.
- add /proc/cpuinfo

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-15 11:45:29 +00:00
Ian Campbell
b4db1822e4 diagnostics: Collect "docker version"
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-11-15 11:35:12 +00:00
Ian Campbell
dea80af9b1 diagnostics: Collect "docker info"
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-11-15 11:33:25 +00:00
Justin Cormack
23415c038b Rework moving automount earlier in boot sequence
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-15 09:54:07 +00:00
Justin Cormack
49511ba5ba vsudd needs bootmisc too for /run symlink
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-15 00:19:21 +00:00
Justin Cormack
300ded1ed9 add additional directories on newly created /var
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-14 23:15:46 +00:00
Justin Cormack
fc6585df75 Correctly handle return codes of fsck
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-14 22:14:25 +00:00
Justin Cormack
bd800943d9 Fix /run symlink issues
- run bootmisc before sysklogd so symlinks from /var/run to
  /run are created
- recreate symlinks that bootmisc created when we remount /var
  until this gets moved earlier

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-14 22:00:12 +00:00
Justin Cormack
9d81e2efef Always start vsudd before syslog
If we are using vsudd to forward syslog to the host, as on osx,
we need to start it before syslog starts, and make sure it has
created its socket.

Add a pidfile to vsudd to make startup more reliable.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-14 17:08:37 +00:00
Justin Cormack
49aee29e9c Merge pull request #718 from justincormack/diagnose-test
Make diagnostics program return exit code
2016-11-14 11:38:42 +00:00
Justin Cormack
a494a39142 Make diagnostics program return exit code
Add running diagnostics to test script.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-14 11:30:09 +00:00
Justin Cormack
b356364777 remove completion directory from newer docker downloads
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-14 11:00:28 +00:00
Justin Cormack
b042b5127f Revert "Format filesystems earlier, before syslog"
This reverts commit 4dd5dca106.

Fix #710 where system hangs after klogd startup on AWS. Possibly
also affects Windows too. Still unclear why but lets revert and
continue investif=gating.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-12 15:29:27 +00:00
Justin Cormack
9a95224681 Format filesystems earlier, before syslog
So that we can write to /var early, move filesystem formatting as early as possible.

Adds a dummy fsck service, as we already do fsck in format script.

Replaces #535

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-08 15:20:46 +00:00
Justin Cormack
a7d223768c Improve matching of mounted drive in diagnostics
Was failing on AWS as drive did not match patter that was too precise.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-04 14:09:12 +00:00
Justin Cormack
95b62daa5a Update check-config script
Now returns error if checks do not pass.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-04 09:40:15 +00:00
Justin Cormack
9512b2fa84 Merge pull request #672 from justincormack/configup
Update check-config script
2016-11-02 21:11:36 +00:00
Justin Cormack
1d71d7c3e1 Update check-config script
Now misses the ext3 error messages.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-02 20:05:48 +00:00
Justin Cormack
fed22cee00 Split out Windows network config from hostsettings
On cloud editions eg AWS settings may come from the network, so
we need to move this to after network setup, while the Windows
network config changes need to happen before, so split the init script.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-02 14:49:24 +00:00
Justin Cormack
9b58a9921b Merge pull request #663 from justincormack/curl-fail
make curl fail on 404
2016-11-01 19:55:55 +00:00
Justin Cormack
72d1aef471 fsck filesystem before mount
Use fsck -p to fix errors that are fixable.

Note this will recreate the filesystem on fatal errors.

Fix #665

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-01 16:01:08 +00:00
Justin Cormack
50a64ac6c4 make curl fail on 404
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-01 13:58:02 +00:00