Commit Graph

18629 Commits

Author SHA1 Message Date
Sally O'Malley a2bc804936 add clarity/fix typos man/docker-build
add needed clarity for
1)  using STDIN to pass build context
2)  --cpu-shares flag use

also a few typos

Signed-off-by: Sally O'Malley <somalley@redhat.com>
2015-10-09 13:57:13 -04:00
Vincent Demeester 77da5d8feb Merge pull request #16076 from vbatts/export_image_times
graph: exported images times matching creation
2015-10-01 21:50:43 +01:00
Vincent Batts e4478caddf save: integration test for timestamp matching
The `docker save`ed output ought to have matching timestamp to the layer
creation.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-10-01 14:38:55 -04:00
Alexander Morozov 99d13e7e14 Merge pull request #16698 from rhvgoyal/drop-redundant-lock
devmapper: Drop redundant lock and redundant function
2015-10-01 10:48:03 -07:00
Jess Frazelle b26bcfe9be Merge pull request #16687 from jfrazelle/update-man8
ignore man8
2015-10-01 10:23:56 -07:00
Jessica Frazelle cf8688c235
ignore man8
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-01 10:05:51 -07:00
Vivek Goyal 289145ecc6 devmapper: Get rid of metaData.devicesLock
Right now we seem to have 3 locks. 

- devinfo.lock
  This is a per device lock

- metaData.devicesLock

  This is supposedely protecting map of devices.

- Global DeviceSet lock

  This is protecting map of devices as well as serializing calls to libdevmapper.

Semantics of per devices lock and global deviceset lock seem to be very clear.
Even ordering between these two locks has been defined properly.

What is not clear is the need and ordering of metaData.devicesLock. Looks like
this lock is not necessary and global DeviceSet lock should be used to
protect map of devices as it is part of DeviceSet.

This patchset gets rid of metaData.devicesLock and instead uses DeviceSet
lock to protect map of devices.

Also at couple of places during initialization takes devices.Lock(). That
is not strictly necessary as there is supposed to be one thread of execution
during initializaiton. Still it makes the code clearer.

I think this makes code more clear and easier to understand and easier to
make further changes.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-10-01 13:02:55 -04:00
Vivek Goyal 73f8b46d84 devmapper: Get rid of unused function HasActivatedDevice()
Looks like nobody is calling HasActivatedDevice(). Get rid of it.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-10-01 07:59:12 -04:00
Vincent Batts a3b04de401 Merge pull request #16686 from rhvgoyal/more-fixes
devicemapper: A bug fix and a code improvement
2015-09-30 23:01:00 -04:00
Vivek Goyal 94caae2477 devmapper: Move maxDeviceID check in loadMetadata
maxDeviceID is upper limit on device Id thin pool can support. Right now
we have this check only during startup. It is a good idea to move this
check in loadMetadata so that any time a device file is loaded and if it
is corrupted and device Id is more than maxDevieceID, it will be detected
right then and there.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-09-30 18:54:06 -04:00
Vivek Goyal 39081eb3aa devmapper: Use deactivateDevice() instead of removeDevice() in deleteDevice()
Use deactivateDevice() instead of removeDevice() directly. This will make
sure for device deletion, deferred removal is used if user has configured
it in. Also this makes reading code litle easier as there is single function
to remove a device and that is deactivateDevice().

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-09-30 18:54:06 -04:00
David Calavera 8ebd0c972a Merge pull request #16683 from rhvgoyal/fix-couple-of-bugs
devmapper: Fix a bug and fix a comment and add one reliability check
2015-09-30 15:17:29 -07:00
Antonio Murdaca 0e9b0806f5 Merge pull request #16564 from calavera/versioned_types
Extract api types to version packages.
2015-09-30 23:28:10 +02:00
Arnaud Porterie 826ebc9333 Merge pull request #16684 from estesp/lets-update-runc-again
Update runc to fba07bce72e72ce5b2dd618e4f67dd86ccb49c82
2015-09-30 14:07:29 -07:00
Vincent Demeester 825f1a7e28 Merge pull request #16629 from sdurrheimer/cluster-options-zsh-completion
Add zsh completion for --cluster-store and --cluster-advertise
2015-09-30 20:48:25 +01:00
Vincent Demeester f22674a5f0 Merge pull request #16622 from albers/completion-cluster
bash completion for #16229
2015-09-30 20:46:45 +01:00
Phil Estes b7a009cc1c Update runc to fba07bce72e72ce5b2dd618e4f67dd86ccb49c82
Fixing user namespaces (again) with a vendor update from runc
(specifically, the remount() only if special flags change)

Other changes are very minimal.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-09-30 15:33:23 -04:00
Vivek Goyal e97e46b737 devmapper: Fail device deletion early if device is still mounted
If a device is still mounted at the time of DeleteDevice(), that means
higher layers have not called Put() properly on the device and are trying
to delete it. This is a bug in the code where Get() and Put() have not been
properly paired up. Fail device deletion if it is still mounted.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-09-30 15:21:22 -04:00
Vivek Goyal f5c0eb9ffe devmapper: Fix comments and for HasDevice() and Exists()
Exists() and HasDevice() just check if device file exists or not. It does
not say anything about if device is mounted or not. Fix comments.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-09-30 15:21:22 -04:00
Vivek Goyal ba02bf31cb devmapper: Do not load transaction meta file in device Hash map
device has map (device.Devices), contains valid devices and we skip all
the files which are not device files. transaction metadata file is not
device file. Skip this file when devices files are being read and loaded
into map.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-09-30 15:21:22 -04:00
Alexandre Beslic ec25a44732 Merge pull request #16678 from tklauser/moar-names
Add more amazing people to the names generator
2015-09-30 12:06:07 -07:00
David Calavera 61634758c4 Extract api types to version packages.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-30 14:14:27 -04:00
Arnaud Porterie 85244f80e3 Merge pull request #16385 from RichardScothern/v1-deprecation
Add a daemon flag to prevent contact with v1 registries.
2015-09-30 10:10:06 -07:00
Tibor Vass 4f677df0d1 Merge pull request #16539 from calavera/router_interfaces
Separate API router from server.
2015-09-30 11:51:30 -04:00
Tobias Klauser d762dcd147 Add more amazing people to the names generator
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2015-09-30 16:13:51 +02:00
Brian Goff 31b882e793 Merge pull request #16642 from vdemeester/remove-question-make-in-pkg-devicemapper
Remove "(?)" from comments in pkg/devicemapper
2015-09-30 09:39:23 -04:00
Antonio Murdaca c300978370 Merge pull request #16562 from Microsoft/10662-fixhttppull
Windows: Fix ADD from URL in dockerfile
2015-09-30 11:46:57 +02:00
Vincent Demeester 1dcb7d9e40 Remove (?) from comments in pkg/devicemapper
Got merged with it, removing it as it doesn't add anything.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-30 10:35:02 +02:00
Brian Goff 729c9a9782 Merge pull request #16580 from coolljt0725/unpause_all_container_on_exit
Make sure the container will always be unpaused on test exit
2015-09-29 21:44:23 -04:00
Alexander Morozov 36592a4bc2 Merge pull request #16666 from calavera/golint_graph_windows
Fix golint issues on the windows graph driver.
2015-09-29 17:36:37 -07:00
David Calavera ae03e544e7 Merge pull request #16650 from cpuguy83/no_named_volumes_for_builder
Do not parse config.Volumes for named volumes
2015-09-29 17:04:29 -07:00
David Calavera da982cf551 Separate API router from server.
Implement basic interfaces to write custom routers that can be plugged
to the server. Remove server coupling with the daemon.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-29 19:43:03 -04:00
Alexander Morozov 144abf2a58 Merge pull request #16659 from tiborvass/revert-context
Remove custom context package and use golang's only for api/server
2015-09-29 16:11:24 -07:00
David Calavera 1fffc7a89d Fix golint issues on the windows graph driver.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-29 18:32:45 -04:00
Tibor Vass 94e3b0f428 Use golang.org/x/net/context in api/server/
This patch removes the internal context package and uses golang's
package instead.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-09-29 17:40:55 -04:00
moxiegirl 724b410c55 Merge pull request #16656 from shishir-a412ed/man_docker_daemon_dns-opt
Add dns-opt option to docker daemon man page
2015-09-29 14:07:43 -07:00
David Calavera 949270ba7c Merge pull request #16661 from brahmaroutu/gccgo_ci_stretchr_fix
Vendor in stretchr/testify to fix GCCGO issue with function name parsing (GCCGO CI)
2015-09-29 13:53:35 -07:00
Srini Brahmaroutu 81c42d6c1e Vendor in stretchr/testify to fix GCCGO issue with function name parsing
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
2015-09-29 19:20:03 +00:00
Tibor Vass b08f071e18 Revert "Merge pull request #16228 from duglin/ContextualizeEvents"
Although having a request ID available throughout the codebase is very
valuable, the impact of requiring a Context as an argument to every
function in the codepath of an API request, is too significant and was
not properly understood at the time of the review.

Furthermore, mixing API-layer code with non-API-layer code makes the
latter usable only by API-layer code (one that has a notion of Context).

This reverts commit de41640435, reversing
changes made to 7daeecd42d.

Signed-off-by: Tibor Vass <tibor@docker.com>

Conflicts:
	api/server/container.go
	builder/internals.go
	daemon/container_unix.go
	daemon/create.go
2015-09-29 14:26:51 -04:00
Tibor Vass 79c31f4b13 Revert "Merge pull request #16567 from calavera/context_per_request"
This reverts commit ff92f45be4, reversing
changes made to 80e31df3b6.

Reverting to make the next revert easier.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-09-29 13:40:46 -04:00
Brian Goff 252af0ae2f Merge pull request #16570 from duglin/ReaderFix
Make Close() on simpleReaderCloser actually close the reader
2015-09-29 12:55:03 -04:00
Shishir Mahajan 8db945abb9 Add dns-opt option to docker daemon man page
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2015-09-29 12:31:51 -04:00
Brian Goff 4e0eb91c55 Merge pull request #16649 from mtrmac/16648-test-text-fixups
Fix text not matching the actual tests
2015-09-29 12:01:19 -04:00
Doug Davis 992e464a80 Merge pull request #16611 from vdemeester/fix-TestAttachClosedOnContainerStop-racy-test
Fix TestAttachClosedOnContainerStop racey test
2015-09-29 11:49:24 -04:00
Doug Davis 499b76d2ec Merge pull request #16641 from cpuguy83/16598_fix_TestExecStartFails
Make sure test container is running before exec
2015-09-29 11:25:14 -04:00
Vincent Demeester 50852f3be3 Fix TestAttachClosedOnContainerStop racey test
This test is failing once in a while on the CI, because the docker
attach command might be called after the container ends.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-29 16:57:58 +02:00
Brian Goff 9077c89689 Make sure test container is running before exec
Fixes race in TestExecStartFails

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-09-29 10:06:51 -04:00
Brian Goff 8e5bb8fdd3 Do not parse config.Volumes for named volumes
Fixes an issue where `VOLUME some_name:/foo` would be parsed as a named
volume, allowing access from the builder to any volume on the host.

This makes sure that named volumes must always be passed in as a bind.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-09-29 10:01:57 -04:00
Miloslav Trmač 8781367c77 Fix text not matching the actual tests
Also fixes a typo in image name.

Fixes #16648

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2015-09-29 15:26:04 +02:00
Alexander Morozov d6e7350b96 Merge pull request #16635 from Microsoft/10662-fixtestrununknowncommand
TestRunUnknownCommand 30s, not 30ns
2015-09-28 14:31:48 -07:00