Commit Graph

2331 Commits

Author SHA1 Message Date
Madhu Venugopal bed38de9bb Merge pull request #1777 from fcrisciani/move_provider
Move Cluster provider back to Moby
2017-05-25 08:58:02 -07:00
Madhu Venugopal 6a0dfa1929 Merge pull request #1770 from dhilipkumars/ipvs-getServices-dev
[IPVS] Implement GetServices(),GetService() and GetDestinations()
2017-05-25 08:45:19 -07:00
Zhang Wei 4688e41ba6 [Bug]Fix race between sandbox.delete() and SetKey()
When sandbox is deleting, another SetKey routine could be also in
progress as there's no lock to protect it, when this happens, there
could be a scene that one sandbox is removed, but it's osSbox file
"/var/run/docker/netns/xxxx" left on system and will never be cleaned.

So add a inDelete check for SetKey() to eliminate the race.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2017-05-25 15:35:24 +08:00
dhilipkumars 104e2f9db6 fix review comments
Signed-off-by: dhilipkumars <dhilip.kumar.s@huawei.com>
2017-05-25 10:40:42 +05:30
Flavio Crisciani 5c68d719bb
Moby vendoring
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-24 11:46:36 -07:00
Flavio Crisciani 9cc5cd9b53
Moved the cluster provider to Moby
Moved the cluster provider interface definition from
libnetwork to moby

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-24 11:28:23 -07:00
dhilipkumars 635b8986c2 Fix typos and review comments
Signed-off-by: dhilipkumars <dhilip.kumar.s@huawei.com>
2017-05-24 07:56:59 +05:30
dhilipkumars ce0066b330 Update GetService(*Service) api. Update UT with new apis and remove dependency from ipvsadm
Signed-off-by: dhilipkumars <dhilip.kumar.s@huawei.com>
2017-05-23 18:47:16 +05:30
Santhosh Manohar 6b34700ea6 Merge pull request #1774 from fcrisciani/node-leave
Node failure timeout fix
2017-05-22 18:47:14 -07:00
Flavio Crisciani cd6e515854
Node failure timeout fix
The time to keep a node failed into the failed node list
was originally supposed to be 24h.

If a node leaves explicitly it will be removed from the list of nodes
and put into the leftNodes list. This way the NotifyLeave event won't
insert it into the retry list.
NOTE: if the event is lost instead the behavior will be the same as a failed node.

If a node fails, the NotifyLeave will insert it into the failedNodes
list with a reapTime of 24h. This means that the node will be checked
for 24h before being completely forgot. The current check time is every
1 second and is done by the reconnectNode function.
The failed node list is updated every 2h instead.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-22 17:19:31 -07:00
dhilipkumars a82c3f4d9c Initial Checkin GetServices and GetDestinations
Signed-off-by: dhilipkumars <dhilip.kumar.s@huawei.com>
2017-05-20 01:59:44 +05:30
Madhu Venugopal 83e1e49475 Merge pull request #1766 from aboch/spl
Simplify network scope setting logic
2017-05-18 15:20:08 -07:00
Alessandro Boch b9d01ff532 Simplify network scope setting logic
- in driver(), no need to check for isAgent

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-18 15:16:48 -07:00
Sandeep Bansal a35f24ae0b Changes to support ICS network on windows
Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
2017-05-18 13:45:38 -07:00
Madhu Venugopal 1f7a1f11bb Merge pull request #1764 from aboch/isadyn
Restore isAgent || n.dynamic check
2017-05-18 13:12:29 -07:00
Madhu Venugopal 4ce9ec632f Merge pull request #1763 from aboch/sco
Reject scope settings in config-only network
2017-05-18 13:09:42 -07:00
Madhu Venugopal c62ad42b87 Merge pull request #1762 from aboch/nlo2
Do not accept swarm scope network creation if swarm is off
2017-05-18 13:09:19 -07:00
Alessandro Boch caffa143bf Restore isAgent || n.dynamic check
- This got mistakenly changed by 596122e05e

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-18 13:05:34 -07:00
Alessandro Boch 40cfcf9d43 Reject scope settings in config-only network
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-18 09:17:24 -07:00
Alessandro Boch e255d33b70 Do not accept swarm scope network creation if swarm is off
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-18 08:59:52 -07:00
Santhosh Manohar b2bc1a6848 Merge pull request #1675 from wenjianhn/forward-top
Add a filter chain to allow persistent rules
2017-05-16 22:47:59 -07:00
Madhu Venugopal e0d42c083c Merge pull request #1754 from sanimej/dsinfo
Add network inspect -v to the support script
2017-05-16 17:49:50 -07:00
Alessandro Boch c62363b47f Merge pull request #1728 from msabansal/windowspersistence
Added persistence to windows driver so that cleanup happens properly
2017-05-16 14:27:50 -07:00
Sandeep Bansal 081f160bdc Added persistence to windows driver so that cleanup happens properly
Signed-off-by: Sandeep Bansal <sabansal@microsoft.com>
2017-05-16 14:06:43 -07:00
Jacob Wen 0067b3a8ec Add a filter chain to allow persistent rules
Allow users to configure firewall policies in a way that persists
docker operations/restarts. Docker will not delete or modify any
pre-existing rules from the DOCKER-USER filter chain. This allows
the user to create in advance any rules required to further
restrict access from/to the containers.

Fixes docker/docker#29184
Fixes docker/docker#23987
Related to docker/docker#24848

Signed-off-by: Jacob Wen <jian.w.wen@oracle.com>
2017-05-16 10:24:56 +08:00
Madhu Venugopal d1950c50c1 Merge pull request #1758 from aboch/nlo2
Do not reset network scope during store read
2017-05-15 12:50:51 -07:00
Alessandro Boch d9e80627a4 Do not reset network scope during store read
- Unless it is needed

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-15 12:05:56 -07:00
Madhu Venugopal 37e20af882 Merge pull request #1753 from sanimej/bulksync
retry once on a bulk sync failure
2017-05-13 08:46:29 -07:00
Madhu Venugopal 37308a37d9 Merge pull request #1742 from aboch/nlo2
ConnectivityScope capability and configuration networks
2017-05-13 06:21:00 -07:00
Alessandro Boch 755b46861f Adding manager pkg for swarm visible network drivers
- Orchestrator interaction with the network driver is limited
  to at most allocation/release of simple resources. For local scope
  drivers all what is needed is the retrieval of the driver scope.The
  full driver code base does not need to be pulled into the orschestrator.
  This PR introduces a dedicated package in each builtin nw
  driver for that purpose, as it was done for overlay driver.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-12 17:16:54 -07:00
Alessandro Boch 596122e05e Add ConnectivityScope capability for network drivers along with scope network option
- It specifies whether the network driver can
  provide containers connectivity across hosts.
- As of now, the data scope of the driver was
  being overloaded with this notion.
- The driver scope information is still valid
  and it defines whether the data allocation
  of the network resources can be done globally
  or only locally.
- With the scope network option, user can now
  force a network as swarm scoped
  regardless of the driver data scope.
- In case the network is configured as swarm scoped,
  and the network driver is multihost capable,
  a network DB instance will be launched for it.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-12 17:16:34 -07:00
Santhosh Manohar 44e9719c97 retry once on a bulk sync failure
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-05-11 21:13:18 -07:00
Santhosh Manohar 38d455a4b3 Add network inspect -v to the support script
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-05-11 15:04:28 -07:00
Alessandro Boch 16406c8dbd Support configuration networks
- They are configuration-only networks which
  can be used to supply the configuration
  when creating regular networks.
- They do not get allocated and do net get plumbed.
  Drivers do not get to know about them.
- They can be removed, once no other network is
  using them.
- When user creates a network specifying a
  configuration network for the config, no
  other network specific configuration field
  is are accepted. User can only specify
  network operator fields (attachable, internal,...)
- They do not need to have a driver field, that
  field gets actually reset upon creation.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-05-11 11:37:18 -07:00
Madhu Venugopal 6786135bf7 Merge pull request #1735 from fcrisciani/init_race_cond
Fix for swarm init/leave race condition
2017-05-09 18:19:31 -07:00
Santhosh Manohar b015d4b1bc Merge pull request #1747 from fcrisciani/memberlist_version
Remove explicit set of memberlist protocol
2017-05-08 17:30:30 -07:00
Flavio Crisciani 628cf562a0
Remove explicit set of memberlist protocol
Memberlist does a full validation of the protocol version (min, current, max)
amoung all the ndoes of the cluster.
The previous code was setting the protocol version to max version.
That made the upgrade incompatible.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-08 16:58:53 -07:00
Flavio Crisciani 5008b0c26d
Fix for swarm/libnetwork init race condition
This change cleans up the SetClusterProvider method.
Swarm calls the SetClusterProvider to pass to libnetwork the pointer
of the provider from which libnetwork can fetch all the information to
initialize the internal agent.

The method can be and is called multiple times passing the same value,
with the previous logic that was erroneusly spawning multiple go routines that
were making possiblea race between an agentInit and an agentClose.

The new logic aims to disallow it by checking for the provider passed and
ensuring that if the provider is already present there is nothing to do because
there is already an active go routine that is ready to process cluster events.
Moreover a patch on moby side takes care of clearing up the Cluster Events
dispacthing using only 1 channel to handle all the events types.
This will also guarantee in order event handling because now all the events are
piped into one single channel.

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-05-04 15:35:28 -07:00
Alessandro Boch 929077d0db Merge pull request #1733 from fcrisciani/memberlist_bump
Updating memberlist to v0.1.0
2017-04-28 10:13:43 -07:00
Alessandro Boch cace103704 Merge pull request #1739 from fcrisciani/remote_addr
Fix for remote addr parsing
2017-04-28 09:14:19 -07:00
Flavio Crisciani c9912b19e4
Fix for remote addr parsing
Fix initialization of starting vector

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-28 09:10:29 -07:00
Madhu Venugopal 11ca44ede8 Merge pull request #1737 from fcrisciani/remote_addr
Change GetRemoteAddr to return all managers
2017-04-27 19:03:38 -07:00
Flavio Crisciani c517188a56
Change GetRemoteAddr to return all managers
Change in the provider interface to let the provider
return the whole list of managers.
This will allow the netwrok db to have multiple choice
to establish the first adjacencies

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-27 16:58:42 -07:00
Flavio Crisciani 48016c37bc
Vendoring memberlist tag 0.1.0
Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-04-27 13:32:34 -07:00
Madhu Venugopal 5dc95a3f9c Merge pull request #1727 from sanimej/cphard
control-plane hardening: Avoid nDB stale entries
2017-04-25 11:04:13 -07:00
Madhu Venugopal 8e6d850f42 Merge pull request #1724 from aboch/nmd
Make sure sbJoin programming rollback happens on each error
2017-04-25 10:54:22 -07:00
Alessandro Boch 5f62c01f9b Merge pull request #1719 from fcrisciani/data_path
Add the datapath-addr in libnetwork
2017-04-24 13:55:24 -07:00
Santhosh Manohar 1acf40accc Merge pull request #1713 from aboch/nse
On clusterLeave, notify only if there are peers
2017-04-23 16:31:46 -07:00
Alessandro Boch 2133b163de On send node envents, notify only if there are peers
- Otherwise operation will unnecessarely block
  for five seconds.
- This is particularly noticeable on graceful
  shutdown of daemon in one node cluster.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-21 10:19:08 -07:00
Santhosh Manohar 6d514496e5 Avoid nDB stale entries because of intermittent nw issues.
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2017-04-19 14:01:28 -07:00