Initial implementation
Changes in the mechanism driver:
* Automatically create a port with device_owner=network:dhcp to
serve metadata and eventually DHCP.
* Auto-allocate an IP for the metadata port on subnet creation.
* Push static route for 169.254.169.254 in DHCP options.
* Wait until metadata service is provisioned in the chassis where
a port resides before sending the event to Nova.
Agent:
* Implementation of [0].
Devstack plugin:
* Starts networking-ovn-agent with the proper config files.
* Disables config drive in nova.conf for tempest against master
branch.
* Enables TEMPEST_RUN_VALIDATION for tempest against master branch.
In order to test this patch out we need to make these changes to
nova.conf:
* [DEFAULT] section:
force_config_drive = False
* [neutron] section:
service_metadata_proxy = True
This patch depends on [1] and [2] (already merged into OVS master).
NOTE: Metadata tests are only enabled for the non-voting tempest job
which runs against OVS master branch. The release job runs against
OVS 2.7 which doesn't include [1][2] so those tests are disabled
until OVS 2.8 is released.
[0]
https://docs.openstack.org/developer/networking-ovn/design/metadata_api.html
[1] https://patchwork.ozlabs.org/patch/767369/
[2] https://patchwork.ozlabs.org/patch/771297/
Change-Id: Ife2fd18f2f88050429e70c7e557fa41d2d54b034
This patch is adding the security groups and security group rules
resources to the OVNClient so later we can use it for journaling.
Partial-Bug: #1605089
Change-Id: I452819c95173ca9a653a7557fdd7eeac6e4047d2
This patch enables pylint 1.4.5 checking in netwoking-ovn.
Script tools/coding-checks.sh is copied from neutron and adapted for
networking-ovn.
.pylintrc is also copied from neutron, message options that do not
need to be suppressed have been removed and some of remaining options
will be removed by code adjustment in separate patches.
Change-Id: I9e1612583debb555199b416675eea6685801f04c
The well known service type constants are in
neutron_lib.plugins.constants, but for legacy reasons a few still exist
and are referenced from neutron_lib.constants [1] that we'd like to
remove.
This patch switches references over to neutron_lib's plugin constants.
[1] https://github.com/openstack/neutron-lib/blob/master/neutron_lib/constants.py#L353
Change-Id: I8b5141f952b3500c7a4ce9c36e07a04630a5e44f
Logs are full of [POLLIN] messages from ovsdb and most of the times
they're not really useful. This patch introduces a new configuration
option 'ovsdb_log_level' which can be set independently from whatever
log level is configured in networking-ovn.
The default log level for OVSDB will be now 'INFO' and it will make
normal debugging tasks easier.
Change-Id: I1150cb72b619793fb7c0948cb5643e7ee9ff6b63
This patch removes two traces that used to be useful during
development to detect when a process had the lock to handle a
notification. Since IDL will call notify() for every "update" rpc
method it receives from ovsdb-server, this trace can be quite frequent
and noisy.
In a normal tempest execution in gate it has around a 7% (~6500
occurences) of the total log entries.
Change-Id: I4d2a0be86f07b55d631bacf21d090635625a8ec6
Basically, we only need to bind the first valid segment,
so we should jump out of the for loop when set_binding in bind_port()
Change-Id: I4939d911b48069ea925736b67dee1fbb01c3bf2a
networking_ovn/common/utils.py:136: DeprecationWarning: Using function/
method 'instance.ugettext()' is deprecated: Builtin _ translation
function is deprecated in OpenStack; use the function from _i18n module
for your project.
msg = _('Invalid binding:profile. %s are all '
Change-Id: Ib53dd98da6bce42e10bbb339c1772956cbe4c760
Preliminary patch adding the base for creating a journal and maintenance
threads.
This approach is heavily based on the journaling from networking-odl
but made generic so that both projects (potentially others too) could
share code by moving it to neutron-lib.
Next patches will add usage for it.
Partial-Bug: #1605089
Change-Id: I687f5af1583e139f4dce59238f065d61762869de
This patch is adding the network and subnet resources from the ml2
driver into OVNClient so later in this series of patches they can make
use of journaling.
Related-Bug: #1605089
Change-Id: I8477c246628711111c16f801c3dfad601eae9ba1
This patch is installing the SSL dependencies (libssl-dev/openssl-devel)
before compiling OVS when running the functional tests in the gate.
Without those packages OVS will be compiled without SSL support and will
cause the tests to fail in the gate.
Closes-Bug: #1696713
Change-Id: I42c9125ddd2ae1fa024732fed9b08f44617148f8
This patch supports subnet DHCP enabling and disabling and gracefully
subnet updating by comparing new DHCP options with old lsp DHCP options.
Change-Id: I947c20c93ac134f3a78289211e1ad6510ab5d4c6
Closes-Bug: #1682355
Signed-off-by: Dong Jun <dongj@dtdream.com>
This will automatically give nested transaction support and will
make it easier when moving this code into ovsdbapp.
The OvsdbSbOvnIdl class didn't currently have the ability to
create transactions, presumably because the code currently treats
the SB DB as read-only. In the test code, though, many hoops are
jumped through to create a "fake" API so that a Chassis can be
added for test purposes. In a generic implementation of a SB API,
read and write operations will be added, so we might as well go
ahead and add this now.
Change-Id: I9820ef9de7a35a8287e1c14c122d9584c9c1e8cf
This patch contains the skeleton for migration scripts which will later
be used as base for introducing new database tables for networking-ovn.
Partial-Bug: #1605089
Change-Id: Ie5b62bdb40e46b1856ac67a9519dbbf417c05784
Right now we have code doing CRUD operations on ONV resources spread
around different places (ml2/mech_driver.py, l3/l3_ovn.py), this makes
things very complicated to implement something like journaling (see
bug: #1605089) where all resources, L2 and L3, are created from a
central place (the journal thread, which keeps things in order).
This patch is adding a new class called OVNClient which centralizes all
the CRUD operations for the OVN resources in one place.
For this first iteraction, the Port resource from the mechanism driver
and the L3 resources (floating ip, routers and routers ports) are being
moved to this new class, others will come in follow up patches.
Related-Bug: #1605089
Change-Id: Ia453a14cdc2ec393037fb813caff8fae23acd7c3
neutron-lib 1.6 is out and among other things contains the rehomed
NeutronWorker class; now named BaseWorker in neutron-lib. This patch
updates references to use the lib version.
Change-Id: Ifc0ecf6d5d3d4f8c406caad233d3648646724b12
Remove sleep in _sync() and do this delay when spawning greenthread,
then _sync() can be renamed to a callable method.
There are a few benefits, sync caller can simply call do_sync() instead of
sub-functions, and adding new sync sub-functions such as trunk, qos will
be simplified too,
Change-Id: I7b8acb9de0d2085443ac77c57fa4835f93241c55
Signed-off-by: Dong Jun <dongj@dtdream.com>
After patch [1] merged, BEFORE_UPDATE event is no longer needed, and
routes operations can be move to one transaction to make them atomic.
This patch also changes method name to _subnet_update.
[1] https://review.openstack.org/#/c/464775/
Change-Id: I08b1a149df69efc7786b59a6595141ea51b49e2d
Closes-Bug: #1691422
Signed-off-by: Dong Jun <dongj@dtdream.com>
This:
1. replaces neutron.agent.ovsdb imports wih ovsdbapp imports.
2. Connection takes an idl instance due to removed deprecated
arguments in ovsdbapp
3. Ovsdb{N,S}bIdl classes are initialized with a connection
since driver/trigger options are networking-ovn specific
4. The Connection subclasses are removed as get_schema_helper
is no-longer Open_vSwitch-schema specific and ovsdbapp's
Connection.start has been modified to handle post_initialize
(which is no post_connect).
TODO:
1. Release an ovsdbapp with the necessary changes so CI will pass
Change-Id: I12260e60e40399f996d5f2ff4ddb7b65fdaebb95
Depends-On: Ie6dc0b75fc7c5ae00afc03e274f293b69d897913
SUBNET_GATEWAY isn't a real resource (it's just a subnet attribute)
so we are trying to get rid of it and switch to SUBNET everywhere it was
used.
Depends-On: Id2d20bef43ff82f5698e826d391ce4480d729b27
Change-Id: I73aeb7c87413f5d714f6a108b59d280700527dab
Partial-Bug: #1690944
neutron-lib 1.6.0 is out and among other things contains the rehomed
extra_dhcp_opt API definition. This patch switches usage of such
references from neutron to neutron-lib.
Change-Id: If1112a56dacf0f791d5cba24f3349ee73b8ac007
neutron-lib 1.6.0 is out and among other things contains the rehomed
is_port_trusted function. This patch switches usage of that function
from neutron to neutron-lib.
Change-Id: I817ec32030244bca4839c9c5c1308ef90dd0e9e8
The ml2 MechanismDriver is now in neutron-lib along with its associated
constants. This patch switches over to the lib versions of those.
Change-Id: Ifd44f44551f4133f745283c6e3aceb7ebee671a3
networking_ovn/common/acl.py:50: DeprecationWarning: Using function/method
'instance.ugettext()' is deprecated: Builtin _ translation function is
deprecated in OpenStack; use the function from _i18n module for your project.
Change-Id: Ic74eff89bb3abafb262114ccba2b6886435e51da
Signed-off-by: Dong Jun <dongj@dtdream.com>
The port security API definition has been in neutron-lib for awhile.
This patch consumes the definition from neutron-lib.
See If43b65861efc536d01c43dc0d2bbcbcf062c1271 for additional details.
Change-Id: If0c50f1a79d151217e92025f444cd22a40e4f420
Multi physnets can map to a same OVS bridge in OVN South bound DB, this
is reasonable configuration, but there is a ValueError in
helpers.parse_mappings() as following.
ValueError: Value br-ex in mapping: 'public2:br-ex' not unique
This patch fixes this bug.
Change-Id: Id6e2ec0328e9026716595d366453a4f319ee5754
Signed-off-by: Dong Jun <dongj@dtdream.com>