Commit Graph

18711 Commits

Author SHA1 Message Date
fb33696b35 devmapper: Keep track of number of deleted devices
Keep track of number of deleted devices and export this information through
"docker info".

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: d295dc66521e2734390473ec1f1da8a73ad3288a
Component: engine
2015-10-06 17:37:21 -04:00
7bb486d26e devmapper: Implement deferred deletion functionality
Finally here is the patch to implement deferred deletion functionality.
Deferred deleted devices are marked as "Deleted" in device meta file. 

First we try to delete the device and only if deletion fails and user has
enabled deferred deletion, device is marked for deferred deletion.

When docker starts up again, we go through list of deleted devices and
try to delete these again.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: d929589c1fc4538dcd1b2a7a3dc7d4afbdfa72fd
Component: engine
2015-10-06 17:37:21 -04:00
cd659bcc9c devmapper: Provide option to enabled deferred device deletion
Provide a command line option dm.use_deferred_deletion to enable deferred
device deletion feature. By default feature will be turned off.

Not sure if there is much value in deferred deletion being turned on
without deferred removal being turned on. So for now, this feature can
be enabled only if deferred removal is on.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 51e059e7e90f37848596a0b6ec83f7835e6e4131
Component: engine
2015-10-06 17:37:21 -04:00
3c327a4ced devmapper: construct used device ID map from device Hash map
Currently during startup we walk through all the device files and read
their device ID and mark in a bitmap that device id is used.

We are anyway going through all device files. So we can as well load all
that data into device hash map. This will save us little time when
container is actually launched later.

Also this will help with later patches where cleanup deferred device
wants to go through all the devices and see which have been marked for
deletion and delete these.

So re-organize the code a bit.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 6b8b4feaa165af630dd33423f0538a0b987703ae
Component: engine
2015-10-06 17:37:21 -04:00
f9c704604b Merge pull request #16786 from LK4D4/fix_systemd_serve
Remove wait on start channel for butts socket
Upstream-commit: c1c3475c6afa44a0328dc7a09839f9eee0fe105d
Component: engine
2015-10-06 14:04:15 -07:00
fca0f83907 Merge pull request #16752 from vdemeester/skip-TestExecStartFails-on-windows
Skip TestExecStartFails on windows
Upstream-commit: 7c19f660b3a0f5e5551ea8af2b3cc9b5266c2ada
Component: engine
2015-10-06 13:52:51 -07:00
c8875071f3 Merge pull request #16799 from rhvgoyal/code-reorg
devmapper: Break down setupBaseImage() function into smaller pieces
Upstream-commit: 670c48857ace676b43649b39bd12e83b19558d23
Component: engine
2015-10-06 16:15:31 -04:00
eea788b12d Merge pull request #16804 from Microsoft/jjh/fixpullimageifnotexist
No err shadowing on pullImageIfNotExist
Upstream-commit: aee0fcf413f34bd6b82a4231a3bd771b01919007
Component: engine
2015-10-06 22:02:45 +02:00
3fb0ea6fd2 Merge pull request #16795 from runcom/bump-libcontainer
Bump libcontainer
Upstream-commit: 931e6129d0c27acc81fc2eea57f333f31f1cfb69
Component: engine
2015-10-06 12:24:19 -07:00
1bddd2d12a No error shadow pullImageIfNotExist
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b7009a4b3ad7e495be61a61e9aacc5e263073670
Component: engine
2015-10-06 11:38:23 -07:00
e9bd508682 bump libcontainer to 902c012e85cdae6bb68d8c7a0df69a42f818ce96
Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Upstream-commit: 753901343624f15264b46fe9ade01cf451be99f1
Component: engine
2015-10-06 17:55:09 +02:00
a37c8bb04a devmapper: Move UUID setup and verification code in a function
Simplify setupBaseImage() even further. Move some more code in a separate
function. Pure code reorganization. No functionality change.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 0fcd485626f110bbf39e8a6b1edc11b4ac6f7065
Component: engine
2015-10-06 08:38:03 -04:00
b4d2c9486c devmapper: Move thin pool related checks in a function
Move thin pool related checks in a separate function. Pure code reorganization.
Makes reading code easier.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 69051ec0a58906e5252f902063ccead2075c8bed
Component: engine
2015-10-06 08:38:03 -04:00
0f1a89a462 devmapper: Move base device creation in separate function
This moves base device creation function in a separate function. Pure
code reorganization. Makes reading code little easier.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: efc1ddd7e3341124a2ebbb8a358f44754b32f310
Component: engine
2015-10-06 08:38:03 -04:00
3d6e7d79f9 Merge pull request #16727 from rhvgoyal/code-cleanup
devmapper: Little code cleanup and code reorganization
Upstream-commit: 1529343a3fc78251a2d62befebdbd669db133a3b
Component: engine
2015-10-05 22:23:10 -07:00
83ddd968a6 Merge pull request #16782 from duglin/ErrInfoDaemon
Fix daemon logs so that "API listen on" is INFO not ERROR
Upstream-commit: f66a6f0346f356e177362b12f365ca82b4936647
Component: engine
2015-10-05 17:50:57 -07:00
f3b76452e9 Remove wait on start channel for systemd socket
Because Serve will be called after daemon creation

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 806e4c4a02d1f7b7bf05b29ecb0a3009098b26ac
Component: engine
2015-10-05 17:41:25 -07:00
40cd5f11ba Fix daemon logs so that "API listen on" is INFO not ERROR
W/o this PR the logs would show:
```
ERRO[0000] API listen on [::]:2375
ERRO[0000] API listen on /var/run/docker.sock
```
which is misleading since these aren't "errors" they're just informational.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: cc833c5e2bee651ee55378fbaa8302df60571400
Component: engine
2015-10-05 16:17:25 -07:00
a2758a7a50 Merge pull request #16647 from vdemeester/revert-env-validation-docs
Update documentation on the revert on env validation
Upstream-commit: e1d3cb89f16c90a3ec6777e34c769cc2a35d123e
Component: engine
2015-10-05 15:27:45 -07:00
9d1d2940bc Merge pull request #16776 from shishir-a412ed/docker_tag_error_msg
Make docker tag error message more user friendly
Upstream-commit: aac5c44c10c8a862782a410b75273646ba2e6e9c
Component: engine
2015-10-05 22:06:29 +02:00
d3de206cf9 Make docker tag error message more user friendly
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
Upstream-commit: 582a24e937d1e0746b91a13bacd7f5fd65a38741
Component: engine
2015-10-05 15:19:34 -04:00
250a07900f Merge pull request #16718 from mavenugo/discovery
Vendoring libnetwork integrated with Docker discovery service
Upstream-commit: 33e9d70c82a9dee04e5e6d50dd890a6b96650b0a
Component: engine
2015-10-05 12:06:36 -07:00
0eed66fc40 Merge pull request #16769 from LK4D4/fix_volume_socket
Allocate resources for server API before daemon creation
Upstream-commit: 80f2e3f0c6d8c439ba0d4b53162dcf1610ad2d46
Component: engine
2015-10-05 20:48:41 +02:00
b9a953d801 Merge pull request #16747 from vdemeester/docs-testdirs
Update test-and-docs with TESTDIRS
Upstream-commit: 0339ed787c4e7795ad8b3f6d3a230ba8dcec4d48
Component: engine
2015-10-05 10:39:56 -07:00
f8989092f7 Merge pull request #16761 from sdurrheimer/zsh-completion-no-legacy-registry
Add zsh completion for 'docker daemon --no-legacy-registry'
Upstream-commit: 2e557c5c9a462c11b606f83d60d479c5ea46576e
Component: engine
2015-10-05 10:39:02 -07:00
165ebff00d Merge pull request #16662 from moxiegirl/install-via-rpm
Updating the installations with rpm and yum install
Upstream-commit: ec1d8d7f2a8f563deb61df2b35aa8a9d6a07c3e2
Component: engine
2015-10-05 09:46:53 -07:00
c12ca2de3a Allocate resources for server API before daemon creation
It prevents occupying of those resources (ports, unix-sockets) by
containers.
Also fixed false-positive test for that case.

Fix #15912

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 5eda566f937dddef9d4267dd8b8b1d8c3e47b290
Component: engine
2015-10-05 09:32:08 -07:00
1c5745b90e devmapper: Few code cleanups
This patch does three things. Following are the descriptions.

===
Create a separate function for delete transactions so that parent function
is little smaller.

Also close transaction if an error happens.
===
When docker is being shutdown, save deviceset metadata first before
trying to remove the devices. Generally caller gives only 10 seconds
for shutdown to complete and then kills it after that. So if some device
is busy, we will wait 20 seconds for it removal and never be able to save
metadata. So first save metadata and then deal with device removal.
===
Move issue discard operation in a separate function. This makes reading code
little easier.

Also don't issue discards if device is still open. That means devices is
still probably being used and issuing discards is not a good idea.

This is especially true in case of deferred deletion. We want to issue
discards when device is not open. At that time device can be deleted too.
Otherwise we will issue discards and deletion will actually fail. Later
we will try deletion again and issue discards again and deletion will
fail again as device is open and busy.

So this will ensure that discards are issued once when device is not open
and it can actually be deleted.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 482eca3099ad4bf3a7db62a31f88e2158cbbc933
Component: engine
2015-10-05 09:02:31 -04:00
a9ec8630f8 Merge pull request #16740 from vdemeester/remove-testify-and-mock
Remove use of testify mock and testify vendored lib
Upstream-commit: 072ac5e7f061aaece6693bb17510b3e968ac4971
Component: engine
2015-10-05 09:42:16 +02:00
9c4712a315 Remove use of testify mock and testify vendored lib
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: fbd0cea90cec03b233453592996627e88af70f8d
Component: engine
2015-10-05 08:43:34 +02:00
29630cd41d Add zsh completion for 'docker daemon --no-legacy-registry'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
Upstream-commit: 883fe220ec0016922cf769f6ff8b7f85d9994d82
Component: engine
2015-10-05 08:31:00 +02:00
c1ad8272d0 Update documentation on the revert on env validation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: b3fe785c7267bff533c9b2fc324c58e37796e973
Component: engine
2015-10-04 23:04:36 +02:00
72f4bc7137 Merge pull request #16744 from runcom/fix-mam-commandline
Fix man and commandline docs
Upstream-commit: 67eb810a604905df0a33ce20085c8aeddfb0171a
Component: engine
2015-10-04 22:28:19 +02:00
356a51b97e Merge pull request #16751 from albers/completion--no-legacy-registry
Add bash completion for `docker daemon --no-legacy-registry`
Upstream-commit: 4843323a46dc5aa101a111a35fcce6eacfad5bd0
Component: engine
2015-10-04 22:13:51 +02:00
b51b5af287 Fix man and commandline docs
- missing help option in `docs/reference/commandline/*.md` (some files
  have it, the other I fixed didn't)
- missing `[OPTIONS]` in Usage description
- missing options
- formatting
- start/stop idempotence

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
Upstream-commit: 14e8898648909379f37049828e103ba1c97f253b
Component: engine
2015-10-04 21:22:27 +02:00
3e4d4e0287 Update test-and-docs with TESTDIRS
… and fix the rendering of `make test-unit` with TESTDIRS :)

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 0542939f405ce6c5cad42bd715d7ceefd573db75
Component: engine
2015-10-04 21:19:04 +02:00
e846ce8223 Merge pull request #16530 from dnephin/filter_events_by_label
Filter events by labels
Upstream-commit: e86291edd88641cc866c842d0f4a8f8296820aeb
Component: engine
2015-10-04 20:36:42 +02:00
1aa805ef60 Updating the installations with rpm and yum install
Prefer rpm/yum over script install
Updating with review comments
Adding second round review comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 5e061b5945df047c68953aa424fafbc5a2706ab5
Component: engine
2015-10-04 11:29:58 -07:00
373a4e79bb Merge pull request #16561 from ai-traders/restart_on_debian
#16560 Add timeout to `sudo service docker stop` on sysvinit
Upstream-commit: e6ca006d8634a0fa9c6eb655aa9c872b84c5e438
Component: engine
2015-10-04 11:25:59 -07:00
ec3df7c39d While #16738 is "fixed", skip TestExecStartFails
… on windows

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: dc204b87864a06d37f9515b57bd6f76dac24a016
Component: engine
2015-10-04 18:38:21 +02:00
a3a78e3ce4 Merge pull request #16509 from HuKeping/search-problem
Fix docker search problem
Upstream-commit: b78f66c472399bf56bd5110dbdaac5e5676396c8
Component: engine
2015-10-04 18:21:32 +02:00
a66830822a Fix docker search problem
Search terms shouldn't be restricted to only full valid repository
names. It should be perfectly valid to search using a part of a name,
even if it ends with a period, dash or underscore.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: f04e8fdb9bbcdad28de5c328b7de3f3abdae0b5a
Component: engine
2015-10-04 23:23:43 +08:00
e3177a2c43 Add bash completion for --no-legacy-registry
Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 3f04ab2fc773a89f2ff465d995d10793a67f23a2
Component: engine
2015-10-04 06:49:42 -07:00
781198dc30 Merge pull request #16739 from dgageot/contribution_fix
Fix hidden link in contribution guide
Upstream-commit: 2fcacf8ea3898b731828866f09df3ccd8bfb8f9b
Component: engine
2015-10-03 10:38:12 +02:00
acc6593d19 Merge pull request #16726 from sallyom/man-search
typo man/search
Upstream-commit: a6cef38936d8ba448d9f2e5b7778ae648ac4a519
Component: engine
2015-10-03 10:26:18 +02:00
5ec5ed45a2 Fix hidden link in contribution guide
Signed-off-by: David Gageot <david@gageot.net>
Upstream-commit: 545ab6bf48a5a092e0f1ef79485ac5ee38de8525
Component: engine
2015-10-03 10:16:34 +02:00
b6b2359efc Docker daemon updates to libnetwork discovery support
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 139ea5b7f2a1b981a8c9556a21e52ceaa8c65d5c
Component: engine
2015-10-02 20:57:47 -07:00
b1b064f9e8 Merge pull request #16582 from vdemeester/16360-dockerCmd-raceytests
Fix TestDockerCmd*Timeout racey tests
Upstream-commit: 49066f621e9cfd3e83a3a6e12ca254a68f4c41bb
Component: engine
2015-10-02 20:45:41 -04:00
5d9a13c069 Merge pull request #16736 from cpuguy83/16706_let_the_undead_keep_names
Don't let `Names` be null on GET /containers/JSON
Upstream-commit: da0cf691471dc80cdf5bf4b9e7b60297b6d54edf
Component: engine
2015-10-02 16:55:21 -07:00
f767f0010d Merge pull request #16733 from MHBauer/perjury
remove testify asserts from pkg/discovery
Upstream-commit: 24e7907bb15c7aa32a04310cd8604636a8b80586
Component: engine
2015-10-02 16:04:56 -07:00