1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

24 commits

Author SHA1 Message Date
Youfu Zhang
f70a9788c5 drivers/ipvlan: add ipvlan_flag option, support l3s ipvlan_mode
Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
2022-06-28 19:28:49 +08:00
Sebastiaan van Stijn
686be57d0a
Update to Go 1.17.0, and gofmt with Go 1.17
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-24 23:33:27 +02:00
Brian Goff
4b981436fe Fixup libnetwork lint errors
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 23:48:32 +00:00
Brian Goff
00b2c13a1b Fix some windows issues in libnetwork tests
Fix build constraints for linux-only network drivers

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 23:48:23 +00:00
Brian Goff
a0a473125b Fix libnetwork imports
After moving libnetwork to this repo, we need to update all the import
paths for libnetwork to point to docker/docker/libnetwork instead of
docker/libnetwork.
This change implements that.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2021-06-01 21:51:23 +00:00
Arko Dasgupta
76b5905cbe Macvlan: Separate empty parent and internal
https://github.com/docker/libnetwork/pull/2419 and
https://github.com/docker/libnetwork/pull/2407
attempted to seperate out empty parent and internal for
macvlan and ipvlan networks

However it didnt pass the integration tests in moby
https://github.com/moby/moby/pull/40596 and exposed some
more plumbing that needed to be done to make sure
we separate the two things

If the -o parent is empty we create a dummylink
and if internal is set we dont add a default gateway
and make sure north-south communication cannot take place
(only east-west / container-container can)

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2020-03-04 13:24:10 -08:00
Pavel Matěja
c7f8bfa001 Fix internal ipvlan network to work in swarm
Using dummy interface allows communication beween containers only if
they are running on the same node in swarm.

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2020-02-20 19:33:48 +00:00
elangovan sivanandam
a79bbdb5f9 Merge pull request #2415 from arkodg/ipvlan-docker-restart-issue
Support dockerd and system restarts for ipvlan and macvlan networks
2019-07-26 13:04:34 -04:00
Arko Dasgupta
d22824dc11 Move dummyLinkExists into createDummyLink
Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-07-24 17:06:04 -07:00
Arko Dasgupta
ddd22a8198 Support dockerd and system restarts for ipvlan and macvlan networks
This commit carries forward the work done in
https://github.com/docker/libnetwork/pull/2295
and fixes two things
1. Allows macvlan and ipvlan to be restored properly
after dockerd or the system is restarted
2. Makes sure the refcount for the configOnly network
is not incremented for the above case so this network
can be deleted after all the associated ConfigFrom networks
are deleted

Addresses: https://github.com/docker/libnetwork/issues/1743

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
2019-07-15 15:37:21 -07:00
Pavel Matěja
12a182e937 Ipvlan network handles netlabel.Internal wrong
check value of netlabel.Internal not just it's existence

Signed-off-by: Pavel Matěja <pavel@verotel.cz>
2019-07-15 10:15:53 +02:00
Josh Soref
a06f1b2c4e Spelling fixes
* addresses
* assigned
* at least
* attachments
* auxiliary
* available
* cleanup
* communicate
* communications
* configuration
* connection
* connectivity
* destination
* encountered
* endpoint
* example
* existing
* expansion
* expected
* external
* forwarded
* gateway
* implementations
* implemented
* initialize
* internally
* loses
* message
* network
* occurred
* operational
* origin
* overlapping
* reaper
* redirector
* release
* representation
* resolver
* retrieve
* returns
* sanbdox
* sequence
* succesful
* synchronizing
* update
* validates

Signed-off-by: Josh Soref <jsoref@gmail.com>
2018-07-12 12:54:44 -07:00
Chris Telfer
06922d2d81 Use fmt precision to limit string length
The previous code used string slices to limit the length of certain
fields like endpoint or sandbox IDs.  This assumes that these strings
are at least as long as the slice length.  Unfortunately, some sandbox
IDs can be smaller than 7 characters.   This fix addresses this issue
by systematically converting format string calls that were taking
fixed-slice arguments to use a precision specifier in the string format
itself.  From the golang fmt package documentation:

    For strings, byte slices and byte arrays, however, precision limits
    the length of the input to be formatted (not the size of the output),
    truncating if necessary. Normally it is measured in runes, but for
    these types when formatted with the %x or %X format it is measured
    in bytes.

This nicely fits the desired behavior: it will limit the number of
runes considered for string interpolation to the precision value.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
2018-07-05 17:44:04 -04:00
ZhiPeng Lu
9ba57c93b8 Add warning message for the failure of deleting link device
Signed-off-by: ZhiPeng Lu <lu.zhipeng@zte.com.cn>
2018-03-06 16:37:45 +08: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
Lei Jitang
433e3dfe98 Remove driver endpoints on network deleting
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-10-14 10:05:20 +08:00
Jana Radhakrishnan
6fb69f0816 Add driver api enhancements for gossip
With the introduction of a driver generic gossip in libnetwork it is not
necessary for drivers to run their own gossip protocol (like what
overlay driver is doing currently) but instead rely on the gossip
instance run centrally in libnetwork. In order to achieve this, certain
enhancements to driver api are needed. This api aims to provide these
enhancements.

The new api provides a way for drivers to register interest on table
names of their choice by returning a list of table names of interest as
a response to CreateNetwork. By doing that they will get notified if a
CRUD operation happened on the tables of their interest, via the newly
added EventNotify call.

Drivers themselves can add entries to any table during a Join call by
invoking AddTableEntry method any number of times during the Join
call. These entries lifetime is the same as the endpoint itself. As soon
as the container leaves the endpoint, those entries added by driver
during that endpoint's Join call will be automatically removed by
libnetwork. This action may trigger notification of such deletion to all
driver instances in the cluster who have registered interest in that
table's notification.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
2016-04-18 19:55:39 -07:00
Brent Salisbury
2b2d011899 Reject a null v4 IPAM slice in exp vlan drivers
Issue #1018

Signed-off-by: Brent Salisbury <brent@docker.com>
2016-03-13 00:42:00 -05:00
Brent Salisbury
dda75448c3 Removed experimental drivers modprobe check
- Kernel requirements are checked w/o modprobe now

Signed-off-by: Brent Salisbury <brent@docker.com>
2016-03-11 17:00:36 -05:00
Brent Salisbury
fcf79b55ff Bumped ipvlan kernel version to >= 4.2
- ipvlan l2 mode is buggy in < 4.2

Signed-off-by: Brent Salisbury <brent@docker.com>
2016-03-11 14:28:32 -05:00
Madhu Venugopal
64edd40fcc Use osl.InitOSContext appropriately
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-03-10 16:30:10 -08:00
Brent Salisbury
af75e8a624 Added kernel version checks for macvlan/ipvlan
ipvlan >= 4.0.0 due to early instability
macvlan >= 3.9

Signed-off-by: Brent Salisbury <brent@docker.com>
2016-03-10 17:09:48 -05:00
Madhu Venugopal
ed9601e4c6 Make macvlan and ipvlan drivers as experimental
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-03-09 19:43:20 -05:00
Brent Salisbury
ea30113303 Added macvlan and ipvlan drivers
- Notes at: https://gist.github.com/nerdalert/c0363c15d20986633fda

Signed-off-by: Brent Salisbury <brent@docker.com>
2016-03-02 06:22:36 -05:00