diff options
| author | Masanori Itoh <itoumsn@nttdata.co.jp> | 2011-04-10 02:49:38 +0900 |
|---|---|---|
| committer | Masanori Itoh <itoumsn@nttdata.co.jp> | 2011-04-10 02:49:38 +0900 |
| commit | c47c545b293d5b73f46ff18ace2f4b9db61a771f (patch) | |
| tree | 30d8c5ae4c76dec0ab50fba76174739a18e0607a /nova/virt | |
| parent | 7bd99e33796f1e90b6f8b0b9caa122c541f99015 (diff) | |
debug tree status checkpoint.
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/libvirt_conn.py | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index 2be190256..300672ae5 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -471,6 +471,9 @@ class LibvirtConnection(driver.ComputeDriver): @exception.wrap_exception def reboot(self, instance): + # NOTE(itoumsn): self.shutdown() and wait instead of destroy would be + # better because we cannot ensure flushing dirty buffers + # in the guest OS. But, in case of KVM, shutdown often fails... self.destroy(instance, False) xml = self.to_xml(instance) self.firewall_driver.setup_basic_filtering(instance) @@ -496,7 +499,26 @@ class LibvirtConnection(driver.ComputeDriver): timer.stop() timer.f = _wait_for_reboot - return timer.start(interval=0.5, now=True) + timer_result=timer.start(interval=0.5, now=True) + + # Fix lp747922 + instance_id = instance['id'] + for vol in db.volume_get_all_by_instance(context.get_admin_context(), + instance_id): +# LOG.debug(_("re-attaching: %s") % vol['ec2_id']) +# instance-id : instance-00000001 +# device_path : /dev/etherd/e0.1, /dev/mapper/nova--volumes-volume--00000001 +# mountpoint : sdh +# BTW, is iSCSI working? + LOG.debug(_("instance_id: %s, volume_id: %s, mountpoint: %s") % + (instance_id, vol['id'], vol['mountpoint'])) +# self.attach_volume(instance['name'], vol['id'], vol['mountpoint']) + + self.attach_volume(instance['name'], + '/dev/mapper/nova--volumes-volume--00000001', + 'vdb') + + return timer_result @exception.wrap_exception def pause(self, instance, callback): |
