Commit Graph

1296 Commits

Author SHA1 Message Date
839d918e35 lo: CNI_IFNAME is no longer ignored
{
    "code": 4,
    "msg": "interface name contains / or : or whitespace characters"
}

Signed-off-by: Dan Williams <dcbw@redhat.com>
2020-08-05 14:23:06 -05:00
c50490eb76 cni: bump to 0.8.0
Signed-off-by: Dan Williams <dcbw@redhat.com>
2020-08-05 14:12:09 -05:00
01a8de9997 Bump Go version to 1.13 and 1.14
Signed-off-by: Dan Williams <dcbw@redhat.com>
2020-08-05 14:12:09 -05:00
d713ec692c Merge pull request #513 from mars1024/firewall_docs
firewall: fix some typos in docs
2020-07-22 10:07:06 -05:00
813f541d30 firewall: fix some typos in docs
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2020-07-22 19:38:24 +08:00
6eb8e31d21 Merge pull request #509 from aojea/portmapDel
portmap should not perform deletions if not portMapping config received
2020-07-15 16:24:35 +01:00
877602d627 portmap DEL noop if no portMappings present
if the runtime is not passing portMappings in the runtimeConfig,
then DEL is a noop.

This solves performance issues, when the portmap plugin is
executed multiple times, holding the iptables lock, despite
it does not have anything to delete.

Signed-off-by: Antonio Ojea <aojea@redhat.com>
2020-07-13 12:43:12 +02:00
c90b165c6e Merge pull request #506 from dcbw/fw-admin-chain-comment
firewall: fix generate of admin chain comment
2020-07-08 09:50:41 -05:00
28773dc925 Merge pull request #501 from aneeshkp/dhcp-timeout
Fix handling of delay in acquiring lease with stp turned on
2020-07-01 16:46:06 +01:00
2bd04cb92f firewall: fix generate of admin chain comment
Signed-off-by: Dan Williams <dcbw@redhat.com>
2020-07-01 10:38:12 -05:00
d4775ecff5 Fix handling of delay in acquiring lease with stp turned on
Signed-off-by: Aneesh Puttur <aneeshputtur@gmail.com>
2020-06-29 13:15:00 -04:00
e1f8f9bee5 Merge pull request #503 from ashish-billore/master
Update README.md
2020-06-24 17:41:35 +02:00
68a80bcf9b Update README.md
Updated "Notes" for minor fixes.
2020-06-19 15:39:28 +09:00
1fb9793607 Merge pull request #487 from aojea/pmapHostIp
portmap: don't use unspecified address as iptables rule destination
2020-06-03 17:14:37 +02:00
5cb3a5e897 portmap: don't use unspecified address as destination
It may happen that you want to map a port only in one IP family.
It can be achieved using the unspecified IP address of the
corresponding IP family as HostIP i.e.:

podman run --rm --name some-nginx -d -p 0.0.0.0:8080:80 nginx

The problem is that current implementation considers the
unspecified address valid and appends it to the iptables rule:

-A CNI-DN-60380cb3197c5457ed6ba -s 10.88.0.0/16
-d 0.0.0.0/32 -p tcp -m tcp --dport 8080 -j CNI-HOSTPORT-SETMARK

This rule is not forwarding the traffic to the mapped port.

We should use the unspecified address only to discriminate the IP
family of the port mapping, but not use it to filter the dst.

Signed-off-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2020-05-27 22:39:00 +02:00
b76fdd7c03 Merge pull request #486 from Metaswitch/bring-down-interfaces
host-device: Bring interfaces down before moving.
2020-05-27 17:37:31 +02:00
67175607ad Merge pull request #480 from clinta/macvlan-mac
macvlan: set mac address from args
2020-05-27 17:33:30 +02:00
b9560fd5c1 macvlan: set mac address from CNI_ARGS
This change sets the mac address if specified during the creation of the
macvlan interface. This is superior to setting it via the tuning plugin
because this ensures the mac address is set before an IP is set,
allowing a container to get a reserved IP address from DHCP.

Related #450

Signed-off-by: Clint Armstrong <clint@clintarmstrong.net>
2020-05-20 13:58:38 -04:00
cns
79192cb1f1 host-device: Bring interfaces down before moving.
When trying to move a master and slave interface into a container it is not
possible without first bringing the interfaces down. This change ensures
that the interface is set to down prior to trying to move the interface
into the container. This matches the behaviour on moving an interface out
of the container.

Signed-off-by: cns <christopher.swindle@metaswitch.com>
2020-05-17 20:46:43 +01:00
ad10b6fa91 Merge pull request #484 from squeed/disable-ra
ptp, bridge: disable accept_ra on the host-side interface
v0.8.6
2020-05-13 09:43:58 +02:00
219eb9e046 ptp, bridge: disable accept_ra on the host-side interface
The interface plugins should have absolute control over their addressing
and routing.

Signed-off-by: Casey Callendrello <cdc@redhat.com>
2020-05-12 15:54:23 +02:00
f7a2fc97e4 Merge pull request #460 from timyinshi/windowcontainer-new
modify the error url of windowscontainer
2020-04-29 16:58:32 +01:00
6957f6ca4e Merge pull request #479 from Nordix/issue-478
plugins/meta/sbr: Adjusted ipv6 address mask to /128
2020-04-29 17:15:54 +02:00
02bfece2e9 plugins/meta/sbr: Adjusted ipv6 address mask to /128
A /64 mask was used which routed an entire cidr based on source,
not only the bound address.

Fixes #478

Signed-off-by: Lars Ekman <lars.g.ekman@est.tech>
2020-04-28 16:38:35 +02:00
5af9ff493e Merge pull request #469 from AlbanBedel/portmap-hairpin-subnet
portmap: Apply the DNAT hairpin to the whole subnet
2020-04-22 17:22:14 +02:00
44d92c19de Merge pull request #475 from vboulineau/vboulineau/hostport_windows
win-bridge: add support for portMappings capability
2020-04-22 17:11:25 +02:00
5e0fbd8374 portmap: Apply the DNAT hairpin to the whole subnet
The DNAT hairpin rule only allow the container itself to access the
ports it is exposing thru the host IP. Other containers in the same
subnet might also want to access this service via the host IP, so
apply this rule to the whole subnet instead of just for the container.

This is particularly useful with setups using a reverse proxy for
https. With such a setup connections between containers (for ex.
oauth2) have to downgrade to http, or need complex dns setup to make
use of the internal IP of the reverse proxy. On the other hand going
thru the host IP is easy as that is probably what the service name
already resolve to.

Signed-off-by: Alban Bedel <albeu@free.fr>
--
v2: Fixed the tests
v3: Updated iptables rules documentation in README.md
v4: Fixed the network addresses in README.md to match iptables output
2020-04-17 16:27:57 +02:00
a78853f29f Support device id in host device plugin (#471)
* Add support for `deviceID` runtime config attribute

Signed-off-by: Adrian Chiris <adrianc@mellanox.com>
2020-04-15 10:45:14 -05:00
2d2583ee33 win-bridge: add support for portMappings capability
If the pluging receives portMappings in runtimeConfig, the pluing will add a NAT policy for each port mapping on the generated endpoints.
It enables HostPort usage on Windows with win-bridge.

Signed-off-by: Vincent Boulineau <vincent.boulineau@datadoghq.com>
2020-04-15 15:01:32 +02:00
f4332fec59 Merge pull request #468 from hongli-my/fix-port-state
check bridge's port state
2020-04-08 11:58:56 -04:00
ed16760739 Merge pull request #472 from ahenan/master
Reset the route flag before moving the rule
2020-04-08 17:55:59 +02:00
30776ff858 check bridge's port state
fix #463
link host veth pair to bridge, the Initial state
of port is BR_STATE_DISABLED and change to
BR_STATE_FORWARDING async.

Signed-off-by: honglichang <honglichang@tencent.com>
2020-04-08 14:15:50 +08:00
2a48d68937 Reset the route flag before moving the rule
Signed-off-by: ahenan <ahenan00@gmail.com>
2020-04-06 17:12:45 +02:00
117e30ff21 Merge pull request #458 from mars1024/remove/jujuerrors
replace juju/errors because of CNCF license scan
2020-04-01 18:01:32 +02:00
486ef96e6f [DO NOT REVIEW] vendor upate to remove useless dependencies
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2020-03-17 14:30:28 +08:00
8a0e3fe10e build error utility package to replace juju/errors
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2020-03-11 20:33:21 +08:00
ca419073e4 modify the error url of windowscontainer
Signed-off-by: root <timyinshi>
2020-03-05 09:38:33 +08:00
47a9fd80c8 Merge pull request #455 from booxter/master
Unlock OS thread after netns is restored
2020-03-04 11:34:44 -05:00
112288ecb2 Unlock OS thread after netns is restored
The current ns package code is very careful about not leaving the calling
thread with the overridden namespace set, for example when origns.Set() fails.
This is achieved by starting a new green thread, locking its OS thread, and
never unlocking it. Which makes golang runtime to scrap the OS thread backing
the green thread after the go routine exits.

While this works, it's probably not as optimal: stopping and starting a new OS
thread is expensive and may be avoided if we unlock the thread after resetting
network namespace to the original. On the other hand, if resetting fails, it's
better to leave the thread locked and die.

While it won't work in all cases, we can still make an attempt to reuse the OS
thread when resetting the namespace succeeds. This can be achieved by unlocking
the thread conditionally to the namespace reset success.

Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com>
2020-02-20 17:24:36 -05:00
32fc3ee9d3 Merge pull request #454 from dcbw/update-coreos-owners
owners: updates for maintainer changes
2020-02-19 17:29:54 +01:00
c7e2cf7602 owners: updates for maintainer changes
Add Michael Cambria per https://github.com/containernetworking/cni/pull/751
Remove Stefan Junker per personal request
Update Casey's email to @redhat.com

Signed-off-by: Dan Williams <dcbw@redhat.com>
2020-02-19 10:23:21 -06:00
5c512194eb Merge pull request #453 from Nordix/nfvi_virtio
Make host-device to work with virtio net device
2020-02-18 11:22:03 +01:00
a9b4e04bc4 Make host-device to work with virtio net device
In case pciBusID contains pci address of the virtio device,
then lookup the net directory under virtio<id> directory.

Issue: https://github.com/containernetworking/plugins/issues/320

Signed-off-by: Periyasamy Palanisamy <periyasamy.palanisamy@est.tech>
2020-02-11 18:05:37 +01:00
f5c3d1b1ba Merge pull request #443 from mars1024/bugfix/black_box_test
pkg/utils: sysctl package should use black-box testing
2020-01-29 17:26:04 +01:00
8bf6a7b362 Merge pull request #444 from mars1024/bugfix/ptp_redundant
ptp: remove some redundant lines
2020-01-29 10:23:06 -06:00
66e0aaf9c1 Merge pull request #445 from mars1024/bugfix/link_del
pkg/ip: use type cast instead of untrusty error message
2020-01-29 10:20:32 -06:00
45fd949465 ptp: remove some redundant lines
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2020-01-29 20:17:01 +08:00
2ff84a481e pkg/ip: use type cast instead of untrusty error message
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2020-01-29 20:03:15 +08:00
37207f05b4 pkg/utils: sysctl package should use black-box testing
Signed-off-by: Bruce Ma <brucema19901024@gmail.com>
2020-01-27 21:09:04 +08:00
832f2699c2 Merge pull request #442 from ofiliz/loopback-fix
loopback: Fix ipv6 address checks
2020-01-27 09:38:52 +01:00