Commit Graph

3673 Commits

Author SHA1 Message Date
Vincent Demeester 6966df5de7 Validate hostname starting from 1.24 API.
In order to keep a little bit of "sanity" on the API side, validate
hostname only starting from v1.24 API version.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 6daf3d2a783fd042e870c8af8bbd19fc28989505)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:19 -07:00
Madhu Venugopal b6349ac163 Fixed a few network UI issues in swarm-mode
* Detect name conflicts on network creation
* Detect and prevent network connect/disconnect for managed containers

Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 0ce5158a2a9a3f10a62d3c1ea289c55e524cdac5)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:15 -07:00
Vincent Demeester bbc85af0bd Allow service and node filter to be name…
… on `docker node tasks` and `docker service tasks` commands.
This changes is mainly server-side (between engine api and
swarmkit). There is just a check in `api/client/service/tasks.go` to
handle the special *self* meaning.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit b0fc5a21f1138f48e0431a550c936e8908d72840)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:15 -07:00
Derek McGowan dd7fe47136 Treat digest only images as dangling
Add test for dangling digest images

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit 8906f8307c86ce59f51d2f1b750f5e698f3cf8a5)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:14 -07:00
allencloud 3eb83b5b2d fix typos
Signed-off-by: allencloud <allen.sun@daocloud.io>
(cherry picked from commit edc307cb9213d11d9c5911b08ebd921a097939c0)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:14 -07:00
Francis Chuang e54d291989 Fix a grammatical error in errClusterNetworkOnRun()'s error message.
Signed-off-by: Francis Chuang <francis.chuang@boostport.com>
(cherry picked from commit 1205a5584650388f36cda922556a31cbce827915)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:32:14 -07:00
Otto Kekäläinen 664c75ebba Fix spelling in comments, strings and documentation
Signed-off-by: Otto Kekäläinen <otto@seravo.fi>
(cherry picked from commit 644a7426cc31c338fedb6574d2b88d1cc2f43a08)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:42 -07:00
Brian Goff 855dc5ba79 Volume mounts need to use "Binds" API field
Swarm was putting volume type mounts into the container config's
"Volumes" field, but really these need to go into "Binds".
"Volumes" is only for normal "-v /foo" volumes, not named volumes or
anything else.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 2bc2165cbf3e949921d1659f09841b5f008f590d)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:23 -07:00
Sebastiaan van Stijn 67f4f5d2c4 rename desired_state filter to desired-state
For consistency with other filters (such as
"is-official"), this renames the desired_state
filter to "desired-state".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d761719eb4e45fbd6f092f6d0b4eb42206e298f6)
Signed-off-by: Tibor Vass <tibor@docker.com>
2016-07-08 15:31:22 -07:00
Tonis Tiigi f9f7abfffe Add support for external CAs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 11085b2260a78b3248f3e98e0a1e3203431fae22)
2016-07-01 00:40:37 -07:00
Tonis Tiigi 4905c858db Update to new swarmkit/engine-api
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 9b652738363d92fbe6e43b3981cdcc94bdb72c76)
2016-07-01 00:40:37 -07:00
Nishant Totla ae47b00c6c Adding a flag to specify sending of registry auth
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit 538bac39d7fe93562922b89e9a294096be48fb59)
2016-07-01 00:40:31 -07:00
Nishant Totla d199f78d18 Updating header name and executor
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit af5df117a805c8df661c7efa58c57680019b5752)
2016-07-01 00:39:51 -07:00
Nishant Totla c5ddd5bb7f Passing registry auth token for service create and update
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit 93ec5cda55e78dbb683b59bde244a7984b323574)
2016-07-01 00:39:51 -07:00
Akihiro Suda 4d4848ab68 zfs: call mount.MakePrivate
Fix #24008

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
(cherry picked from commit 5ec8441bb55ecbf83da6407a4135ce83b1fe01c7)
2016-06-30 17:12:45 -07:00
Alexander Morozov 90c272a4f2 daemon/logger: fix races in channel close
it's actually not okay to do such trick from multiple goroutines

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
(cherry picked from commit 378f0657f963fa6c854643571e4fe83628466c01)
2016-06-30 17:11:13 -07:00
Madhu Venugopal 3657275ca0 Added missing flags for swarm-mode networks
Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit cf78863e9dc4e3480a7d1059ed306bdfd81cd3dc)
2016-06-30 16:57:32 -07:00
Tonis Tiigi 1f4e2f33ef Fix race on clearing swarm nodes on stop
On stop there were multiple places that marked
`cluster.node` nil. Now stop waits for the node to
set itself nil.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 1a8a473017299c5e999d55d14634874826062fce)
2016-06-30 16:57:31 -07:00
Wonjun Kim bd572fcd8f Fix check code for --cluster-store and --cluster-advertise in config_unix.go
Signed-off-by: Wonjun Kim <wonjun.kim@navercorp.com>
(cherry picked from commit 4f671ae85e62d0b413f913b1289100ae7cc45972)
2016-06-30 16:57:21 -07:00
Derek McGowan 07bd7b0128 overlay2: close read end of pipe on mount exec
Use StdinPipe to ensure pipe is properly closed after startup

Fixes #23686

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit ad4b3e11fe41080d66ac1780b455246ae18bdc35)
2016-06-30 16:47:53 -07:00
Michael Crosby 795390b033 Change root_maxkeys
Most modern distros have the limit for the maximum root keys at 1000000
but some do not.  Because we are creating a new key for each container
we need to bump this up as the older distros are having this limit at
200.

Using 1000000 as the limit because that is that most distros are setting
this to now.  If someone has this value configured over that we do not
change it.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit ca3e4545aa7d0da3a36fef41d85d02e9f2c4d15d)
2016-06-30 16:47:52 -07:00
Kenfe-Mickael Laventure 7a5e247d01 Use "docker-runc" as alias for the default runtime
This also moves the variable holding the default runtime name from the
engine-api repository into docker repository

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 69af7d0d13670b8e2a03a38b4d9a849fc109b338)
2016-06-30 16:47:51 -07:00
Vincent Demeester 8084f80259 No need for container.Lock if rename same name
During the renaming of a container, no need to call `container.Lock()`
if `oldName == newName`.

This is a follow-up from #23360 (commit 88d1ee6c112d980a63c625389524047fea32e6d9)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
(cherry picked from commit 7e1ec8d2bd6d1aa77f824a1a4d717a7aa4cc3459)
2016-06-30 16:47:49 -07:00
Aaron Lehmann 77e3708bf7 Fix "sanbox" typos
Correcting "sanbox" to "sandbox".

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit fa04558ac10d70bcdd501f01a5090607db32cc3a)
2016-06-30 16:47:49 -07:00
allencloud f463560ead fix error message and typos in swarm cluster
Signed-off-by: allencloud <allen.sun@daocloud.io>

(cherry picked from commit 39bc10c36d40677c11a800b4346c5cddec2b997d)
2016-06-30 16:47:49 -07:00
Aaron Lehmann 72bb109a68 Remove log warning on task update
This warning appears in the course of normal use of swarm mode. Since
it's meant more as an internal TODO than something which should be
exposed to a user, remove the log message.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit 39c93cfb47783f2531ba44f062fd9a8b351d2224)
2016-06-30 16:47:48 -07:00
Tonis Tiigi 1fdce39622 Add better error messages for unavailable swarm commands
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 803733120a1f9f080c6403f2a3717987393f1f0d)
2016-06-30 16:47:48 -07:00
Sainath Grandhi eebd6ac4df docker rename fix to address the issue of renaming with the same name issue #23319
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
(cherry picked from commit 3e8c16ef6d5e6b451996722d99f5d646ed8a0e56)
2016-06-30 16:47:48 -07:00
Tonis Tiigi e546ffb37a Fix error reporting on executor wait
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit c895a76f1076c782011e9decf58ab6548cf0fb35)
2016-06-30 16:47:47 -07:00
Derek McGowan d99f4cc83d Fix overlay2 ignoring whiteout files
Currently when overlay creates a whiteout file then the overlay2 layer is archived,
the correct tar header will be created for the whiteout file, but the tar logic will then attempt to open the file causing a failure.
When tar encounters such failures the file is skipped and excluded for the archive, causing the whiteout to be ignored.
By skipping the copy of empty files, no open attempt will be made on whiteout files.

Fixes #23863

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit bd13c53f8dc1504c9e681dfabef2afc1685ccec7)
2016-06-30 16:47:46 -07:00
Tonis Tiigi 3d06cd4910 Unify swarm init and update options
Add api side validation and defaults for init and
join requests.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit fb3eb1c27ef5520571c599ead8a72b343748db39)
2016-06-30 16:47:44 -07:00
Stefan J. Wernli 8691607ade Fixing file handle leak for "docker logs"
If "docker logs" was used on an offline container, the logger is leaked, leaving it up to the finalizer to close the file handle, which could block removal of the container.  Further, the json file logger could leak an open handle if the logs are read without follow due to an early return without a close.  This change addresses both cases.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
(cherry picked from commit 54f11b84d218c1a7ff4ab4e2148819265da213bc)
2016-06-30 16:47:44 -07:00
bin liu 6a5a150722 fix some typos
Signed-off-by: bin liu <liubin0329@gmail.com>
(cherry picked from commit 950073aabb305db6156709ea8509b1f72ff06f3b)
2016-06-30 16:47:43 -07:00
nick 62d50a3f13 Fix misspell typos
Signed-off-by: nick <nicholasrusso@icloud.com>
(cherry picked from commit 7135afa79b4d99ba2a214fcc1c2decf95f850c2f)
2016-06-30 16:47:43 -07:00
Kenfe-Mickael Laventure df987c84de Fix missing container runtime on upgrade
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit d7ceda4e375250e6868854cca96c49a369503745)
2016-06-30 16:47:41 -07:00
Lei Jitang c51fced060 Fix link doesn't work sometimes when container start with multiple networks
If there is multiple networks to connect to on container starting,
the order of these networks is random because we "range a map". But
the defautl network "bridge" should be connected first since only
"bridge" support link and we should have do some settings on sandbox
creation, and only the first connect will setting the sandbox.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 57c0a653e3d0055e63db399019b3b16d4ac97004)
2016-06-30 16:47:40 -07:00
Derek McGowan 611bbed2df Update rmi logic for canonical references
Updates the rmi code to treat canonical references as related to tagged references from the same repository during deletion.
Canonical references with a different repository name will be treated as separate references.
Updates the remove by ID logic to still remove an image if there is a single tag reference and only canonical references to the same repository remaining.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
(cherry picked from commit a281be1c11d61deed7cb2853125e6d489f16aa2e)
2016-06-30 16:47:39 -07:00
Tonis Tiigi 8a994d4724 Don’t try to restore swarm from incomplete state
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit ded1d9af38cb467dadab0521936174eef0d4bc9e)
2016-06-30 16:47:37 -07:00
Jana Radhakrishnan 0728f28cbe Vendoring swarmkit @3f135f206179e
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
(cherry picked from commit 64a567d24c147379dc79b54cf2140c4e7905c022)
2016-06-18 20:58:24 -07:00
tomwbarlow@gmail.com 9e1d592de3 Change log.printf service creation msg to debug
Signed-off-by: tomwbarlow@gmail.com <tomwbarlow@gmail.com>
(cherry picked from commit eed8d14ed16846f926e2d139e8232fbc2d4641e4)
2016-06-18 20:58:24 -07:00
Jana Radhakrishnan 8fdc925338 Check if DriverState is valid before using in convert
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
(cherry picked from commit 4fea81154b817b09e553308a1595bfd97a8c0582)
2016-06-17 13:09:12 -07:00
Tonis Tiigi efc10a92ef Fix removing containers on leaving from pending state
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 826f6f07031abc4dea6f71ed69d33a4e0789ee11)
2016-06-16 23:36:58 -07:00
Tonis Tiigi 0cac3c4c23 Return membership status on join without timeout
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 1973cee0cd86da3c7b7002a3fed7af2557df538c)
2016-06-16 23:36:57 -07:00
Tonis Tiigi 01c5b208e8 Update daemon to new swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit a83bba467a8bd24924b1a0cf55b954ac49937b5b)
2016-06-16 23:36:57 -07:00
Sebastiaan van Stijn b3387e96ed fix "overlay" -> "overlay2" in error message
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 2d4b285a75621604f31058a43cb5ef1d4618533e)
2016-06-16 23:36:57 -07:00
Lei Jitang 83fbaa3cb4 Fix restore active sandbox
we store the active sandbox after daemon.containerd.Restore, but there
is a chance the `Restore` will set the container to exit see
(https://github.com/docker/docker/blob/master/libcontainerd/client_linux.go#L469).
so we should check if the container is really running before add it to
activesandbox.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
(cherry picked from commit 78f3094518b1f3f498bd2629667877f9a87d452f)
2016-06-16 23:36:56 -07:00
Kai Qiang Wu(Kennan) 82453c84ba Add ecryptfs check for overlay2
We added docs about ecryptfs check but not in code side.
Also refactor code to make it clean.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
(cherry picked from commit 136323b04315eceffbed61d680878ed23cecc015)
2016-06-16 23:36:55 -07:00
Sainath Grandhi 1e5ee1dd37 Fixes #23596-returns empty string for NetworkID in response to /containers/json
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
(cherry picked from commit ad85d299066e87cd40afc43ffee8cb73dcc79eb4)
2016-06-16 23:36:55 -07:00
Victor Vieux 7f4bca0f90 use same hash for same secret
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit a579ce8ed307024ededd527819bfdbf38e970fbf)
2016-06-16 23:36:55 -07:00
Victor Vieux 7cc76facba fix docker swarm init/update --secret
Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit 085895342c7f797f0eef7ec956438e33489f211f)
2016-06-16 23:36:54 -07:00