Aaron Rosen [Wed, 10 Oct 2012 00:10:27 +0000 (17:10 -0700)]
Quantum Security Groups API
Implements blueprint quantum-security-groups API
In addition the the convention that if a URI has a '-' in it, it's
replaced with a '_'. For example: POST security-groups will convert
the body to {'security_group': ..}
Updates Quantum-specific policy glue code to eliminate deprecated
openstack-common policy interfaces. Also cleans up policy code
to allow for returning fine-grained policy values.
Maru Newby [Tue, 23 Oct 2012 22:25:54 +0000 (22:25 +0000)]
Add unit tests for the ovs quantum agent.
* Supporting the quantum dhcp agent on XenServer/XCP requires
modifying the ovs agent. As no unit tests exist at present for
the ovs agent, this change adds enough test coverage to help
ensure that the modifications to support xen will not break
existing functionality.
* Supports blueprint xenapi-ovs
Gary Kotton [Mon, 15 Oct 2012 07:05:38 +0000 (07:05 +0000)]
Remove database access from agents
A flag on the agent and plugin would indicate that the agent could access
the database directly instead of using the RPC interface. This has been
removed.
He Jie Xu [Sat, 13 Oct 2012 10:00:20 +0000 (18:00 +0800)]
add test for create subnet with default gateway and conflict allocation pool
Create subnet with default gateway and conflict allocation pool should return
status code 409:
$ quantum subnet-create net1 --allocation-pool start=10.0.0.1,end=10.0.0.5 \
10.0.0.0/24
Found overlapping allocation pools:{u'start': u'10.0.0.1',
u'end': u'10.0.0.5'} 10.0.0.1 for subnet 10.0.0.0/24.
Due to some issues using OVS internal interfaces across namespaces
with OpenFlow controllers (bug 1048681), a patch introduced the
OVSVethInterfaceDriver in addition to the base OVSInterfaceDriver.
However, OVSVethInterfaceDriver is just a variation of OVSInterfaceDriver
and the difference is how to create an interface (OVS internal vs veth).
This patch merge OVSVethInterfaceDriver into OVSInterfaceDriver
by introducing a new flag 'ovs_use_veth' (which defaults to False).
The patch adds a log entry indication that the service has started. In
addition to this if there is an "exit" statement in the code, then the
log message will indicate that the service has been terminated.
The port creation code did not correctly treat a database error. That is,
if there was an exception the port would be created and an error returned
to the client.
======================================================================
ERROR: test_ofp_server (quantum.tests.unit.ryu.test_ryu_db.RyuDBTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/quantum/tests/unit/ryu/test_ryu_db.py", line 30, in setUp
options = {"sql_connection": cfg.CONF.DATABASE.sql_connection}
File "/quantum/openstack/common/cfg.py", line 1039, in __getattr__
return self._get(name)
File "/quantum/openstack/common/cfg.py", line 1361, in _get
value = self._substitute(self._do_get(name, group))
File "/quantum/openstack/common/cfg.py", line 1377, in _do_get
info = self._get_opt_info(name, group)
File "/quantum/openstack/common/cfg.py", line 1470, in _get_opt_info
raise NoSuchOptError(opt_name, group)
NoSuchOptError: no such option: DATABASE
----------------------------------------------------------------------
Ran 1 test in 0.001s
Julien Danjou [Tue, 2 Oct 2012 13:37:49 +0000 (15:37 +0200)]
Fix filters default value in get_networks
With that change, if get_networks() is called without fields set to
something, _filter_nets_l3 fails because it tries to call "filters.get()"
where filters is None.
Add an explicity user in the configuration file regarding consequences of
enabling overlapping IPs when Quantum is used with nova security groups
and/or metadata.
This patch adds a global configuration option for enabling or disabling
overlapping IPs for subnets in different networks.
If they are disabled, the validation of the CIDR against overlapping
ones should be performed globally and not just among subnets defined for
the current network.
So far unit tests were executed using an in-memory database.
Memory was not being freed thus causing oom frequently due to
the increased number of unit tests.
Since sqlite in memory db do not work very well anyway with nose,
we are moving to file-based databases; slower, but safer.
Also, this patch removes a bunch of unit tests which do not add
anything to code coverage or number or test cases exercised.
the l3 agent checked if the external network bridge exists in its
constructor, raising an uncaught exception if it did not. this does not
make much sense when running the l3-agent as a deamon, especially since
it can be the case that the l3-agent starts before open vswitch.
when running in db-mode, the ovs plugin agent will catch any unexpected
exceptions generated during processing. However, in rpc-mode, this
does not happen, meaning a small error, even a transient one, causes the
agent to exit completely. Thic change adds a try-catch block to the
rcp_loop(), causing the agent to log any unexpected exception, wait for
the polling period, then retry the loop after resetting all state.
Bob Kukura [Thu, 20 Sep 2012 20:03:14 +0000 (16:03 -0400)]
Fix OVS and LB plugins' VLAN allocation table synchronization
In both the openvswitch and linuxbridge plugins, if previous entries
for a physical network have been completely removed from the
network_vlan_ranges configuration variable, allocation table records
for unallocated VLANs on that physical network are now removed from
the DB at startup. The test_ovs_db and test_lb_db unit tests have also
been extended to cover this case. Fixes bug 1052289.
Test assertions that were added to the test_ovs_db unit test in
https://review.openstack.org/#/c/11388 have been added to the
test_lb_db unit test. Fixes bug 1045596.
Python ignores SIGPIPE on startup, because it prefers to check every
write and raise an IOError exception rather than taking the signal. Most
Unix subprocesses don't expect to work this way. This patch (adapted
from Colin Watson's post at http://tinyurl.com/2a7mzh5) sets SIGPIPE
back to the default action for quantum.agent.linux.utils.execute,
quantum.common.utils.execute and quantum-rootwrap created subprocesses.
Checks for the validity of the VLAN ID needed to be performed. In cases where
segmentation ID is not greater than zero, the Nexus sub-plugin does not
need to be invoked for that network.