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

commit a563d1fdd318ad206755e58fa9bb5da629aef209
Author: Ed Leafe <e...@leafe.com>
Date:   Tue Jan 30 21:02:20 2018 +0000

    Make the InstanceMapping marker UUID-like
    
    The InstanceMapping class contains the 'instance_uuid' field. When
    mapping instances, they can be done in batches, and in order to do this,
    a marker containing the UUID of the last mapped instance is created in
    the table. However, since the instance_uuid column has a unique
    constraint, the value is munged by replacing the dashes ('-') with
    spaces.
    
    The oslo_versionedobjects module was recently updated to enforce the
    validity of all values in UUID fields. As a transition, it only emits
    warnings, but in the future, it will raise ValueErrors. Tests of the
    mapping marker behavior show the warning:
    
    oslo_versionedobjects/fields.py:348: FutureWarning: 655662b2 6573 42f9
    abbf de92533e20a8 is an invalid UUID. Using UUIDFields with invalid
    UUIDs is no longer supported, and will be removed in a future release.
    Please update your code to input valid UUIDs or accept ValueErrors for
    invalid UUIDs.
    
    We need to update the InstanceMapping marker code to avoid creating
    invalid UUIDs. This change accomplishes this be introducing a method
    that "shifts" the digits in the UUID to store, and unshifts them to
    recover. The stored value should have no more of a chance of a collision
    with an existing value than any other UUID added to the table.
    
    Closes-Bug: #1742760
    
    Change-Id: I5b3f7f21c0f2593a588a368c977fc71f49b9d222


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

Title:
  InstanceMapping uses invalid UUID

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  The InstanceMapping class contains the 'instance_uuid' field. When
  mapping instances, they can be done in batches, and in order to do
  this, a marker containing the UUID of the last mapped instance is
  created in the table. However, since the instance_uuid column has a
  unique constraint, the value is munged by replacing the dashes ('-')
  with spaces.

  The oslo_versionedobjects module was recently updated to enforce the
  validity of all values in UUID fields. As a transition, it only emits
  warnings, but in the future, it will raise ValueErrors. Tests of the
  mapping marker behavior show the warning:

  oslo_versionedobjects/fields.py:348: FutureWarning: 655662b2 6573 42f9
  abbf de92533e20a8 is an invalid UUID. Using UUIDFields with invalid
  UUIDs is no longer supported, and will be removed in a future release.
  Please update your code to input valid UUIDs or accept ValueErrors for
  invalid UUIDs.

  We need to update the InstanceMapping marker code to avoid creating
  invalid UUIDs.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1742760/+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