Commit Graph

517 Commits

Author SHA1 Message Date
David Scott
a8fc95eb9d proxy: on exit, return to main for cleanup
Previously the proxy.go would directly call `os.Exit`. This patch
causes control to return to `main` where we can tear down any port
forward.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-04 12:41:02 +01:00
David Scott
444a6147d9 proxy: split the execProxy function into parts
Previously `execProxy` would
- create the proxy
- signal success/failure to the parent
- run forever (until signalled)

Since we want to add more proxy setup and teardown, this patch
removes the proxy creation from `execProxy` and renames it to
`proxyForever`. Later patches will be able to perform the necessary
side-effects before signalling success to the parent.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-04 12:41:02 +01:00
David Scott
e1b8975016 Import docker/libnetwork/portmapper/proxy.go
Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-04 12:41:02 +01:00
David Scott
dc9b79f116 Add skeleton /sbin/proxy program
This will eventually contain the `docker-proxy` replacement.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-04 12:41:02 +01:00
Justin Cormack
f4a21e4d1f make tar more correct, by defining z
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-04 12:20:18 +01:00
Justin Cormack
b58f06212d fix typo in tar extract
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-04 12:13:45 +01:00
Justin Cormack
4b0c50a779 Remove docker-x for now as no longer working, and was not possible to enable. Will rework when strategy for supporting multiple dockers decided
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-04 11:47:48 +01:00
Justin Cormack
249151a445 Increase p and n ulimits to match boot2docker, fixes #64
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-04 11:44:27 +01:00
Justin Cormack
fac0264ecf clean up unpacking docker rc3 bundle
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-03 09:34:01 +01:00
Justin Cormack
89c6c66c19 Merge pull request #63 from djs55/diagnostics-server
Make the diagnostics download more reliable
2016-04-02 22:34:15 +01:00
David Scott
48a3916095 diagnostics: apply a timeout to all commands
This should avoid unnecessary blocking if (for example) the network is
down.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-02 13:55:36 +01:00
David Scott
911a1e2bd7 diagnostics: run iptables-save
This is more complete than `iptables -t nat -L`

Signed-off-by: David Scott <dave.scott@docker.com>
2016-04-02 13:55:36 +01:00
Justin Cormack
1e0778657c update to docker 1.11.0-rc3
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-04-02 09:12:20 +01:00
Justin Cormack
e891d65e97 Support for 1.11.0-rc2, fix #57
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-31 18:54:05 +01:00
Justin Cormack
5551e60fd1 check diagnostics server running in diagnostics
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-31 14:58:13 +01:00
Justin Cormack
ad8e6c39e7 Merge pull request #59 from djs55/diagnostics-server
Allow diagnostics to be downloaded on port 62374
2016-03-31 12:16:00 +01:00
David Scott
a163c06ba0 diagnose: include iptables -t nat -L
The extra `-t nat` includes the masquerading stuff.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-03-31 11:14:31 +01:00
David Scott
b10af0dc92 diagnostics: use netstat -tulpn which includes process names
For example:

  docker:~# netstat -tulpn
  Active Internet connections (only servers)
  Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
  tcp        0      0 :::32768                :::*                    LISTEN      1344/docker-proxy
  tcp        0      0 :::2375                 :::*                    LISTEN      1124/docker
  tcp        0      0 :::5000                 :::*                    LISTEN      1444/docker-proxy
  tcp        0      0 :::5001                 :::*                    LISTEN      1494/docker-proxy

Signed-off-by: David Scott <dave.scott@docker.com>
2016-03-31 10:35:35 +01:00
Justin Cormack
e5c3789caa update to 4.1.20
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-30 17:02:22 +01:00
David Scott
5a4cc0a779 diagnose: grab the tail /var/log/docker.log
Signed-off-by: David Scott <dave.scott@docker.com>
2016-03-30 15:42:48 +01:00
Justin Cormack
7cb194459b simplified vendoring
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-30 15:08:32 +01:00
David Scott
673b44cf95 diagnose: put all the files inside a moby/ subdirectory
Signed-off-by: David Scott <dave@recoil.org>
2016-03-30 15:03:28 +01:00
David Scott
2461710f7d diagnose: ls -l /var, /var/lib and /var/lib/docker
Signed-off-by: David Scott <dave.scott@docker.com>
2016-03-30 14:28:00 +01:00
David Scott
4bd38ce8bf diagnose: try a ping, grab /etc/resolv.conf and route -n
Signed-off-by: David Scott <dave.scott@docker.com>
2016-03-30 14:25:58 +01:00
David Scott
d402a579f5 diagnostics-server: add more diagnostics
For networking:
- ifconfig -a
- brctl show

For storage:
- mount
- df

Signed-off-by: David Scott <dave@recoil.org>
2016-03-30 10:34:04 +01:00
David Scott
d842e1b5dc Allow diagnostics to be downloaded on port 62374
A client like `pinata diagnose` can do the equivalent of:

  nc 192.168.64.2 62374 > foo.tar

and find `foo.tar` contains

- the output of `/usr/bin/diagnostics`
- `iptables -L`
- `netstat -an`
- `ps uax`
- `docker ps`
- `dig docker.com`
- `wget http://docker.com`

This will allow us to diagnose various in-VM faults, without having
to ask the user to access the console and run commands.

Signed-off-by: David Scott <dave.scott@docker.com>
2016-03-30 10:31:55 +01:00
Justin Cormack
6d890f007b switch root to a tmpfs filesystem, so pivot_root works, should make #57 work now
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-29 22:09:23 +01:00
Justin Cormack
8b14968e16 fix some pedantic xhyve build issues with newer toolchain
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-29 18:46:20 +01:00
Justin Cormack
6b00a34abc add --rm for transfused
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-29 18:31:55 +01:00
Justin Cormack
394ee652a4 Merge pull request #58 from yallop/free-con
Transfused: free connection objects when read returns 0.
2016-03-29 16:54:13 +01:00
Jeremy Yallop
d521bcfcd9 Transfused: free connection objects when read returns 0. 2016-03-29 16:37:51 +01:00
Justin Cormack
e5716a634b No need to add git to golang:alpine now we have vendored all code
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-28 22:12:51 +01:00
Justin Cormack
f51deb84d4 use build-base not alpine-sdk as smaller and we do not need rest
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-28 18:18:48 +01:00
Justin Cormack
9ff6413077 remove all uses of go get as everything vendored in #56
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-23 12:24:21 +00:00
Justin Cormack
82ea2a6404 fix #56 by vendoring mdns libraries
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-23 12:19:01 +00:00
Justin Cormack
a5e06cf3b3 add make vendor for #56
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-23 12:18:19 +00:00
Justin Cormack
f555595664 add Makefile for licensing container
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-22 11:58:16 +00:00
Justin Cormack
3917e918c4 include all source not just GPL
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-22 11:23:55 +00:00
Justin Cormack
1a9ae94017 include aufs in GPL download container
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-21 11:51:08 +00:00
Justin Cormack
6832d7c99b add kernel source, fix subpackages
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-21 11:31:48 +00:00
David Sheets
67d7eb301f Merge pull request #55 from dsheets/transfused-events
transfused: add chmod event syscall
2016-03-20 22:02:47 +00:00
David Sheets
b8660ad77b transfused: add chmod event syscall
Signed-off-by: David Sheets <dsheets@docker.com>
2016-03-20 22:01:22 +00:00
David Sheets
36f9eac695 Merge pull request #54 from dsheets/transfused-events
transfused: work-around 9p bug, fix logging bugs
2016-03-20 12:26:19 +00:00
David Sheets
7861ecc474 transfused: create threads already detached
Signed-off-by: David Sheets <david.sheets@docker.com>
2016-03-20 11:20:00 +00:00
David Sheets
f7f3690453 transfused: move logging off of the event actuation thread
Signed-off-by: David Sheets <david.sheets@docker.com>
2016-03-20 11:08:57 +00:00
David Sheets
f358faf440 transfused: fix run-time log non-append bug
Signed-off-by: David Sheets <david.sheets@docker.com>
2016-03-20 11:04:01 +00:00
David Sheets
56215fc7da transfused: work-around virtio-9p/v9fs zero-copy bug
Signed-off-by: David Sheets <david.sheets@docker.com>
2016-03-20 11:03:24 +00:00
Justin Cormack
16f296a247 initial program to extract GPL source from running Moby for #45
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-18 15:19:56 +00:00
Justin Cormack
af7777c832 store source info for kernel and kernel patches in image for #45
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-03-18 13:53:26 +00:00
Justin Cormack
9254ff8c7a Merge pull request #48 from dsheets/transfused-events
transfused: change protocol to support events, add syslog logging
2016-03-18 11:42:48 +00:00