python-devops fails to create diagnostic snapshot for virtualbox VMs

Bug #1376778 reported by Eugene Korekin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Eugene Korekin

Bug Description

When some error happens during system tests with virtualbox VMs python-devops
fails to create disgnostic snapshot:

======================================================================
ERROR: Deploy cluster with controller node only
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func
    compatability.capture_type_error(s_func)
  File "/usr/lib/python2.7/dist-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error
    func()
  File "/usr/lib/python2.7/dist-packages/proboscis/case.py", line 350, in func
    func(test_case.state.get_state())
  File "/home/jenkins/fuel-main/fuelweb_test/helpers/decorators.py", line 73, in wrapper
    is_make=True)
  File "/home/jenkins/fuel-main/fuelweb_test/models/environment.py", line 326, in make_snapshot
    self.get_virtual_environment().snapshot(snapshot_name, force=True)
  File "/home/jenkins/venv-nailgun-tests/local/lib/python2.7/site-packages/devops/models.py", line 138, in snapshot
    node.snapshot(name=name, description=description, force=force)
  File "/home/jenkins/venv-nailgun-tests/local/lib/python2.7/site-packages/devops/models.py", line 353, in snapshot
    if force and self.has_snapshot(name):
  File "/home/jenkins/venv-nailgun-tests/local/lib/python2.7/site-packages/devops/models.py", line 350, in has_snapshot
    return self.driver.node_snapshot_exists(node=self, name=name)
  File "/home/jenkins/venv-nailgun-tests/local/lib/python2.7/site-packages/devops/helpers/retry.py", line 27, in wrapper
    return func(*args, **kwargs)
  File "/home/jenkins/venv-nailgun-tests/local/lib/python2.7/site-packages/devops/driver/libvirt/libvirt_driver.py", line 145, in node_snapshot_exists
    ret.snapshotLookupByName(name, 0)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 2315, in snapshotLookupByName
    if ret is None:raise libvirtError('virDomainSnapshotLookupByName() failed', dom=self)
libvirtError: Requested operation is not valid: domain fuel-master has no snapshots with name error_vcenter_one_node_simple

----------------------------------------------------------------------

libvirt function snapshotLookupByName returns 'VIR_ERR_OPERATION_INVALID = 55 :operation is not applicable at this time' for virtualbox nodes.

I propose to use snapshotListNames() instead of snapshotLookupByName() as workaround (besides it will simplify code)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-devops (master)

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

Changed in fuel:
assignee: nobody → Eugene Korekin (ekorekin)
status: New → In Progress
Igor Shishkin (teran)
Changed in fuel:
importance: Undecided → Medium
milestone: none → 6.0
tags: added: devops fuel-devops
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-devops (master)

Reviewed: https://review.openstack.org/125661
Committed: https://git.openstack.org/cgit/stackforge/fuel-devops/commit/?id=7346289f233298f238d7eb3291b46b1092fbdf87
Submitter: Jenkins
Branch: master

commit 7346289f233298f238d7eb3291b46b1092fbdf87
Author: Eugene Korekin <email address hidden>
Date: Thu Oct 2 19:00:16 2014 +0400

    Workaround for virtualbox snapshot lookup

    Change-Id: Ifc912183aceb3ee3fe328805eda69c6057567087
    Closes-Bug: #1376778

Changed in fuel:
status: In Progress → Fix Committed
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.