Commit Graph

717 Commits

Author SHA1 Message Date
Jana Radhakrishnan
cdb82dc22d Synchronize /etc/hosts updates at file level
Introduced a path level lock to synchronize updates
to /etc/hosts writes. A path level cache is maintained
to only synchronize only at the file level.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-21 07:45:29 -07:00
Jana Radhakrishnan
c14ab8592e Merge pull request #685 from aboch/ay
Allow anonymous endpoint
2015-10-20 18:14:13 -07:00
Madhu Venugopal
07bb3dcdba Dont fail the Get functions if there is an error in one of the stores
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-20 16:57:12 -07:00
Alessandro Boch
e41a9cf59d Allow anonymous endpoint
- Allow to create an endpoint as anonymous.
  An anonymous endpoint does not get added
  to the network service records.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-20 14:05:46 -07:00
Jana Radhakrishnan
a10c1e3460 Merge pull request #684 from sanimej/bfix
Fixes #680
2015-10-19 16:32:08 -07:00
Madhu Venugopal
e1e617a90b Merge pull request #683 from mrjana/epclean
Handle maskable error during endpoint delete
2015-10-20 01:17:10 +02:00
Jana Radhakrishnan
d686fbb9c4 Handle maskable error during endpoint delete
Do not log unncessary warning messages when you get
maskable error from driver during an endpoint delete.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-19 15:56:25 -07:00
Madhu Venugopal
d8e14c9efc Merge pull request #676 from sanimej/bfix
Fix the daemon panic on consul server restart
2015-10-20 00:18:42 +02:00
Jana Radhakrishnan
33d336ac72 Cleanup dangling local endpoints
When we bootup cleanup all dangling local
endpoints since they are not needed anymore.
The only reason it can happen is when the process
went down ungracefully after an endpoint is
created but before join is successfull.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-19 14:44:27 -07:00
Madhu Venugopal
9145f18132 Merge pull request #675 from mrjana/model
Make sandbox cleanup robust for ungraceful exits
2015-10-19 22:47:22 +02:00
Jana Radhakrishnan
773648507d TC for ungraceful restart of default network
Added an integration test to test the ungraceful
restart of the default bridge network.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-19 13:31:07 -07:00
Jana Radhakrishnan
96d819cb06 Make sandbox cleanup robust for ungraceful exits
When the daemon has a lot of containers and even when
the daemon tries to give 15 second to stop all containers
it is not enough. So the daemon forces a shut down at the end
of 15 seconds. And hence in a situation with a lot of
containers even gracefully bringing down the daemon will result
in a lot of containers fully not brought down.

In addition to this the daemon force killing itself can happen
in any arbitrary point in time which will result in inconsistent
checkpointed state for the sandbox. This makes the cleanup really
fail when we come back up and in many cases because of this
inability to cleanup properly on restart will result in daemon not
able to restart because we are not able to delete the default network.

This commit ensures that the sandbox state stored in the disk is
never inconsistent so that when we come back up we will always be
able to cleanup the sandbox state.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-19 13:30:47 -07:00
Santhosh Manohar
316a652e6e Fixes #680
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-10-19 02:35:54 -07:00
Santhosh Manohar
4df4ba70ca Fix the daemon panic on consul server restart
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-10-19 01:29:23 -07:00
Jana Radhakrishnan
afd6162240 Bridge driver should return maskable error
Bridge driver should return maskable error during Leave
or DeleteEndpoint since this can be an expected sceanrio
when libnetwork tries to leave and delete default bridge
endpoints and bridge driver does not persist with the default
bridge. This is only expected during an ungraceful exit of
the daemon but will cause confusion to the user if it shows
up as failures on a deamon restart after an ungraceful exit.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-16 16:11:55 -07:00
Alexander Morozov
537ba03dd1 Use netlink.LinkByName instead of net.InterfaceByName
It's x350 time faster.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-16 11:33:17 -07:00
Alexander Morozov
604753b43a Fix build image name
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-10-16 11:33:08 -07:00
Jana Radhakrishnan
91ddfd286f Merge pull request #661 from aboch/gr
Explicitly set namepsace for ipamutils.ElectInterface
2015-10-16 07:05:07 -07:00
Jana Radhakrishnan
5d3aee15cc Merge pull request #663 from mavenugo/dgw
Fixed Vagrantfile to use systemd script
2015-10-16 07:04:27 -07:00
Jana Radhakrishnan
d834cd42b2 Merge pull request #646 from coolljt0725/fix_cluster_store
Fix docker daemon failed to start with multiple cluster store address
2015-10-16 06:52:34 -07:00
Madhu Venugopal
04126b850a Fixed Vagrantfile to use systemd script
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-16 05:03:47 -07:00
Alessandro Boch
79b37def48 Explicitly set namepsace for ipamutils.ElectInterface
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-15 22:16:40 -07:00
Alessandro Boch
e0f1ac4b2e Fix ipam state cleanup logic
- Got accidentally broken by another commit

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-15 17:37:22 -07:00
Jana Radhakrishnan
33aa626bc9 Add etcd integrations tests
- Added etcd integration test for overlay
    - Added etcd integration test for multinode
      with mock test driver suitable for circleci
    - Added multinode tests for zookeeper
    - Made the script smart enough to only start
      data stores necessary for the requested suites

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-14 23:07:30 -07:00
Jana Radhakrishnan
8c543556a3 Merge pull request #656 from mavenugo/dgw
Changed Labels to DriverOpts
2015-10-14 16:58:56 -07:00
Madhu Venugopal
e8370e78d0 Changed Labels to DriverOpts
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-14 16:38:46 -07:00
Lei Jitang
82e3c49b0a Fix docker daemon failed to start with multiple cluster store address
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-14 02:46:42 -04:00
Jana Radhakrishnan
ac1cf3f784 Add support for selectively running a suite
- With the selectively running a suite support
      one can do the following to select which suite
      of tests to run:
	 SUITES="simple multi" sudo -E make integration-tests
    - Refactored and cleaned up some ununsed code in helpers.bash
    - Added discover string parse function to parse discovery
      string into provide and address

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-13 22:42:06 -07:00
Chun Chen
b92b013820 Add overlay zookeeper test
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-10-13 14:05:09 -07:00
Madhu Venugopal
4331b8ec4f Merge pull request #641 from mrjana/bugs
Fix etcd as a backend store support
2015-10-13 11:12:46 -07:00
Jana Radhakrishnan
72b8f80dc3 Ensure the parent directory for key prefix exists
Currently we are trying to ensure that the parent
directory exists as a key. But it is really a directory
and etcd expects it to be a directory. So made the
change to ensure that the parent key is created as
a directory and not as a simple key.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-13 10:46:37 -07:00
Jana Radhakrishnan
c42e2cf44d Update libkv godeps
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-13 10:46:24 -07:00
Madhu Venugopal
3365af97c2 Initializing generic to emtpy map
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-13 10:37:53 -07:00
Jana Radhakrishnan
57a6888b64 Merge pull request #640 from aboch/di
IPAM driver documentation
2015-10-12 16:55:53 -07:00
Alessandro Boch
6b77f04e9b IPAM driver doc
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-12 16:39:24 -07:00
Madhu Venugopal
71220e2a88 Made use of map[string]string for nw options in default-gateway impl
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-12 15:28:28 -07:00
Jana Radhakrishnan
09453df618 Merge pull request #637 from aboch/rm
Change in remote IPAM API payload
2015-10-12 14:21:57 -07:00
Jana Radhakrishnan
f1c968c8ba Merge pull request #638 from mavenugo/vin-fixes
Updated Vagrant with the latest UX
2015-10-12 14:18:02 -07:00
Madhu Venugopal
9ae62c93dd Updated Vagrant with the latest UX
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-12 13:54:58 -07:00
Alessandro Boch
8d56508190 Change in remote IPAM API payload
- Avoid net.IP and net.IPNet types to ease marshalling/unmarshalling
  at client and server side

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-12 13:03:28 -07:00
Jana Radhakrishnan
6d6490b91c Check if address space valid in getStore
Added a check to see if address space is valid in
addrSpaces map before accessing it. Also fixed some
error strings so that it provides better information
to the user.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-12 11:20:29 -07:00
Madhu Venugopal
c454b1084d Merge pull request #633 from mrjana/bugs
Separate endpoint count into a different object
2015-10-11 23:41:58 -07:00
Jana Radhakrishnan
ab8dfb54fe Separate endpoint count data from network object
Currently endpoint count is maintained as part of
network object and the endpoint count gets updated
frequently while the rest of network is quite stable.
Because of the frequent updates to endpoint count the
network object is getting marshalled and unmarshalled
ferquently. This is causing a lot of churn and transient
memory usage. Fix this by creating a deparate object of
endpoint count so that only that gets updated.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-11 23:17:06 -07:00
Madhu Venugopal
74376e8676 Moved the default local and global store to new root
This is required in order to provide a clean switchover.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-11 22:57:24 -07:00
Jana Radhakrishnan
a6c2dd75b5 Synchronize datastore apis
Currently there are 3 distinct operations performed by
datastore
   - Pushing the data to the store
   - Updating the Index of the local object
   - Updating the cache (in case of localscope)

Without a lock racing datastore api calls can interleave
in various surprising ways. Best thing is to keep these
3 above operation inseparable. Use a datastore lock to
achieve this.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-11 18:51:10 -07:00
Jana Radhakrishnan
93bc5ed4c7 Update libkv godeps
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-11 16:02:16 -07:00
Jana Radhakrishnan
7391338323 Make ipamutils compile for windows
currently ipamutils package uses apis which are linux
specific and makes windows compile error out. Separated
the OS specific apis into linux and windows files to
diverge the implementation.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-10 13:16:52 -07:00
Jana Radhakrishnan
fb19b4f488 Merge pull request #629 from sanimej/slice
Fix the overlay cleanup in the multi-subnet case
2015-10-10 13:01:52 -07:00
Jana Radhakrishnan
922e45b5f2 Merge pull request #623 from aboch/ipc
Miscellaneous changes for ipam docker integration
2015-10-10 11:09:55 -07:00
Madhu Venugopal
750671e633 Default bridge need not have persistence in bridge driver
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-10 09:00:35 -07:00