chen-li [Tue, 12 Nov 2013 01:17:17 +0000 (09:17 +0800)]
Remove the warning for Scheduling Network
when a new port is created, the schedule_network in agentschedulers_db is called.
Since this network may already be hosted, it will directly return None in dhcp_agent_scheduler,
which cause the agentschedulers_db.schedule_network log a warning message.
This is really annoying and making users confused.
And, real warnings are already addressed in the real scheduler function.
which is neutron.scheduler.dhcp_agent_scheduler.ChanceScheduler.schedule by default.
Arata Notsu [Mon, 11 Nov 2013 11:33:43 +0000 (20:33 +0900)]
Remove confusing comment and code for LBaaS
The comment "the driver is optional" is inconsistent with what actually
done. And "vif_driver = None" after raising an exception makes no sense.
So this patch removes these lines.
Chang Bo Guo [Thu, 31 Oct 2013 05:10:34 +0000 (22:10 -0700)]
sync log from oslo
5fef5a8105 allow keeping of existing loggers with fileConfig fb8075a19d Add amqp=WARN,qpid=WARN to default_log_levels 4654a5d247 Don't override default value for eventlet.wsgi.server logging 41ddd7a975 _get_log_file_path explictly return, when logfile/logdire unset e12e6b45f8 Make openstack.common.log Python 3 compatible 572cfecb4d Make Messages unicode before hitting logging 3243cdfbe9 python3: handle module moves in log
Sridhar S [Wed, 23 Oct 2013 10:33:40 +0000 (16:03 +0530)]
Modified configuration group name to lowercase
Most of the OpenStack project makes use of lower case for
configuration group names. But, 'neutron' was having group
names in either cases. Bug states it is fine to have group
name in upper case for [DEFAULT] but needs to be changed
for others. It was noted that [PLUMgridDirector] was having
characters.
Avoid dhcp agent race condition on subnet and network delete
This patch ensures that, when the dhcp agent queries the server
to retrieve and delete its DHCP port, it does so by selecting
for update. This has been done by introducing a new method
that combines the get and delete in one shot.
Akihiro MOTOKI [Fri, 18 Oct 2013 06:09:29 +0000 (15:09 +0900)]
Ensure OVS plugin is loaded in OVS plugin test
In TestOpenvswitchSGServerRpcCallBack and NetworkBindingsTest
in OVS plugin tests, OVS plugin was not loaded properly.
* For NetworkBindingsTest, it can be fixed by changing setUp()
to take 'plugin' arguments in the base test classes
SecurityGroupDBTestCase and SGServerRpcCallBackMixinTestCase.
This fixes bug 1242510 in ML2 unit tests.
* For NetworkBindingsTest, it can be fixed by passing the plugin
class to super.setUp(). The test itself needs to be updated
because network binding is added when a network is created.
* NetworkBindingsTest in Linux Bridge plugin has the same issue,
so it is also fixed in this patch.
Eugene Nikanorov [Tue, 22 Oct 2013 13:49:00 +0000 (17:49 +0400)]
LBaaS: Fix incorrect pool status change
Avoid incorrect status change when deleting the pool.
We can check for the conditions prior putting the pool
to PENDING_DELETE state, in case delete conditions are met
it is safe to change the state to PENDING_DELETE.
Also, change create_vip and update_vip operations to respect
PENDING_DELETE and avoid race conditions.
Aaron Rosen [Fri, 25 Oct 2013 00:22:56 +0000 (17:22 -0700)]
NVP: Correct NVP router port mac to match neutron
Previously when router ports were created the mac_address from neutron
was not passed to nvp so nvp generated it's own mac_address for the port.
This patch fixes this by passing the mac_address on the port to nvp.
Zhongyue Luo [Wed, 9 Oct 2013 01:44:01 +0000 (09:44 +0800)]
Utilizes assertIsNone and assertIsNotNone
Using assertEqual/assertNotEqual to test if an element
is or is not None is too python2.4.
Our unit testing framework supports assertIsNone and assertIsNotNone
which were created for these types of tests.
zhhuabj [Thu, 17 Oct 2013 14:58:48 +0000 (22:58 +0800)]
Support uncompressed ipv6 address and abbreviated ipv4 address
Now neutron supports zero-compressed ipv6 address like
'2001:db8::10:10:10:0/120' and unabbreviated ipv4 address
like '10.0.0.0/24'.
This path will make neutron also support uncompressed ipv6
address and abbreviated ipv4 address. for example:
1, uncompressed ipv6 address like 'fe80:0:0:0:0:0:0:0/128'
2, ipv6 address with multiple consecutive zero like
'2001:0db8:0:0:1::1/128' or '2001::0:1:0:0:1100/120'
3, abbreviated ipv4 address like '10/24'
Make test_nvp_sync.SyncLoopingCallTestCase reliable
This patch removes the previous check that verified the mocked
looping call had an exact number of calls, and replaces it with a
simpler check that just verifies that the mock has been called.
As a consequence, this patch also shortens the test duration.
Baodong Li [Tue, 8 Oct 2013 15:19:32 +0000 (15:19 +0000)]
Detect and process live-migration in Cisco plugin
With Cisco/Nexus plugin, migration is not fully supported. Logic to detect
port binding change needs to be added in update_port(), and provisioning of
nexus switch(es) should be done accordingly
added test code for update_port() in the model layer and the db layer
Brian Haley [Fri, 27 Sep 2013 14:57:40 +0000 (10:57 -0400)]
Spawn arping in thread to speed-up floating IP
Change _send_gratuitous_arp_packet() to spawn a thread to call
arping after a floating IP is assigned. This way it doesn't
stall _process_routers() from returning quickly due to calling
pool.waitall().
The code currently raises when it's not able to find the port to be
deleted on the backend. This might happen, for instance, when the
port is manually removed or, in some cases, if port creation failed
in the first place.
There's little sense in raising when a resource to be removed is not
found; therefore this patch replaces the raise statement with a log
statement.
When recycling an IP, allocation pools are loaded with an inner
join with ip avaiblity ranges. However, if the pool is exhausted,
there will be no availability ranges and the query will return
no results because of the inner join. It will therefore be
impossible to reuse IP addresses once the pool has been exhausted.
This patch tries to reload allocation pools without joining on
IP avaiability ranges if the first query did not return any result.
Replacing an inner join with an outer join will not be possible
as postgresql backend does not support 'SELECT ... FOR UPDATE' with
outer joins (for more info see bug 1215350).
The patch also contains unit tests for verifying IP are recycled
correctly even when the pool is exhausted.