Reviewed:  https://review.openstack.org/564276
Committed: 
https://git.openstack.org/cgit/openstack/nova/commit/?id=864acf7c8db7c9a25a919b7ad698f0d078a4dec0
Submitter: Zuul
Branch:    master

commit 864acf7c8db7c9a25a919b7ad698f0d078a4dec0
Author: Eric Fried <efr...@us.ibm.com>
Date:   Wed Apr 25 11:34:22 2018 -0500

    Bump pypowervm minimum to 1.1.15
    
    The referenced bug is fixed in pypowervm 1.1.15.  Without the fix,
    PowerVM device detach during destroy (and therefore PowerVM CI) is
    broken.
    
    Change-Id: Icaabadfb17dd87207d99938224713a78dc925674
    Depends-On: https://review.openstack.org/#/c/564275/
    Closes-Bug: #1766692


** 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/1766692

Title:
  instance.uuid no longer being a str breaks powervm scsi disconnect

Status in OpenStack Compute (nova):
  Fix Released
Status in nova-powervm:
  Fix Released
Status in pypowervm:
  Fix Released

Bug description:
  Long-standing code in pypowervm [1] used isinstance(..., str) to help
  identify whether an input was a UUID or an integer short ID.  This is
  used with to find SCSI mappings [2] with Instance.uuid [3] when
  disconnecting a disk during destroy [4].

  Then this change in oslo.versionedobjects happened [5], resulting in
  instance.uuid no longer being a str.  So the check at [1] fails, and
  we try to int() a UUID string, resulting in [6], pasted here in case
  that link expires:

  PowerVM error destroying instance.: ValueError: invalid literal for int() 
with base 10: '4E27E1E6-6A24-4F0A-8E7B-2BBE7B4A28BA'
   Traceback (most recent call last):
     File "/opt/stack/nova-powervm/nova_powervm/virt/powervm/driver.py", line 
672, in _destroy
       _setup_flow_and_run()
     File "/opt/stack/nova-powervm/nova_powervm/virt/powervm/driver.py", line 
668, in _setup_flow_and_run
       tf_base.run(flow, instance=instance)
     File "/opt/stack/nova-powervm/nova_powervm/virt/powervm/tasks/base.py", 
line 40, in run
       return eng.run()
     File 
"/usr/local/lib/python2.7/dist-packages/taskflow/engines/action_engine/engine.py",
 line 247, in run
       for _state in self.run_iter(timeout=timeout):
     File 
"/usr/local/lib/python2.7/dist-packages/taskflow/engines/action_engine/engine.py",
 line 340, in run_iter
       failure.Failure.reraise_if_any(er_failures)
     File "/usr/local/lib/python2.7/dist-packages/taskflow/types/failure.py", 
line 336, in reraise_if_any
       failures[0].reraise()
     File "/usr/local/lib/python2.7/dist-packages/taskflow/types/failure.py", 
line 343, in reraise
       six.reraise(*self._exc_info)
     File 
"/usr/local/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py",
 line 53, in _execute_task
       result = task.execute(**arguments)
     File "/opt/stack/nova-powervm/nova_powervm/virt/powervm/tasks/storage.py", 
line 452, in execute
       self.instance, stg_ftsk=self.stg_ftsk, disk_type=self.disk_type)
     File "/opt/stack/nova-powervm/nova_powervm/virt/powervm/disk/ssp.py", line 
174, in disconnect_disk
       match_func=match_func)
     File 
"/usr/local/lib/python2.7/dist-packages/pypowervm/tasks/scsi_mapper.py", line 
503, in find_maps
       is_uuid, client_id = uuid.id_or_uuid(client_lpar_id)
     File "/usr/local/lib/python2.7/dist-packages/pypowervm/utils/uuid.py", 
line 55, in id_or_uuid
       ret_id = int(an_id)
   ValueError: invalid literal for int() with base 10: 
'4E27E1E6-6A24-4F0A-8E7B-2BBE7B4A28BA'

  (Okay, our bad for using str at all - though to be fair, it's possible
  that code predates the very existence of py3.)

  The right fix is for [1] to use is_uuid_like from oslo.utils.  This
  shall be done.  However, since [5] was backported to queens and pike,
  unless we can get away with backporting requirements changes, we may
  have to do something backportable in nova-powervm and nova as well.

  [1] 
https://github.com/powervm/pypowervm/blob/release/1.1.14/pypowervm/utils/uuid.py#L50
  [2] 
https://github.com/powervm/pypowervm/blob/release/1.1.14/pypowervm/tasks/scsi_mapper.py#L503
  [3] 
https://github.com/openstack/nova/blob/1605391084d6a1f57384ef48bad8ca2185cf6fa7/nova/virt/powervm/disk/ssp.py#L128
  [4] 
https://github.com/openstack/nova/blob/1605391084d6a1f57384ef48bad8ca2185cf6fa7/nova/virt/powervm/driver.py#L272
  [5] https://review.openstack.org/#/q/Ic6b6308fb1960ec40407e6efde30137b64543e72
  [6] 
http://184.172.12.213/58/557958/10/check/nova-out-of-tree-pvm/c1d7e99/logs/n-cpu.txt.gz?#_Apr_20_08_51_16_452651

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to