Commit Graph

2331 Commits

Author SHA1 Message Date
Sean McGinnis 7839f35ca3
Retire repo
This patch completes step 2 of the infra project retirement process
found here:

https://docs.opendev.org/opendev/infra-manual/latest/drivers.html#step-2-remove-project-content

Reference:

http://lists.openstack.org/pipermail/openstack-discuss/2020-June/015600.html

Depend-on: https://review.opendev.org/737566

Change-Id: Id3a5477860323547a4e17155061f597a8c96640b
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-23 10:49:40 -05:00
Zuul 4dc36ed649 Merge "Do not use yaml.load(file)" 2019-08-13 08:00:52 +00:00
Omer Anson fc38995de3 Fix pubsub topic encoding
Change-Id: Id132b7bfbdb7a51f4de3635fe6af8d102ff5d0cc
2019-08-12 20:54:19 +00:00
Shachar Snapiri c5d4f07a74 Do not use yaml.load(file)
Now a Loader is required, as the default loader is considered unsafe.
See [1] for details.

[1] https://msg.pyyaml.org/load

Change-Id: I08af1afd6df097fab33701db89c656ebfe981b30
2019-08-12 20:53:58 +00:00
Shachar Snapiri a1498f951f Fix DF broken gate
This commit is a squash of 3 different commits required to fix
DragonFlow gate (See below).

Upgrade redis driver

Redis python package API was changed over time, while we did not
change our handling of the code.
In the gate the driver was updated, and the gate tests were broken.
Updated the code in a way that supports both python2 (soon to be
obsoleted) and python3.
Updated the requirements to install new versions of the packages.

Remove testing revision number in test_df_qos_driver

This code tests Neutron behaviour of increasing the revision number.
This is not code that is controlled by Dragonflow. If (when) it fails,
Dragonflow cannot fix it generically.

use payloads for ROUTER_GATEWAY events

This patch switches the code over to the payload style of callbacks [1]
for ROUTER_GATEWAY events for those that are not using them yet.
The unit tests are also updated where needed to account for the
payload style callbacks and publish() method. Finally the patch
normalizes the passing of gateway IPs which are currently referred to
as 'gw_ips' and 'gateway_ips' depending on the event; now all events use
'gateway_ips'.

Depends-On: https://review.opendev.org/#/c/638274/

[1] https://docs.openstack.org/neutron-lib/latest/contributor/callbacks.html

Co-Authored-By: Omer Anson <omer.anson@toganetworks.com>
Co-Authored-By: boden <bodenvmw@gmail.com>

Change-Id: I5cd456028ed8af86c6c512e514eb91cec56ea77c
2019-08-12 23:52:20 +03:00
Shachar Snapiri a9fccaa38c Update DragonFlow tests to run with Python 3
As Python 2.7 will soon reach the end of life, we should switch to
Python 3.
This updates the tests to run with that version.

Change-Id: I1014769881786c62d9d6aabf21ca7858a6deb882
2019-05-16 17:01:59 +03:00
Shachar Snapiri d622410892 Update the gate hooks to install proper docker package
The way gate_hook.sh tries to find the proper package to install is
sub-optimal, and misses in case there is another package containing the
package name as a substring.
Updating the file to work the same way as in [1].

[1] c27bb1f190

Change-Id: I726f993ef9d593f13abef55fca6cc2c0a2d353c7
2019-05-12 21:34:09 +03:00
Boden R cdcd620791 use trunk constants from neutron-lib
The trunk constants live in neutron-lib now. This patch switches over
to them in prep for https://review.openstack.org/#/c/649672/

Change-Id: I072b28a2e7c6466912f5a2f7f3f8e303a70cef8a
2019-04-05 10:21:41 -06:00
Omer Anson e077ff987d Add a packet logger application
Add an application which logs the data and metadata
of every packet received to the log file.

Change-Id: I665c03c9bdf9f00f9c734ae355336396e15bd27b
Closes-Bug: #1815886
2019-03-21 07:48:16 +00:00
Omer Anson b8fb4de2f6 Clear registered table handlers on datapath set_up
Datapath set_up overwrites old applications with new applications
(usually of the same type). If any of these applications registered
a table handler - upon reconnect, this table handler will already
be registered and that would raise an Exception.

This change clears table handlers of old applications. Only new-type
applications should be affected (legacy-type apps should remain the same).

Change-Id: I356758175e9816d57d2831c34f35df8e69cafbcf
Closes-Bug: #1820533
2019-03-21 07:45:00 +00:00
Omer Anson 65ebe3a52f Defend agains exceptions in application initialisation
Application initialisation code (as found in initialize function)
can raise an exception, which would break entire pipeline set-up.

This fix catches and logs the exception. The application is not
removed - it can continue to work on a best-effort basis.

TrivialFix

Change-Id: I5c2f00578ba5208ab7fed4441e4919cd3d71ae34
2019-03-21 07:44:02 +00:00
Shachar Snapiri 8fd27641b0 Fix broken dragonflow gates
This commit is composed of 4 (four) commits that fix various aspects
that were broken in the gate.

Co-Authored-By: Omer Anson <omer.anson@toganetworks.com>

Bump up the version of libzmq for Ubuntu and Suse

This is required as libzmq1 is no longer supported under these
platforms.

Change-Id: I17c73025856c006926ea6b2444c4fde86726db9d

Install ruby via the operating system

As opposed to installing it from source, success of which is a matter of
chance.

Change-Id: I39f13525d9b1d814c90ac898148b9543ed64cd7e

Cleanup registered apps with os-ken

Otherwise, os-ken complains that the apps are already
instantiated. This might be causing the get failure.

Change-Id: Iad8f76aafe98be443b0efa34e2f9cef8f40a9588

Disable test TestNeighborAdvertiser

It isn't working. Reported in bug 1820977.

Change-Id: Ie1f9c05c3847320ba1892c52182d3e7d856f4957
Related-Bug: #1820977
2019-03-20 14:23:46 +02:00
Boden R 980b4a79f1 fix unit tests
With the introduction of [1] into neutron, the revision number of a
created router is now 1 and not 0. The dragonflow code is expecting 0
today and thus 3 unit tests fail due to this.

This patch updates to the tests to expect the revision number to be 1
rather than 0 as per [1].

[1] https://review.openstack.org/#/c/635671/

Change-Id: I8d16fada6972854719d9023dd79915820a73ff3b
2019-02-27 09:16:26 -07:00
Boden R 5bb32a58ae stop using common db mixin
All of the methods of common db mixin are available via neutron-lib
and the mixin will be removed before long.
This patch switches the code over to use neutron-lib's APIs rather
than those of the mixin and stops using common_db_mix for parent
classes.

Change-Id: I13e88997f6043162c5feeaa339820f4efa37ee03
2019-02-11 08:30:09 -07:00
Omer Anson 8976a2cf9e Add exitpoint for legacy classifier app
Classifier app currently sends the packet directly to portsec
app. This is Bad. As described in the bug, metadata stored in
registers can be lost.

This change adds a classifier exitpoint table, and classifier
app sends the packets there. The datapath wiring then sends
the packet to the portsec app (if so configured).

This is important, since sometimes the datapath code allocates different
registers to the same metadata accross different applications, and registers
are moved. Skipping this behaviour causes errors.

Closes-Bug: #1815416
Change-Id: I38f14e8faa45e4ef3740bdbee78bd493f6d602ab
2019-02-11 09:36:38 +02:00
Shachar Snapiri 8f0e67da2e Stop using a hardcoded cirros image name
In the tests we have the cirros image name hard-coded.
This requires us to update it every time the test image is updated.
Instead, now we list the images and take the first one (which is safe enough for
the circumstances).
Anyway, if a specific image is required, it may still be requested in the
'vm_image' argument.

Change-Id: I0aae2a01ca5fd67bd828bb8daf6df466c60acff2
2019-02-06 06:33:32 +00:00
Shachar Snapiri f1788f3ac6 Update cirros image version
The current cirros image version is 0.4.0.
As we have the image name hard-coded, it is required that we update it manually.
See [1] for reference.

[1] https://review.openstack.org/#/c/521825/

Change-Id: I99a49975c5674991d84932ebd2c7ab6599d343ea

Migrate Dragonflow from Ryu to os-ken

This change causes Dragonflow to stop consuming Ryu in favor of os-ken.
os-ken becomes the reference implementation for BGP services and
Dragonflow no longer has a dependency on Ryu.
See [1] for reference in Neutron.

[1] https://review.openstack.org/607008/

Change-Id: Ifbf294f2f586cf765d20cfa60774c45aa735ca62

Force delete of VM on close

There are tests that fail because we are waiting for the VM to complete shutdown
In tests, we do not mind destroying the machine forcefully as there is no reason
to wait for it.

Change-Id: I5f8e4928ceb7b467af891835600cd8096ec88d2b

use payloads for SECURITY_GROUP BEFORE_DELETE events

This patch switches over to the payload style callbacks for
BEFORE_DELETE events of SECURITY_GROUP resources.

Co-Authored-By: Boden R <bodenvmw@gmail.com>
Depends-On: https://review.openstack.org/#/c/597599/
Change-Id: Ie9163ad7baecf85e234e4253160f30015b43166b
2019-02-05 11:31:44 +02:00
Zuul 18710ca010 Merge "Fix the misspelling of "default"" 2019-01-13 18:08:30 +00:00
lijunjie 42bf362d27 Fix the misspelling of "default"
Change-Id: I3ed83f236b31dba3589306b24a80e044ad7c315f
2019-01-10 17:14:00 +08:00
lijunjie 8d9c367780 Fix the misspelling of "interface"
Change-Id: I7d31ec78de5422fbb408bcda215953b4886391c2
2019-01-07 11:05:24 +08:00
Zuul b1e6055c7d Merge "Added create and update hooks to version mixin" 2018-12-20 16:57:25 +00:00
Shachar Snapiri 7c4a297080 Fix exception in df-db under Python3
Exception is thrown when running df-db dump with Python3

Change-Id: I8b5b7715a429150f1e12277e066d24c8ea0039a3
Closes-Bug: #1808295
2018-12-18 18:18:48 +00:00
Shachar Snapiri 11cf7741cd Added create and update hooks to version mixin
Objects using the version mixin will now have the version automatically
added or updated in the create and update hooks respectively.

Change-Id: I198eb89b45f0f16abb97611b8e43c106e24b9b49
Closes-Bug: #1808331
Co-Authored-By: Omer Anson <omer.anson@toganetworks.com>
2018-12-18 18:18:00 +00:00
Shachar Snapiri f016d8433f Fix lower_constraints - six verison should be bigger
Builds fail due to autobahn using newer six package.
We should use version 1.11.0 instead of 1.10.0.

GateFix: Fix the scenario test gates

We use a hardcoded string to describe the test image name.
A recent patch[1] changed the deployed image to
cirros-0.3.6-x86_64-disk. This change updates the hard-coded string.

A future patch may add this to configuration. This patch is to fix the
gate.

[1] https://review.openstack.org/624716

Change-Id: If174ec2e8999fa824e2cc7938d1e7441864efecd
2018-12-18 13:56:29 +02:00
Zuul 7582830508 Merge "Add table name to the schema objects" 2018-12-11 17:38:25 +00:00
Shachar Snapiri 7293abc01a Add table name to the schema objects
Every object now has an attribute with the name of the table holding it.
the attribute for it is x-table-name

Change-Id: I2c86c5dc068ed9a408cf2ffbf917f21c9e16fafe
2018-12-10 18:03:29 +02:00
Shachar Snapiri b61ac21d6a Fix POST and PUT methods of REST API
The json attribute was taken from the wrong object, so we got an error
for every POST or PUT request.
   AttributeError: module 'bottle' has no attribute 'json'

Change-Id: Id32e6b0f227ef0f3bde91feac7269635c051e123
2018-12-10 17:27:34 +02:00
Zuul ca688e4290 Merge "Revert "Temporarily remove failing unit test"" 2018-11-19 12:19:24 +00:00
Omer Anson 094df9e2e5 Revert "Temporarily remove failing unit test"
This reverts commit c7fcf45b99.
The requirements and lower-constraints were updated to use the libraries
that fix the issue that caused us to exclude this test.

Change-Id: I07dd917f2dcb23ee43056086762bd9e828ec2310
2018-11-15 16:34:00 +02:00
Omer Anson 1808a2cbfd Allow simple REST API container deployment
* Add verbs to container entrypoint

* Have REST API serve the schema JSON

* Add documentation explaining how to deploy

Co-Authored-By: Shachar Snapiri <shachar.snapiri@toganetworks.com>
Change-Id: I243130a219d3e9e96bf87d39693e600ea4b627a2
Partially-Implements: blueprint add-dragonflow-api
2018-11-11 14:32:07 +00:00
Omer Anson bd037320f2 Add REST API service
Usage documentation will follow.

Partially implements, since authentication is not yet supported.

Co-Authored-By: Shachar Snapiri <shachar.snapiri@toganetworks.com>
Change-Id: Ic9a69baf33d5bed4c35f89d45c8acfd3129e5d03
Partially-Implements: blueprint add-dragonflow-api
2018-11-11 15:59:09 +02:00
Omer Anson 0b07ac529b Generate valid JSON schema for OpenAPI
Fix various issues with the generated JSON schema, making it compatible
with OpenAPI 3.0.

Validated by http://editor.swagger.io/

Co-Authored-By: Shachar Snapiri <shachar.snapiri@toganetworks.com>
Change-Id: I5048ad2a23cf053d293dcfbb027a48d8090f5fd2
Partially-Implements: blueprint add-dragonflow-api
2018-11-11 15:56:15 +02:00
Zuul f152be2edd Merge "failed to get vm mac" 2018-11-11 07:20:42 +00:00
Hong Hui Xiao 9b1dff1f6a Downgrade unnecessary warning in TunnelingApp
When adding a FLAT network lport, the warning will show up,
even if everything is fine.

Change-Id: I589bb8775e07674091ae2b212ba25b75b2564264
2018-11-09 10:24:09 +00:00
Zuul 178bf2ba70 Merge "Add missing parameter for switch_backend.initialize" 2018-11-08 14:57:09 +00:00
Zuul bf3b2585f5 Merge "Add dragonflow-status upgrade check command framework" 2018-11-08 14:17:07 +00:00
Zuul a2c301a2f8 Merge "use common rpc and exceptions from neutron-lib" 2018-11-08 14:16:41 +00:00
Zuul 668c71b416 Merge "l3 notifer should not be a set" 2018-11-08 14:03:33 +00:00
Zuul fbe44c1b8d Merge "Correct errors handling bridge event in provider app" 2018-11-08 14:03:32 +00:00
Zuul 483d29d679 Merge "Print details of Switchport in log" 2018-11-08 14:03:32 +00:00
Zuul 874a2e06ca Merge "security group denies TCP flows when chassis-snat is enabled" 2018-11-08 14:03:31 +00:00
Zuul 8178c50580 Merge "Allow virtual tunnel ports to also have virtual sources" 2018-11-08 12:13:58 +00:00
Zuul d38257dad3 Merge "Python3 complains when iterate bytes string" 2018-11-08 12:13:57 +00:00
lvxianguo eae4d8ffda trivial: modify spelling error of message
Change-Id: I1879e550eaefd3e5d124a50aa47a8dd0da99fe29
2018-10-30 18:51:15 +08:00
whoami-rajat 34fd2a0ec7 Add dragonflow-status upgrade check command framework
This adds basic framework for dragonflow-status upgrade
check commands. For now it has only "check_placeholder"
check implemented.
Real checks can be added to this tool in the future.

Change-Id: I9791b3fcce65b08f92b3c5d54b529633579f795a
Story: 2003657
Task: 26128
2018-10-18 16:03:00 +05:30
Boden R 7e16e457d4 use common rpc and exceptions from neutron-lib
The neutron.common.rpc and exceptions were rehomed into neutron-lib and
are currently shimmed in neutron [1]

This patch consumes those modules from neutron-lib by using lib's
modules rather than neutrons.

[1] https://review.openstack.org/#/c/586525/

Change-Id: If1d2db738ad8e3f3416557fe1d0b00d65c6802ea
2018-09-26 14:33:04 -06:00
melissaml 37da9a72e1 Fix typos in docstring
Change-Id: Idafd25b1fddb8068383e7f11dfe6d09fc7b3149e
2018-09-25 16:47:23 +08:00
wangjian 00ae684538 l3 notifer should not be a set
An exceptions is raised when a gateway is set to a router because
l3 notifer is a set

Close-Bug: #1793633
Change-Id: I9ae83a9890fb3db2db6150d52a77e67435869770
2018-09-21 14:30:31 +08:00
wangjian e304ca3771 failed to get vm mac
values() does not return a list Python3

Close-Bug: #1793450
Change-Id: I420210fa969a6a5c8805728fc17ee760e37a08af
2018-09-20 14:50:21 +08:00
Dong Jun 0b827bd31d Correct errors handling bridge event in provider app
Passed a wrong key to self.bridge_macs and a wrong arg to
self._egress_placeholder_flow.
The new test case can catch them.

Change-Id: I639998c14ff6ef5ad766874dfa4cd5e178fbf7c5
2018-09-14 14:28:05 +08:00