From 3142fec2c908689f02e4e24a5174a3dcf2260c4c Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Wed, 21 Jul 2010 18:20:04 -0700 Subject: Fixed bug 608505 - was freeing the wrong address (should have freed 'secondaddress', was freeing 'address') --- nova/tests/network_unittest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/tests/network_unittest.py b/nova/tests/network_unittest.py index f3a5868d1..a1d1789e2 100644 --- a/nova/tests/network_unittest.py +++ b/nova/tests/network_unittest.py @@ -137,7 +137,7 @@ class NetworkTestCase(test.TrialTestCase): self.dnsmasq.release_ip(mac3, address3, hostname, net.bridge_name) net = network.get_project_network("project0", "default") rv = network.deallocate_ip(secondaddress) - self.dnsmasq.release_ip(mac, address, hostname, net.bridge_name) + self.dnsmasq.release_ip(mac, secondaddress, hostname, net.bridge_name) def test_release_before_deallocate(self): pass -- cgit From eb10c8f1ea41564b5ee2d19054eeb8b65bfc0b33 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 24 Jul 2010 16:22:17 -0700 Subject: Updated URLs in the README file to point to current locations. --- README | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README b/README index f7d21f400..851bca9db 100644 --- a/README +++ b/README @@ -6,15 +6,19 @@ The Choose Your Own Adventure README for Nova: To monitor it from a distance: follow @novacc on twitter -To tame it for use in your own cloud: read http://docs.novacc.org/getting.started.html +To tame it for use in your own cloud: read http://nova.openstack.org/getting.started.html -To study its anatomy: read http://docs.novacc.org/architecture.html +To study its anatomy: read http://nova.openstack.org/architecture.html -To disect it in detail: visit http://github.com/nova/cc +To disect it in detail: visit http://code.launchpad.net/nova -To taunt it with its weaknesses: use http://github.com/nova/cc/issues +To taunt it with its weaknesses: use http://bugs.launchpad.net/nova + +To watch it: http://hudson.openstack.org To hack at it: read HACKING -To watch it: http://test.novacc.org/waterfall +To laugh at its PEP8 problems: http://hudson.openstack.org/job/nova-pep8/violations + +To cry over its pylint problems: http://hudson.openstack.org/job/nova-pylint/violations -- cgit From 1a53eaeed901f3c789ebdb867b73996ccac608c3 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Sun, 25 Jul 2010 15:00:37 +0100 Subject: Fix assertion "Someone released me too many times: too many tokens!" when more than one process was running at the same time. This was caused by the override of SharedPool.__new__ not stopping ProcessPool.__init__ from being run whenever process.simple_execute is called. When __init__ ran for the second time, the DeferredSemaphore was replaced, and this meant that we ended up releasing a different semaphore to the one that was acquired. --- nova/process.py | 13 ++++++------- nova/tests/process_unittest.py | 7 +++++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/nova/process.py b/nova/process.py index d3558ed2e..8ecef1584 100644 --- a/nova/process.py +++ b/nova/process.py @@ -205,13 +205,12 @@ class ProcessPool(object): self._pool.release() return rv -class SharedPool(ProcessPool): - _instance = None - def __new__(cls, *args, **kwargs): - if not cls._instance: - cls._instance = super(SharedPool, cls).__new__( - cls, *args, **kwargs) - return cls._instance +_instance = None +def SharedPool(): + global _instance + if _instance is None: + _instance = ProcessPool() + return _instance def simple_execute(cmd, **kwargs): return SharedPool().simple_execute(cmd, **kwargs) diff --git a/nova/tests/process_unittest.py b/nova/tests/process_unittest.py index 1c15b69a0..c96bb5913 100644 --- a/nova/tests/process_unittest.py +++ b/nova/tests/process_unittest.py @@ -120,3 +120,10 @@ class ProcessTestCase(test.TrialTestCase): pool2 = process.SharedPool() self.assert_(id(pool1) == id(pool2)) + def test_shared_pool_works_as_singleton(self): + d1 = process.simple_execute('sleep 1') + d2 = process.simple_execute('sleep 0.005') + # lp609749: would have failed with + # exceptions.AssertionError: Someone released me too many times: + # too many tokens! + return d1 -- cgit