nova backup vm should not backup those vm boot from cinder volume

Bug #1356737 reported by ling-yun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
wangxiyuan

Bug Description

When doing backup on a vm which boot from cinder volume, it firstly shutdown vm and then do backup work.
But it fails and the detail exception log could be seen in the last part.
When we need nova to backup a vm booted from cinder volume, we could do this by using cinder's function----copy volume to image.
I think we could raise an exception when nova backup a vm from cinder volume.

======Nova-compute exception log===================
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
    incoming.message))
  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
    return self._do_dispatch(endpoint, method, ctxt, args)
  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
    result = getattr(endpoint, method)(ctxt, **new_args)
  File "/opt/stack/nova/nova/exception.py", line 88, in wrapped
    payload)
  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
    six.reraise(self.type_, self.value, self.tb)
  File "/opt/stack/nova/nova/exception.py", line 71, in wrapped
    return f(self, context, *args, **kw)
  File "/opt/stack/nova/nova/compute/manager.py", line 285, in decorated_function
    pass
  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
    six.reraise(self.type_, self.value, self.tb)
  File "/opt/stack/nova/nova/compute/manager.py", line 271, in decorated_function
    return function(self, context, *args, **kwargs)
  File "/opt/stack/nova/nova/compute/manager.py", line 313, in decorated_function
    kwargs['instance'], e, sys.exc_info())
  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
    six.reraise(self.type_, self.value, self.tb)
  File "/opt/stack/nova/nova/compute/manager.py", line 301, in decorated_function
    return function(self, context, *args, **kwargs)
  File "/opt/stack/nova/nova/compute/manager.py", line 2741, in backup_instance
    self._do_snapshot_instance(context, image_id, instance, rotation)
  File "/opt/stack/nova/nova/compute/manager.py", line 360, in decorated_function
    % image_id, instance=instance)
  File "/opt/stack/nova/nova/openstack/common/excutils.py", line 82, in __exit__
    six.reraise(self.type_, self.value, self.tb)
  File "/opt/stack/nova/nova/compute/manager.py", line 351, in decorated_function
    *args, **kwargs)
  File "/opt/stack/nova/nova/compute/manager.py", line 2729, in _do_snapshot_instance
    task_states.IMAGE_BACKUP)
  File "/opt/stack/nova/nova/compute/manager.py", line 2807, in _snapshot_instance
    update_task_state)
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 1501, in snapshot
    image_type=source_format)
  File "/opt/stack/nova/nova/virt/libvirt/imagebackend.py", line 716, in snapshot
    return backend(path=disk_path)
  File "/opt/stack/nova/nova/virt/libvirt/imagebackend.py", line 421, in __init__
    info = libvirt_utils.logical_volume_info(path)
  File "/opt/stack/nova/nova/virt/libvirt/utils.py", line 336, in logical_volume_info
    '--separator', '|', path, run_as_root=True)
  File "/opt/stack/nova/nova/virt/libvirt/utils.py", line 54, in execute
    return utils.execute(*args, **kwargs)
  File "/opt/stack/nova/nova/utils.py", line 164, in execute
    return processutils.execute(*cmd, **kwargs)
  File "/opt/stack/nova/nova/openstack/common/processutils.py", line 194, in execute
    cmd=' '.join(cmd))
ProcessExecutionError: Unexpected error while running command.
Command: lvs -o vg_all,lv_all --separator | /dev/disk/by-path/ip-10.250.10.193:3260-iscsi-iqn.2010-10.org.openstack:volume-9ba91e05-050b-4dda-ac3c-9f3630c704c0-lun-1
Exit code: 5
Stdout: ''
Stderr: ' "disk/by-path/ip-10.250.10.193:3260-iscsi-iqn.2010-10.org.openstack:volume-9ba91e05-050b-4dda-ac3c-9f3630c704c0-lun-1": Invalid path for Logical Volume\n'

Tags: volumes
ling-yun (zengyunling)
Changed in nova:
assignee: nobody → ling-yun (zengyunling)
Changed in nova:
importance: Undecided → Medium
Tracy Jones (tjones-i)
tags: added: volumes
Revision history for this message
Sean Dague (sdague) wrote :

I'm not quite sure what you believe the solution is here, can you explain further?

Changed in nova:
status: New → Incomplete
importance: Medium → Low
ling-yun (zengyunling)
Changed in nova:
assignee: ling-yun (zengyunling) → nobody
warewang (wangguangcai)
Changed in nova:
assignee: nobody → warewang (wangguangcai)
Revision history for this message
Sean Dague (sdague) wrote :

Please don't assign incomplete bugs unless you have a patch. Otherwise they don't expire correctly if there is no response

Changed in nova:
assignee: warewang (wangguangcai) → nobody
Revision history for this message
ling-yun (zengyunling) wrote :

To Sean Dauge:
Thanks. I will submit the patch in next few days.

Changed in nova:
assignee: nobody → ling-yun (zengyunling)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/122900

Changed in nova:
assignee: ling-yun (zengyunling) → warewang (wangguangcai)
status: Incomplete → In Progress
Changed in nova:
assignee: warewang (wangguangcai) → zhangtralon (zhangchunlong1)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Joe Gordon (<email address hidden>) on branch: master
Review: https://review.openstack.org/122900
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

wangxiyuan (wangxiyuan)
Changed in nova:
assignee: zhangtralon (zhangchunlong1) → wangxiyuan (wangxiyuan)
wangxiyuan (wangxiyuan)
Changed in nova:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.