diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-02-19 05:05:19 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-02-19 05:05:19 +0000 |
| commit | 3e1e38f9a5b5550ea91b93040bc2d9c020aa7659 (patch) | |
| tree | 797683236ac14f54cb3cfcbbb58e6d84367b5917 | |
| parent | 9d9bed9e686c3ed2194ce7bca44160cfe169b836 (diff) | |
| parent | 3cac4d8f7d4343516ec335017dd783a887b9c4d6 (diff) | |
Merge "Fixes a race condition on updating security group rules"
| -rwxr-xr-x | nova/compute/manager.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 1b545495c..3bedfb1f0 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -579,8 +579,13 @@ class ComputeManager(manager.SchedulerDependentManager): Passes straight through to the virtualization driver. + Synchronise the call beacuse we may still be in the middle of + creating the instance. """ - return self.driver.refresh_instance_security_rules(instance) + @lockutils.synchronized(instance['uuid'], 'nova-') + def _sync_refresh(): + return self.driver.refresh_instance_security_rules(instance) + return _sync_refresh() @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id()) def refresh_provider_fw_rules(self, context): |
