python-devops fails to resume virtualbox vm if it is already running

Bug #1376791 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

Attempt to resume already running vm on kvm hypervisor with libvirt result in success.
But if hypervisor type is virtualbox libvirt raises exception:

======================================================================
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 52, in wrapper
    return func(*args, **kwagrs)
  File "/home/jenkins/fuel-main/fuelweb_test/tests/test_vcenter.py", line 44, in vcenter_one_node_simple
    self.env.revert_snapshot("ready_with_1_slaves")
  File "/home/jenkins/fuel-main/fuelweb_test/models/environment.py", line 345, in revert_snapshot
    self.get_virtual_environment().resume()
  File "/home/jenkins/venv-nailgun-tests/local/lib/python2.7/site-packages/devops/models.py", line 134, in resume
    node.resume(verbose)
  File "/home/jenkins/venv-nailgun-tests/local/lib/python2.7/site-packages/devops/models.py", line 347, in resume
    self.driver.node_resume(self)
  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 330, in node_resume
    self.conn.lookupByUUIDString(node.uuid).resume()
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 1784, in resume
    if ret == -1: raise libvirtError ('virDomainResume() failed', dom=self)
libvirtError: operation failed: machine not paused, so can't resume it

I propose to check if VM is in paused state before resuming.

Igor Shishkin (teran)
Changed in fuel:
assignee: nobody → Eugene Korekin (ekorekin)
importance: Undecided → Medium
status: New → Confirmed
milestone: none → 6.0
tags: added: devops fuel-devops
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/126619

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-devops (master)

Reviewed: https://review.openstack.org/126619
Committed: https://git.openstack.org/cgit/stackforge/fuel-devops/commit/?id=37794d367d36ed147c3c9ea89bc594ccb345fe61
Submitter: Jenkins
Branch: master

commit 37794d367d36ed147c3c9ea89bc594ccb345fe61
Author: Eugene Korekin <email address hidden>
Date: Tue Oct 7 20:37:15 2014 +0400

    Workaround for virtualbox domain resuming

    Change-Id: I0675f0ab7a82d4928aa44427250ddb1f0c7d85c2
    Closes-Bug: #1376791

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.