Commit Graph

8491 Commits

Author SHA1 Message Date
Justin Cormack
e92dd7d58e Merge pull request #105 from ijc25/drop-nc-vsock
Stop including nc-vsock in the initrd
2016-04-21 10:21:45 +01:00
Ian Campbell
cf491f05cc Stop including nc-vsock in the initrd
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-04-21 10:09:34 +01:00
Dave Scott
85d42d5c03 Merge pull request #102 from djs55/flip-nics
In a dual NIC config, ensure we use the same NIC for both routing and DNS
2016-04-18 19:08:50 +01:00
David Scott
3ee0d40dd2 Revert "mdnstool: add support for a "hybrid" network mode"
This reverts commit 67205f62d9.
2016-04-18 18:47:49 +01:00
David Scott
47ff9eb817 In a dual NIC configuration, use eth1 for routing
The NIC with the lowest metric is used for routing, while the NIC with
the highest index is used for DNS. Set the metric of eth1 to 199, so it
is higher-priority than eth0, so we use eth1 for everything in a dual
NIC configuration.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-18 18:45:32 +01:00
Justin Cormack
79e0a65f87 remove extra copy of docker that build adds
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-18 16:48:37 +01:00
Justin Cormack
18745f6b76 fix arm build see #101 #96
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-18 11:34:14 +01:00
Justin Cormack
034fc7a5be use (old) binary build of docker arm for now as no cross build yet
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-18 11:17:32 +01:00
Justin Cormack
35b8324179 vsock support not building on arm see #96 #101
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-18 11:09:28 +01:00
Justin Cormack
a509a329f1 fix arm FROM
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-18 11:01:03 +01:00
Justin Cormack
6621512ed6 fix arm kernel build see #96
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-18 10:46:57 +01:00
Dave Scott
51576d7564 Merge pull request #100 from djs55/multiple-nics
Support 1 or 2 NICs
2016-04-17 20:53:48 +01:00
Justin Cormack
0091f8fc92 Merge pull request #97 from docker/win-dev
Merge EFI ISO build
2016-04-16 19:53:06 +01:00
David Scott
1477dee600 mdnstool: add support for a "hybrid" network mode
Normally we advertise $(hostname).local. by MDNS on eth0. If the new
"hybrid" networking mode is configured, we will use 2 NICs and eth1
will be connected via vmnet, and so we should run MDNS on it.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-16 19:35:18 +01:00
David Scott
6ca504f192 Configure a second possible NIC (eth1)
This makes it possible to have one NIC controlled by vmnet and another
controlled by slirp.

If eth1 doesn't exist then a harmless message is generated during
bootup: (with no appreciable delay)

 * Starting networking ... *   lo ... [ ok ]
 *   eth0 ... [ ok ]
 *   eth1 ...ip: ioctl 0x8913 failed: No such device
 [ !! ]

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-16 19:31:32 +01:00
David Sheets
0281e1999a Merge pull request #99 from dsheets/transfused-logging
transfused: make sure to flush the logging socket when we die
2016-04-16 18:59:22 +01:00
David Sheets
1113c21644 transfused: make sure to flush the logging socket when we die
Signed-off-by: David Sheets <dsheets@docker.com>
2016-04-16 18:54:48 +01:00
David Sheets
fc163942a5 Merge pull request #98 from dsheets/transfused-logging
transfused: push log messages over control channel if available
2016-04-16 18:12:22 +01:00
Rolf Neugebauer
f785d0d448 moby: add support for building EFI bootable Moby images
Wrap a EFI stub loader with vmlinuz, initrd, and a short commandline
inside a single EFI binary.

Two files are generated:
- mobylinux.efi is a raw EFI file which some hypervisors can boot directly
- mobylinux-efi.iso: ISO image with just MobyLinux in the EFI partition

also:
- rename legacy BIOS mobylinux.iso to mobylinux-bios.iso
- Build mobylinux-efi.iso as part of the standard mobylinux build

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-04-16 16:38:45 +01:00
Dave Scott
3e734a4edc Merge pull request #94 from djs55/diagnostics-vsock
diagnostics: bind also on a vsock port
2016-04-16 13:44:39 +01:00
Dave Scott
b2abc289ef Merge pull request #89 from djs55/proxy-vsock
Switch the port forwarding docker-proxy replacement to vsock
2016-04-16 13:44:28 +01:00
Rolf Neugebauer
3ddc98d1b6 moby: add a cut-down version of gummiboot
The gummiboot EFI stub is used for creting a EFI bootable ISO

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-04-16 12:50:37 +01:00
David Scott
b3f82f045a proxy: vendor github.com/djs55/vsock
Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:43:10 +01:00
David Scott
9100625204 proxy: move vendor/libproxy to ./libproxy
vendor should be used for things with fully-qualified names,

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:29:23 +01:00
David Scott
a48307b5e7 proxy: calling Close() on the Accept()ing fd won't cause it to return
This seems to be a difference between the AF_VSOCK and AF_INET
implementations. We work around it by exiting the proxy process
immediately, which will clean up resources anyway.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
David Scott
586d9c0598 proxy: fix up the vsock interface
- don't try to create a `FileConn` because the Go library sees through
  the scam and rejects it
- explicitly keep a reference to the `ctl` file just in case the GC
  decides its dead and should be closed.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
David Scott
1d3b8b566e proxy: tell the /port server the real external IP address
Before this we accidentally told it the vsock address, which obviously
isn't much good.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
David Scott
b0c4fdae37 proxy: we don't need to explicitly unexposePort any more
The port will be automatically removed when the fd/fid is closed by
a process exit/crash, or by a hypervisor crash.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
David Scott
e4f405be26 proxy: request a vsock connection rather than a TCP/IP one
Note this means we don't need to figure out our local IP address.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
David Scott
403ce4e696 proxy: libproxy: add a case for VsockAddr types
The `NewProxy` function already knows how to deal with `net.UDPAddr`
and `net.TCPAddr`, this patch adds similar support for `vsock.VsockAddr`.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
David Scott
2f80e98e7f proxy: vsock connections support CloseRead and CloseWrite
This patch adds a wrapper around the `net.Conn` to include the
`CloseRead` and `CloseWrite` implementations. This patch also
exposes the `VsockAddr` type, which is similar to `TCPAddr` and
`UDPAddr`.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
David Scott
3c68728e9f proxy: remove assumption that frontend is a TCPListener
We require the frontend to be a `net.Listener` and the `net.Conn`
connection which are established must be type-switched to
`Conn` to support the `CloseRead` and `CloseWrite` methods.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
David Scott
2cf9295602 proxy: TCPProxy connects to TCP but can read from other things
The TCPProxy can proxy from anything which satisfies this interface:

type Conn interface {
  	io.Reader
	io.Writer
	io.Closer
	CloseRead() error
	CloseWrite() error
}

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
David Scott
90b1734a52 proxy: add a vsock package based on vsudd
This package supports a more normal Go interface, in particular it has:

  // Listen returns a net.Listener which can accept connections on the given
  // vhan port.
  func Listen(port uint) (net.Listener, error)

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
David Scott
fb89526498 proxy: simply the Dockerfile by shuffling code under vendor/
Note there is a slight name clash between the final binary 'proxy'
and the library formerly known as 'proxy'. Resolve this by calling
the library 'libproxy'.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:24:56 +01:00
Justin Cormack
0c7ee6675b need not needs
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-15 17:24:53 +01:00
David Sheets
fe91be997d transfused: push log messages over control channel if available
Also, remove self-logging and triggers.

Signed-off-by: David Sheets <dsheets@docker.com>
2016-04-15 17:11:38 +01:00
David Scott
184fa38903 diagnostics: listen on both TCP/IP and vsock ports
The TCP/IP port will be used by Windows, while Mac can use the vsock
one.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:07:52 +01:00
David Scott
15b772d496 diagnostics: vendor the vsock package
Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 17:07:22 +01:00
Justin Cormack
6f752b8d61 fix #91 util-linux switch_root errors out, force use of busybox
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-15 16:43:36 +01:00
Justin Cormack
6ca8b4670c Merge pull request #93 from rneugeba/winupstream
hvtools: Enable CIFS mount/unmount via KVP writes
2016-04-15 16:37:41 +01:00
Rolf Neugebauer
6c6c156eef hvtools: Enable CIFS mount/unmount via KVP writes
- Trigger a CIFS mount by writing to the "cifsmount" key.
- The value has the format: <mountpoint>;<alias mountpoint>;<options>
  with <options> containing username, password and optional domain
- The key is not stored in the KV store (aka the 'registry')

- Trigger an unmount by writing to the cifsumount" key.
- The value has the format: <mountpoint>;<alias mountpoint>

- The 'registry' is also wiped on reboot

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-04-15 16:32:32 +01:00
Justin Cormack
115373d42e Merge pull request #92 from djs55/go-diagnostics
moby: rewrite diagnostics server in Go
2016-04-15 16:17:08 +01:00
David Scott
4802911c8f moby: rewrite diagnostics server in Go
This will make it easier to add a vsock interface as well as a regular
TCP/IP one.

As a side-effect, the server is now able to handle more than one concurrent
request!

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-15 16:09:54 +01:00
Justin Cormack
8eaf2976b8 Merge pull request #90 from rneugeba/winupstream
Winupstream
2016-04-15 15:49:24 +01:00
Rolf Neugebauer
65cdbdb0c4 license: extract hvtools/llmnrd source code from the initrd
Also add modified chronyd init script

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-04-15 15:10:29 +01:00
Rolf Neugebauer
fba8a986b9 alpine: create source tarballs for hvtools and llmnrd
Add them to the initrd under /usr/share/src

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-04-15 15:10:29 +01:00
Rolf Neugebauer
0ae60c99ff iso: use ubuntu instead of debian to reduce the number of base images
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-04-15 15:10:28 +01:00
Rolf Neugebauer
e953d12e4e shutdown: use poweroff -f instead of halt -f
This is makes fast shutdown work on Hyper-V

While at it, also clean up whitespaces. The file was mixed
tabs and spaces. Now it uses spaces.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-04-15 15:10:28 +01:00
Rolf Neugebauer
8d5dd9308e mdns: re-enable mDNS when running on Hyper-V
If bonjour is installed on the host, e.g. via iTunes or some other
program, a lookup for `docker.local` works just like on the Mac.

Just like with LLMNR there seems to be a 4-5 second delay before
Windows decides to do a multicast namelook up, though

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2016-04-15 15:10:28 +01:00