Commit Graph

23 Commits

Author SHA1 Message Date
selansen d28d679080 Enable IPV6 config on Sandbaox creation on live-restore
In sandbox creation we disable IPV6 config. But this causes problem in live-restore case
where all IPV6 configs are wiped out on running container. Hence extra check has been added
take care of this issue.

Signed-off-by: selansen <elango.siva@docker.com>
2017-12-27 23:32:29 -05:00
Flavio Crisciani 3c1ebfaef9 Add service virtual IP to sandbox's loopback address
Refreshed the PR: https://github.com/docker/libnetwork/pull/1585
Addressed comments suggesting to remove the IPAlias logic not anymore used

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
2017-08-08 16:16:45 -07:00
Derek McGowan 710e0664c4 Update logrus to v1.0.1
Fix case sensitivity issue
Update docker and runc vendors

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2017-08-07 11:20:47 -07:00
Alessandro Boch cddead94d2 Do not manage ipv6 for host mode containers
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-04-07 14:14:26 -07:00
Wolfgang Nagele d07e1a02a4 Support for com.docker.network.bridge.container_interface_prefix label
Signed-off-by: Wolfgang Nagele <mail@wnagele.com>
2017-03-01 03:09:45 +01:00
Alessandro Boch f195563a4e Control IPv6 on container's interface
- Disable ipv6 on all interface by default at sandbox creation.
  Enable IPv6 per interface basis if the interface has an IPv6
  address. In case sandbox has an IPv6 interface, also enable
  IPv6 on loopback interface.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-11-22 15:38:24 -08:00
Alessandro Boch 763f0fa1da Set a timeout on the netlink handle sockets
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-11-15 12:08:36 -08:00
Daehyeok Mun 7f473c779a Refactoring logrus import and formatting
This fix tries to fix logrus formatting by removing `f` from
`logrus.[Error|Warn|Debug|Fatal|Panic|Info]f` when formatting string
is not present.
Also fix import name to use original project name 'logrus' instead of
'log'

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
2016-11-08 12:42:41 -07:00
Madhu Venugopal 25f0573785 Make osl sandbox basepath configurable via execroot.
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-07-18 05:14:39 -07:00
Alessandro Boch 117131c41b Gracefully handle missing xfrm modules
If xfrm modules cannot be loaded:
- Create netlink.Handle only for ROUTE socket
- Reject local join on overlay secure network

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-20 17:25:32 -07:00
Alessandro Boch 8ee94f8349 Make sure sandbox GC is started after live-restore
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-13 23:48:00 -07:00
Alessandro Boch 41ca84c950 Populate nlHandle and use it on netns restore
- also in overlay/encryprion.go

Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-13 23:48:00 -07:00
Lei Jitang 055c5dd496 Add network restore to support docker live restore container
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-06-13 23:48:00 -07:00
Alessandro Boch 6d3fa9e0f2 Migrate libnetwork to use netlink.Handle
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-08 21:05:36 -07: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
Phil Estes 437dfd3a43 Correct perms for directory creation
Directories should be 0755, not 0644

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-09-17 15:19:23 -04:00
Jana Radhakrishnan 0e00550af4 Merge pull request #502 from mavenugo/sbox_uns
Support to provide external key to sandbox
2015-09-09 21:39:48 -07:00
Madhu Venugopal f59502e1bd Support to provide external key to sandbox
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2015-09-09 20:26:37 -07:00
Shijiang Wei aade3e7a92 remove the useless get netns code in createNetworkNamespace
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-09-09 23:21:10 +08:00
David Calavera cc02894a50 Move test specific functions to a testutils package.
This way we won't vendor test related functions in docker anymore.
It also moves netns related functions to a new ns package to be able to
call the ns init function in tests. I think this also helps with the
overall package isolation.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-07 13:33:28 -04:00
David Calavera d216db6ef2 Do not print the word `nil` in a log.
Because it doesn't mean anything.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-02 08:48:45 -07:00
Jana Radhakrishnan bcd996f4c3 Explicitly set namespace for all network operations
Make sure to always explicitly set namespace for all
kernel bound network operations irrespective of whether
the operation is performed in init namespace or a user
defined namespace. This already happens for user defined
netns. But doesn't happen for initial netns that libnetwork
runs in.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2015-09-01 14:00:58 -07:00
Alessandro Boch fd43ee1323 Introduce Sandbox entity
- Maps 1 to 1 with container's networking stack
- It holds container's specific nw options which
  before were incorrectly owned by Endpoint.
- Sandbox creation no longer coupled with Endpoint Join,
  sandbox and endpoint have now separate lifecycle.
- LeaveAll naturally replaced by Sandbox.Delete
- some pkg and file renaming in order to have clear
  mapping between structure name and entity ("sandbox")
- Revisited hosts and resolv.conf handling
- Removed from JoinInfo interface capability of setting hosts and resolv.conf paths
- Changed etchosts.Build() to first write the search domains and then the nameservers

Signed-off-by: Alessandro Boch <aboch@docker.com>
2015-08-27 11:19:02 -07:00