← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1712281] Re: Attach volume failed for vmware driver

 

Reviewed:  https://review.openstack.org/496140
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8aa3133e4515cd30f47bea8f3fed9ce4ec883c53
Submitter: Jenkins
Branch:    master

commit 8aa3133e4515cd30f47bea8f3fed9ce4ec883c53
Author: DamonLi <damonl@xxxxxxxxxx>
Date:   Tue Aug 22 15:48:33 2017 +0800

    Fix bug on vmware driver attach volume failed
    
    The function "get_vm_state" in vmwareapi returns the index of the vm state in
    nova InstancePowerState. The "int" value do not have .lower() function. This
    will cause error when attach volume.
    
    Closes-Bug: #1712281
    
    Change-Id: I7b6d581904219d1ba4615054f9676390170ab1bc


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1712281

Title:
  Attach volume failed for vmware driver

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  VMware nova CI always failed when attach volume.
  The error logs are shown as following.

  2017-08-21 23:41:08.001 4576 ERROR nova.compute.manager [req-cb1de0dd-4108-4217-ba74-c217bb17cd6f tempest-ServersTestBootFromVolume-634134128 tempest-ServersTestBootFromVolume-634134128] [instance: 980f0c9e-30d3-4ae5-ae83-e6b8e17cb707] Instance failed to spawn: AttributeError: 'int' object has no attribute 'lower'
   Traceback (most recent call last):
    File "/opt/stack/nova/nova/compute/manager.py", line 2139, in _build_resources
       yield resources
    File "/opt/stack/nova/nova/compute/manager.py", line 1954, in _build_and_run_instance
      block_device_info=block_device_info)
     File "/opt/stack/nova/nova/virt/vmwareapi/driver.py", line 323, in spawn
       admin_password, network_info, block_device_info)
     File "/opt/stack/nova/nova/virt/vmwareapi/vmops.py", line 790, in spawn
       instance, vi.datastore.ref, adapter_type)
     File "/opt/stack/nova/nova/virt/vmwareapi/volumeops.py", line 604, in attach_root_volume
       self.attach_volume(connection_info, instance, adapter_type)
     File "/opt/stack/nova/nova/virt/vmwareapi/volumeops.py", line 381, in attach_volume
       self._attach_volume_vmdk(connection_info, instance, adapter_type)
     File "/opt/stack/nova/nova/virt/vmwareapi/volumeops.py", line 335, in _attach_volume_vmdk
       if state.lower() != 'poweredoff':
   AttributeError: 'int' object has no attribute 'lower'


  
  There are two issue here.
    1. The variable "state" is "int" type, and it doesn't have function ".lower()"
    2. In nova InstancePowerState, there is no status called "poweredoff". We should use power_states.SHUTDOWN instead.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1712281/+subscriptions


References