Commit graph

974 commits

Author SHA1 Message Date
Jana Radhakrishnan
412ee44f94 Merge pull request #725 from palfrey/patch-1
Minor spelling fix ("likey" => "likely")
2015-10-30 11:52:31 -07:00
Tom Parker
64547e43c0 Minor spelling fix ("likey" => "likely") 2015-10-30 17:18:50 +00:00
Jana Radhakrishnan
5cc589dbb8 Merge pull request #724 from mavenugo/ugr
Fixes a case of ungraceful daemon restart + unreachable store
2015-10-29 18:20:39 -07:00
Madhu Venugopal
c8a66f5e72 Fixes a case of ungraceful daemon restart + unreachable store
For ungraceful daemon restarts, libnetwork has sandbox cleanup logic to
remove any stale & dangling resources. But, if the store is down during
the daemon restart, then the cleanup logic would not be able to perform
complete cleanup. During such cases, the sandbox has been removed. With
this fix, we retain the sandbox if the store is down and the endpoint
couldnt be cleaned. When the container is later restarted in docker
daemon, we will perform a sandbox cleanup and that will complete the
cleanup round.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-29 17:16:52 -07:00
aboch
99132ffb7f Merge pull request #721 from sanimej/bfix
Fix an issue in overlay network peer EP list maintenance
2015-10-29 09:16:54 -07:00
Madhu Venugopal
31e6967d80 Merge pull request #719 from mrjana/bugs
Reconcile persistent state after driver config
2015-10-29 05:56:40 +01:00
Jana Radhakrishnan
a24e4e56e0 Merge pull request #718 from aboch/pm
Fix in DriverInfo()
2015-10-28 21:39:37 -07:00
Jana Radhakrishnan
ab0c0df288 Add IT case for external connectivity
Added IT cases for external connectivity check for bridge
and overlay networks, both initially and after a restart.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-28 19:10:38 -07:00
Jana Radhakrishnan
71207b575e Reconcile persistent state after driver config
Reconciling persistent state after configuring driver. If not
the networks will not be initialized properly based on certain
driver config settings like enabling IP tables etc.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-28 19:07:10 -07:00
Alessandro Boch
320219829b Fix in DriverInfo()
- Retrieve info from default gateway network's peer endpoint
  if present

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-28 16:30:20 -07:00
Madhu Venugopal
8f831235de Merge pull request #717 from cpuguy83/logs_for_the_logging_gods
Use serf logger for memberlist log
2015-10-28 22:38:36 +01:00
Brian Goff
2f03577ec8 Use serf logger for memberlist log
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-10-28 17:21:53 -04:00
Jana Radhakrishnan
f75ced4ab9 Merge pull request #715 from aboch/st
Some functions' logic cleanup
2015-10-27 11:23:40 -07:00
Alessandro Boch
7b4b56169b Some functions' logic cleanup
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-27 11:08:42 -07:00
Jana Radhakrishnan
bd77346032 Merge pull request #712 from sanimej/bfix
Handling container rename in libnetwork
2015-10-26 16:12:37 -07:00
Jana Radhakrishnan
6a2eee6632 Merge pull request #713 from mavenugo/leave
log an error if advertise is configured with a non-local ip-address
2015-10-26 13:48:55 -07:00
Madhu Venugopal
5a0dbbd986 log an error if advertise is configured with a non-local ip-address
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-26 12:21:06 -07:00
Jana Radhakrishnan
ed9d4d890a Merge pull request #701 from denverdino/master
Fix the issue for the --cluster-store URL with path
2015-10-26 12:05:21 -07:00
Li Yi
fbb2269109 Format the code
Change-Id: Ia0000b3cfda0cb6146aaf22bccc189737a0a4c75
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-10-27 00:45:48 +08:00
Li Yi
0e2ff9dd71 Add more integration test cases
Change-Id: I892d35380b3e968553bbeb3092c16f5ae5b110b7
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-10-26 19:05:14 +08:00
Li Yi
824bdec0bd Add customer_prefix to the store URL for integration test
Change-Id: I321c0fbf2f2df84b8af603d0f751d5f4ac36ab06
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-10-26 17:48:52 +08:00
aboch
413752795b Merge pull request #710 from mrjana/bugs
Cleanup service db for the network on last container leave
2015-10-24 20:59:12 -07:00
Jana Radhakrishnan
92f7f2e1a0 Add IT case for proper /etc/hosts handling
Added an IT case for checking proper /etc/hosts
handling in the overlay network. This also to see
if there are any stale entries in the /etc/hosts

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-24 17:45:34 -07:00
Jana Radhakrishnan
e5b34e1435 Cleanup service db for the network
Cleanup the service db for the network when the last
container on the network leaves on the host. This is
because we stop watching the network after the last
container leaves and so if we keep the service db
around it might be kept uptodate with containers
joining and leaving in other hosts. The service
db will populated properly when a container joins
this network at a later point in time.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-24 17:41:58 -07:00
aboch
38270b30b4 Merge pull request #706 from mavenugo/leave
Dont notify the leave if the serf is not inited
2015-10-24 15:25:47 -07:00
Madhu Venugopal
622534f958 Merge pull request #709 from aboch/de
Clean hosts entries on endpoint leave
2015-10-24 23:24:46 +02:00
Alessandro Boch
4cc65d01a6 Clean hosts entries on endpoint leave
- Currently when a sandbox disconnect from a network
  the network's services are not removed from the
  sandbox's /etc/hosts file

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-24 13:31:01 -07:00
Madhu Venugopal
473ce7db08 Dont notify the leave if the serf is not inited
Overlay driver allows local containers to communicate in overly network
even when the serf is not fully inited. But when the container leaves an
overlay network, it gets stuck waiting on a nil notifyCh, when the serf
is not fully initialized.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-24 08:51:15 -07:00
Santhosh Manohar
84b1ef9bd5 Fix an issue in overlay network peer EP list maintenance
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-10-24 07:10:03 -07:00
Madhu Venugopal
e550f1b840 Merge pull request #702 from mrjana/bugs
Avoid duplicate entries in /etc/hosts
2015-10-24 03:00:44 +02:00
aboch
df8c425c3d Merge pull request #704 from mavenugo/dgw
Default Gateway endpoints must be annonymous
2015-10-23 17:08:10 -07:00
Madhu Venugopal
a687e431c0 Default Gateway endpoints must be annonymous
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-23 16:52:11 -07:00
Jana Radhakrishnan
4850c5f1e6 Avoid duplicate entries in /etc/hosts
Currently the local containers of a global scope
network will get it's service records updated
from both a local update and global update. There
is no way to check if this is a local endpoint when
a remote update comes in via watch because we add
the endpoint to local endpoint list during join, while
the remote update happens during createendpoint.

The right thing to do is update the local endpoint list
and start watching during createndpoint and remove the watch
during delete endpoint. But this might result in the container
getting it's own record in it's /etc/hosts. So added a filtering
logic to filter out self records when updating the container's
/etc/hosts

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-23 16:39:40 -07:00
Madhu Venugopal
0c9eeec760 Merge pull request #703 from sanimej/bfix
Fix Endpoint Unmarshal to retrieve the fields correctly
2015-10-24 01:23:29 +02:00
Li Yi
aababdc1c7 Fix the issue to parse file path for boltdb
Change-Id: Id59e4adbfdd20f63296a18bd22e4d352797e23c3
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-10-24 01:13:29 +08:00
Li Yi
b339bb2707 Fix the issue for the --cluster-store URL with path
Change-Id: I6542ceb28f70e2c6bf2162462255359362594c6d
Signed-off-by: Li Yi <denverdino@gmail.com>
2015-10-23 22:46:07 +08:00
Santhosh Manohar
3da8471681 Handling container rename in libnetwork
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-10-23 05:31:53 -07:00
Madhu Venugopal
cd971b9db4 Merge pull request #697 from aboch/bq
Do not manipulate bitseq length to reserve broadcast address
2015-10-22 22:27:27 +02:00
Alessandro Boch
115d2ec7d8 Do not manipulate bitseq length to reserve broadcast address
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-22 12:58:45 -07:00
Madhu Venugopal
baf622c0a5 Merge pull request #688 from aboch/uk
Do not refresh the bitmasks on all operations in IPAM
2015-10-22 21:53:05 +02:00
Jana Radhakrishnan
15871f32fc Merge pull request #695 from mavenugo/watch_retry
Add watch retrigger when store restarts
2015-10-22 11:44:33 -07:00
aboch
1c34914bd1 Merge pull request #694 from mrjana/bugs
Purge remote endpoints from watch if it is local
2015-10-22 10:55:11 -07:00
Santhosh Manohar
133ee32980 Fix Endpoint Unmarshal to retrieve the fields correctly
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2015-10-22 08:41:52 -07:00
Madhu Venugopal
5ef8d0f038 Add watch retrigger when store restarts
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-10-21 21:45:52 -07:00
Jana Radhakrishnan
c3c4825f80 Purge remote endpoints from watch if it is local
A local endpoint is known to the watch database only
during Join. But the same endpoint can be known to the
watch database as remote endpoint well before the Join
because a CreateEndpoint updates the endpoint to the store.
So on Join when you come to know that this is indeed a
local endpoint remove it from remote endpoint list and add it
to local endpoint list.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-10-21 21:20:12 -07:00
Madhu Venugopal
bd53638727 Merge pull request #689 from mrjana/bugs
Synchronize /etc/hosts updates at file level
2015-10-21 20:32:32 +02:00
Madhu Venugopal
cfece1b157 Merge pull request #690 from aboch/aa
Allow remote ipam driver to return nil address
2015-10-21 20:30:53 +02:00
Jana Radhakrishnan
f87ed62d10 Merge pull request #691 from aboch/kv
Update libkv godeps
2015-10-21 07:56:41 -07:00
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
Alessandro Boch
3cc33dc491 Update libkv
- To commit id  c2aac5dbbaa5c872211edea7c0f32b3bd67e7410

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-10-20 23:55:22 -07:00