diff options
| author | Ilya Alekseyev <ialekseev@griddynamics.com> | 2011-04-14 17:12:54 +0400 |
|---|---|---|
| committer | Ilya Alekseyev <ialekseev@griddynamics.com> | 2011-04-14 17:12:54 +0400 |
| commit | 1b460de2f881d3cda0fd58bacedc3886020e4ca7 (patch) | |
| tree | e22cfe111d933fc0a8236c24320032df75976452 | |
| parent | fa4aeb9af8d00ecff6620646c142e5ff68e1cd5e (diff) | |
bugfix
| -rw-r--r-- | nova/compute/manager.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index af3551708..63d374326 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -226,15 +226,6 @@ class ComputeManager(manager.SchedulerDependentManager): self.network_manager.setup_compute_network(context, instance_id) - if FLAGS.auto_assign_floating_ip: - public_ip = rpc.call(context, - FLAGS.network_topic, - {"method": "allocate_floating_ip", - "args": {"project_id": context.project_id}}) - self.network_manager.associate_floating_ip(context, - instance_id=instance_id, - address=public_ip) - # TODO(vish) check to make sure the availability zone matches self.db.instance_set_state(context, instance_id, @@ -255,6 +246,16 @@ class ComputeManager(manager.SchedulerDependentManager): instance_id, power_state.SHUTDOWN) + if not FLAGS.stub_network: + if FLAGS.auto_assign_floating_ip: + public_ip = rpc.call(context, + FLAGS.network_topic, + {"method": "allocate_floating_ip", + "args": {"project_id": context.project_id}}) + self.network_manager.associate_floating_ip(context, + floating_address=public_ip, + fixed_address=address) + self._update_state(context, instance_id) @exception.wrap_exception |
