Commit graph

1087 commits

Author SHA1 Message Date
Chun Chen
797c32bcac Clean up docker chain of filter table as well on driver init
Signed-off-by: Chun Chen <ramichen@tencent.com>
2016-01-05 13:02:16 +08:00
Madhu Venugopal
e1bfa95f41 Merge pull request #845 from achanda/regex
Fix regex for IPv6
2015-12-30 09:49:05 -08:00
Madhu Venugopal
830e52935d Merge pull request #818 from aboch/ir
Change isolation rules for multiple bridge networks
2015-12-30 05:29:12 -08:00
Abhishek Chanda
0ce2a2dba0 Fix regex for IPv6
Only match strings which end with ::1

Fixes #830

Signed-off-by: Abhishek Chanda <abhishek.becs@gmail.com>
2015-12-30 00:22:44 +05:30
Alessandro Boch
95f1bcc249 Change isolation rules for multiple bridge networks
- From subnet to interface

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-23 15:45:27 -08:00
Jana Radhakrishnan
36293e4e58 Merge pull request #839 from rosenhouse/fixup-readme
Fix up example code
2015-12-23 15:31:36 -08:00
aboch
4e7cba41d0 Merge pull request #840 from mrjana/bugs
Fix up Godeps and update docker/docker packages
2015-12-23 15:28:12 -08:00
Jana Radhakrishnan
e026deb981 Fix up Godeps and update docker/docker packages
Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-23 15:07:33 -08:00
David Bellotti
921be8b633 Fix up example code
- runs to completion without error
- demonstrates info available when using bridge network driver

Closes #837

Signed-off-by: Gabe Rosenhouse <grosenhouse@pivotal.io>
2015-12-23 11:47:14 -08:00
Madhu Venugopal
c8dcb0340d Merge pull request #817 from aboch/pip
Add support for Endpoint's preferred IPv6 address
2015-12-23 00:03:39 -08:00
Alessandro Boch
2ecc6aa49e Add support for Endpoint's preferred IPv6 address
Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-22 15:48:23 -08:00
aboch
93f00879ed Merge pull request #835 from mrjana/overlay
Don't treat non-nil output as error in ChainExists
2015-12-22 12:39:43 -08:00
Jana Radhakrishnan
9b31fc50ba Don't treat non-nil output as error in ChainExists
ChainExists should not treat non-nil output as
error because there is always going to be some
output while dumping iptable rules.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-22 12:25:47 -08:00
aboch
e5beba7a53 Merge pull request #834 from mrjana/overlay
Check existence of network chain before creating
2015-12-22 11:37:24 -08:00
Jana Radhakrishnan
6cff09f710 Check existence of network chain before creating
We check for existence of all filter rules in
overlay driver before creating it. We should
also do this for chain creation, because even though
we cleanup network chains when the last container
stops, there is a possibility of a stale network
chain in case of ungraceful restart.

Also cleaned up stale bridges if any exist due to
ungraceful shutdown of daemon.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-22 11:22:03 -08:00
aboch
438314977f Merge pull request #831 from chenchun/isolation
Add isolated network option
2015-12-21 18:10:13 -08:00
Chun Chen
59e1e42ce7 Add tests for internal network
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-12-22 09:31:50 +08:00
Chun Chen
186a32acab Add internal network option
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-12-22 09:29:39 +08:00
aboch
28c0e8fb6f Merge pull request #833 from mrjana/overlay
Cleanup vxlan interface by id before creating
2015-12-21 17:12:15 -08:00
Madhu Venugopal
65147f503a Merge pull request #819 from aboch/b6
Bridge driver to honor IPv6 network gateway
2015-12-21 16:53:44 -08:00
Jana Radhakrishnan
66141b879f Cleanup vxlan interface by id before creating
Currently we are cleaning up vxlan interfaces by name
before trying to setup an interface with the same name.
But this doesn't work for properly cleaning up vxlan
interfaces with the same vni, if the interface has a
a different name than the one expected. The fix is to
delete the interface based on vni.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-21 14:55:33 -08:00
Alessandro Boch
30ec1b5081 Bridge driver to honor IPv6 network gateway
- Currently bridge driver discards the user specified
  network gateway for IPv6

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-21 14:00:00 -08:00
Madhu Venugopal
b464d40ce6 Merge pull request #822 from wenchma/18626-add_IpamInfo_func
Add IpamInfo() function to retrun ipamV4Info and ipamV6Info
2015-12-20 19:55:29 -08:00
Madhu Venugopal
b7e5dd8c11 Merge pull request #811 from aboch/dh
Allow remote IPAM driver to express capability
2015-12-18 08:38:27 -08:00
Alessandro Boch
29299b73df Allow remote IPAM driver to express capability
- So that a DHCP based plugin can express it needs
  the endpoint MAC address when requested for an IP address.
- In such case libnetwork will allocate one if not already
  provided by user

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-17 15:41:47 -08:00
aboch
f95f14d77b Merge pull request #821 from mrjana/overlay
Add overlay network support in < 3.16 kernels
2015-12-17 13:21:23 -08:00
Jana Radhakrishnan
bade8d63ae Merge pull request #815 from sammyshj/removedockerinit
Removed dockerinit reference
2015-12-17 12:30:18 -08:00
Jana Radhakrishnan
b7d0fefabc Add overlay network support < 3.16 kernels
Add support for overlay networking in older kernels.

Following were done to achieve this:
    + Create the vxlan network in host namespace.
    + This may create conflicts with other private
      networks so check for conflicts and fail a
      join if there is any conflict.
    + Add iptable based filtering to only allow
      subnet bridges in the same network to forward
      traffic while different network bridges will
      not be able to forward b/w each other. Also
      block traffic to overlay network originating
      from the host itself.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-17 10:17:03 -08:00
Madhu Venugopal
b3ff4d6661 Merge pull request #816 from aboch/ipt
Improve ipam test coverage
2015-12-16 08:33:04 -08:00
Madhu Venugopal
aae361c97a Merge pull request #772 from miguel250/freebsd
Allow libnetwork to compile on freebsd
2015-12-16 03:58:58 -08:00
wenchma
294b858f2c Add IpamInfo() function to retrun ipamV4Info and ipamV6Info
Related to docker/docker#18626

Signed-off-by: wenchma <wenchma@cn.ibm.com>
2015-12-16 17:30:21 +08:00
Alessandro Boch
4cb0d27cf9 Improve ipam test coverage
- Test random de-allocation of allocated addresses
  which is closer to real use case
- Test db reconstruction after read from datastore

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-13 02:43:05 -08:00
Madhu Venugopal
3881fa3063 Merge pull request #814 from aboch/bst
Increase test coverage in bitsequence
2015-12-12 17:25:14 -08:00
Sambuddha Basu
ad95559d74 Replaced reference to dockerinit by dockerenv for func isRunningInContainer()
Signed-off-by: Sambuddha Basu <sambuddhabasu1@gmail.com>
2015-12-12 13:23:40 +04:00
Alessandro Boch
256e15a6fc Increase test coverage in bitsequence
- Cover random allocation/deallocation

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-11 16:32:44 -08:00
Madhu Venugopal
db8f663df0 Merge pull request #807 from LK4D4/fix_copy_mu
Fix mutex copy
2015-12-09 04:35:57 -08:00
aboch
5359d01a51 Merge pull request #679 from clearlinux/master
Update netlink library.
2015-12-07 15:25:06 -08:00
Alexander Morozov
46077fcfb1 Fix mutex copy
If we use peerMap as value, then we copy its mutex on
`pMap = d.peerDb.mp[nid]` and lock entirely different mutexes every
time.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-12-07 14:20:13 -08:00
Jana Radhakrishnan
6769da8387 Merge pull request #802 from aboch/ind
Skip defaultGw check if sandbox is being deleted
2015-12-07 13:41:46 -08:00
Alessandro Boch
158b2852b9 Skip defaultGw check if sandbox is being deleted
- On Sandbox deletion, during Leave of each
  connected endpoint, avoid the default gw
  check, which may create an unnecessary
  connection to the default gateway network.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-12-04 15:09:59 -08:00
aboch
f3f0bb75b8 Merge pull request #707 from rmb938/ipam_allocate_options
Assigning Address driver options
2015-12-04 10:49:36 -08:00
Madhu Venugopal
4bea3796b3 Merge pull request #801 from thaJeztah/update-maintainers
update maintainers file for parsing
2015-12-04 10:09:34 -08:00
Sebastiaan van Stijn
6b81e3a868 update maintainers file for parsing
this updates the MAINTAINERS file to the new format,
so that it can be parsed and collected in the docker/opensource
repository.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2015-12-04 17:04:33 +01:00
Ryan Belgrave
44f532f16e When assigning an address for an endpoint set preferred address and
options.

When requesting a gateway address send a gateway label in the options.

Signed-off-by: Ryan Belgrave <rmb1993@gmail.com>
2015-12-04 00:00:03 -05:00
aboch
405a737a48 Merge pull request #778 from chenchun/disable-default-gateway
Add a network option to disable default gateway
2015-12-03 13:51:43 -08:00
aboch
9deda49cde Merge pull request #681 from LK4D4/speedup_etchosts_delete
Speedup etchosts delete
2015-12-03 11:27:47 -08:00
aboch
fe1b080ef3 Merge pull request #799 from mrjana/bugs
Do not attempt serf query when not initialized
2015-12-03 10:46:03 -08:00
Jana Radhakrishnan
99a68bcc95 Merge pull request #796 from aboch/drt
Don't connect sbx to default gw nw if default static route is provided
2015-12-03 10:35:25 -08:00
Jana Radhakrishnan
eef129c103 Do not attempt serf query when not initialized
Sometimes, the vxlan kernel code may generate miss
notifications for vxlan bound packets when serf is
not initliazed. In such cases we should not try
doing a query as it will create a panic. We should
error out which will generate a log message.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-12-03 10:21:43 -08:00
Chun Chen
141c51273f Add DisableGatewayService in JoinInfo to offering drivers the ability to disable default gateway
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-12-03 12:51:28 +08:00