1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

18727 commits

Author SHA1 Message Date
Alexander Morozov
fb04043ca5 Refactor listenFD function
* fixed weird logic with "*"
* return error if fdNum is failed to parse
* check if listener at offset is nil
* close unused listeners

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-07 14:26:48 -07:00
Alexander Morozov
ce0457a2c9 Merge pull request from runcom/rmi-perf
graph: add parent img refcount for faster rmi
2015-10-07 10:45:49 -07:00
Arnaud Porterie
8e31036816 Merge pull request from mavenugo/ux
Docker Network UX & remote API changes
2015-10-07 10:44:58 -07:00
Jess Frazelle
a1c373197f Merge pull request from jfrazelle/rename-flag
change flag name to better follow the other flags that start with disable
2015-10-07 10:40:32 -07:00
Jessica Frazelle
c559d8ebf7
change flag name to better follow the other flags that start with disable;
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-10-07 10:16:37 -07:00
Antonio Murdaca
292a1564dc graph: add parent img refcount for faster rmi
also fix a typo in pkg/truncindex package comment

Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
2015-10-07 19:09:44 +02:00
Alexander Morozov
8cee301874 Merge pull request from rhvgoyal/deferred_deletion
devicemapper: Implement deferred deletion capability
2015-10-07 09:27:41 -07:00
Madhu Venugopal
dd28ded711 Networking API and UX documentation
More doc updates will follow

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-07 03:54:27 -07:00
Madhu Venugopal
22a9ba090e Network UX and integration tests
* Exiting experimental network UX
* removed experimental service UX
* integrated with the new network remote API

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-07 03:54:27 -07:00
Madhu Venugopal
2ab94e11a2 Network remote APIs using new router, --net=<user-defined-network> changes
* Moving Network Remote APIs out of experimental
* --net can now accept user created networks using network drivers/plugins
* Removed the experimental services concept and --default-network option
* Neccessary backend changes to accomodate multiple networks per container
* Integration Tests

Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-07 03:54:19 -07:00
Vincent Demeester
0137e3eda2 Merge pull request from HuKeping/update-test
Update test
2015-10-07 07:09:13 +02:00
Brian Goff
2606a2e4d3 Merge pull request from tiborvass/refactor-builder
Refactor builder with new Go interfaces
2015-10-06 20:36:07 -04:00
HuKeping
28cff8bd03 Update test
Use of checkers on Integration test.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-10-07 07:11:45 +08:00
Tibor Vass
e0ef11a4c2 Abstract builder and implement server-side dockerfile builder
This patch creates interfaces in builder/ for building Docker images.
It is a first step in a series of patches to remove the daemon
dependency on builder and later allow a client-side Dockerfile builder
as well as potential builder plugins.

It is needed because we cannot remove the /build API endpoint, so we
need to keep the server-side Dockerfile builder, but we also want to
reuse the same Dockerfile parser and evaluator for both server-side and
client-side.

builder/dockerfile/ and api/server/builder.go contain implementations
of those interfaces as a refactoring of the current code.

Signed-off-by: Tibor Vass <tibor@docker.com>
2015-10-06 19:10:19 -04:00
Vivek Goyal
87de04005d devmapper: Implement a goroutine to cleanup deleted devices
Start a goroutine which runs every 30 seconds and if there are deferred
deleted devices, it tries to clean those up.

Also it moves the call to cleanupDeletedDevices() into goroutine and
moves the locking completely inside the function. Now function does not
assume that device lock is held at the time of entry.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-10-06 17:37:21 -04:00
Vivek Goyal
d295dc6652 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>
2015-10-06 17:37:21 -04:00
Vivek Goyal
d929589c1f 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>
2015-10-06 17:37:21 -04:00
Vivek Goyal
51e059e7e9 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>
2015-10-06 17:37:21 -04:00
Vivek Goyal
6b8b4feaa1 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>
2015-10-06 17:37:21 -04:00
Jess Frazelle
c1c3475c6a Merge pull request from LK4D4/fix_systemd_serve
Remove wait on start channel for butts socket
2015-10-06 14:04:15 -07:00
Jess Frazelle
7c19f660b3 Merge pull request from vdemeester/skip-TestExecStartFails-on-windows
Skip TestExecStartFails on windows
2015-10-06 13:52:51 -07:00
Vincent Batts
670c48857a Merge pull request from rhvgoyal/code-reorg
devmapper: Break down setupBaseImage() function into smaller pieces
2015-10-06 16:15:31 -04:00
Vincent Demeester
aee0fcf413 Merge pull request from Microsoft/jjh/fixpullimageifnotexist
No err shadowing on pullImageIfNotExist
2015-10-06 22:02:45 +02:00
Jess Frazelle
931e6129d0 Merge pull request from runcom/bump-libcontainer
Bump libcontainer
2015-10-06 12:24:19 -07:00
John Howard
b7009a4b3a No error shadow pullImageIfNotExist
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-10-06 11:38:23 -07:00
Antonio Murdaca
7539013436 bump libcontainer to 902c012e85cdae6bb68d8c7a0df69a42f818ce96
Signed-off-by: Antonio Murdaca <amurdaca@redhat.com>
2015-10-06 17:55:09 +02:00
Vivek Goyal
0fcd485626 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>
2015-10-06 08:38:03 -04:00
Vivek Goyal
69051ec0a5 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>
2015-10-06 08:38:03 -04:00
Vivek Goyal
efc1ddd7e3 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>
2015-10-06 08:38:03 -04:00
Alexander Morozov
1529343a3f Merge pull request from rhvgoyal/code-cleanup
devmapper: Little code cleanup and code reorganization
2015-10-05 22:23:10 -07:00
Alexandre Beslic
f66a6f0346 Merge pull request from duglin/ErrInfoDaemon
Fix daemon logs so that "API listen on" is INFO not ERROR
2015-10-05 17:50:57 -07:00
Alexander Morozov
806e4c4a02 Remove wait on start channel for systemd socket
Because Serve will be called after daemon creation

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-05 17:41:25 -07:00
Doug Davis
cc833c5e2b 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>
2015-10-05 16:17:25 -07:00
moxiegirl
e1d3cb89f1 Merge pull request from vdemeester/revert-env-validation-docs
Update documentation on the revert on env validation
2015-10-05 15:27:45 -07:00
Tibor Vass
f41230b93a Move builder files to builder/dockerfile
Signed-off-by: Tibor Vass <tibor@docker.com>
2015-10-05 18:26:47 -04:00
Antonio Murdaca
aac5c44c10 Merge pull request from shishir-a412ed/docker_tag_error_msg
Make docker tag error message more user friendly
2015-10-05 22:06:29 +02:00
Shishir Mahajan
582a24e937 Make docker tag error message more user friendly
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2015-10-05 15:19:34 -04:00
Arnaud Porterie
33e9d70c82 Merge pull request from mavenugo/discovery
Vendoring libnetwork integrated with Docker discovery service
2015-10-05 12:06:36 -07:00
Vincent Demeester
80f2e3f0c6 Merge pull request from LK4D4/fix_volume_socket
Allocate resources for server API before daemon creation
2015-10-05 20:48:41 +02:00
Tianon Gravi
0339ed787c Merge pull request from vdemeester/docs-testdirs
Update test-and-docs with TESTDIRS
2015-10-05 10:39:56 -07:00
Jess Frazelle
2e557c5c9a Merge pull request from sdurrheimer/zsh-completion-no-legacy-registry
Add zsh completion for 'docker daemon --no-legacy-registry'
2015-10-05 10:39:02 -07:00
moxiegirl
ec1d8d7f2a Merge pull request from moxiegirl/install-via-rpm
Updating the installations with rpm and yum install
2015-10-05 09:46:53 -07:00
Alexander Morozov
5eda566f93 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 

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-05 09:32:08 -07:00
Vivek Goyal
482eca3099 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>
2015-10-05 09:02:31 -04:00
Antonio Murdaca
072ac5e7f0 Merge pull request from vdemeester/remove-testify-and-mock
Remove use of testify mock and testify vendored lib
2015-10-05 09:42:16 +02:00
Vincent Demeester
fbd0cea90c Remove use of testify mock and testify vendored lib
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-05 08:43:34 +02:00
Steve Durrheimer
883fe220ec Add zsh completion for 'docker daemon --no-legacy-registry'
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
2015-10-05 08:31:00 +02:00
Vincent Demeester
b3fe785c72 Update documentation on the revert on env validation
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-10-04 23:04:36 +02:00
Sebastiaan van Stijn
67eb810a60 Merge pull request from runcom/fix-mam-commandline
Fix man and commandline docs
2015-10-04 22:28:19 +02:00
Vincent Demeester
4843323a46 Merge pull request from albers/completion--no-legacy-registry
Add bash completion for `docker daemon --no-legacy-registry`
2015-10-04 22:13:51 +02:00