Commit Graph

14 Commits

Author SHA1 Message Date
Andrew Bonney cdb9fe351d Remove run_as_root which fails without root_helper
It appears that this library is typically run as the root user
which shouldn't require 'run_as_root'. When running as an
unprivileged user the required permissions can be granted by
specifying 'AmbientCapabilities = CAP_NET_ADMIN' in the service,
rather than 'CapabilityBoundingSet'.

An alternative approach would be to specify a 'root_helper' or to
switch to oslo.privsep, but these don't fully solve the problem
as the 'pyroute2' library also requires 'CAP_NET_ADMIN'.

Closes-Bug: #1852105
Change-Id: I9d0942f1cfc06cc3a7585683a030516096297767
2020-12-01 08:32:18 +00:00
Hongbin Lu 2f38e07a38 Add logging for the original message
On port binding/unbinding, Kuryr catches exception raised from
pyroute2 and re-raise a new exception. As a result, the detailed
information contained in the original exception loses. This patch
adds a logging to record the original exception message and trace.

Related-Bug: #1776035
Change-Id: I4b13724a460d84a2b953f750b8b88c0f60cee97d
2018-06-09 22:07:34 +00:00
wanghui 7b2c13592a fix Neutron misspelling
Change-Id: I01e02b1e00fbbd7833f645804e15d25446dadcdf
2018-01-16 13:46:47 +08:00
Hongbin Lu 48e3f4f91d Introduce a SR-IOV binding driver
The driver is for binding/unbinding SR-IOV port. Basically,
what it does is setting the vlan id for the VF interface.

Change-Id: Ife43b57a11c9aac9c0bece84adf719e62f708fda
Partial-Implements: blueprint sriov-binding
2017-10-16 13:45:16 +00:00
Dongcan Ye 0cd6cfa02f Passing port's project_id in port_bind
Only get port's tenant_id if we're in Keystone v2.

Closes-Bug: #1649218
Change-Id: I7cf64183785f9eb04d9f831ec3cc65c2f9ee01f8
2016-12-12 08:48:51 +00:00
Liping Mao 94544eef29 mac and mtu is not configured in macvlan and ipvlan driver
Change-Id: I4e2ab38e32830f58e638c8acf0494b0807d72691
Closes-bug: #1648018
2016-12-07 22:38:40 +08:00
Jenkins 051b7dcc53 Merge "Nested-Containers: vlan driver" 2016-11-29 08:49:10 +00:00
vikaschoudhary16 116052f9db Nested-Containers: vlan driver
Add support to enable isolation of container's traffic within
host(nova instances) using vlan segmentations.

Partially Implements blueprint containers-in-instances
Change-Id: If4800594adfac27a8f30dedac4787d79c8634b65
2016-11-28 14:52:10 +00:00
Jenkins 0fd045d743 Merge "Fix wrong exception catch in port_unbind" 2016-11-24 08:27:20 +00:00
Dongcan Ye 1164fbffc7 Fix wrong exception catch in port_unbind
Change-Id: I902c466c09a9b524af745a159136d647e23ca166
Closes-Bug: #1644136
2016-11-24 10:15:14 +08:00
vikaschoudhary16 1939273877 Fix container port ipaddress setting in ipvlan/macvlan drivers
Currently ipaddress is being set from nova instance port and thus
making vm ip and container ip same. Fix this by using container port
dict for getting container IP.

Another change is renaming 'nested_port', which is actually Nova
instance port, to 'vm_port', for the sake of avoiding ambiguity.

Change-Id: I9ea93c88c2889c5a6b7eff230ffdfb87b96b0e25
Closes-bug: #1641537
2016-11-22 10:21:54 +00:00
Liping Mao d241bbbb2f kuryr bind port error with neutron linux bridge driver
When neutron configured with linux bridge driver, kuryr will bind
port error. The linux bridge name should be "brq"+network_id[0,11].

Change-Id: I07be68bbfe7b1384f4e946664aed41546ff9ddce
Closes-bug: #1638041
2016-11-01 14:57:05 +08:00
Liping Mao 2740f78b9c return key error when start container with kuryr binding veth driver
the veth should be created before we call ip.interfaces[container_ifname].

Change-Id: Ifc56317433f3691841411be63e5e5f5ab56aeacf
Closes-bug: #1631817
2016-10-12 22:20:55 +00:00
Antoni Segura Puimedon 854a8028b6
binding: Add driver based subsystem
This patch introduces a new hierarchy of drivers to perform the port
binding and unbinding in a similar fashion as how it is done with
Neutron plugins.

The initial three drivers are:
* veth: The one that we have been using up until now and that uses
  the usr/libexec/kuryr/* scripts to bind the host side
* ipvlan: L2 ipvlan motivated mostly container-in-vm use cases so that
  the instance interface will have linked devices that get addresses
  of other ports of the same subnet.
* macvlan: bridged mode ipvlan for OSes that do not support vlan.

Co-Authored-by: Louise Daly <louise.m.daly@intel.com>
Implements: blueprint driver-binding-ipvlan
Change-Id: I1d94ab324ab2a65a6d3e782e23ea6c59b110ff67
2016-10-03 12:28:01 +02:00