use uuids with pycadf

Bug #1659053 reported by Morgan Fainberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Gage Hugo
pycadf
Fix Released
Medium
Gage Hugo

Bug Description

pycadf warnings are plentiful in keystone tests: UserWarning: Invalid uuid. To ensure interoperability, identifiersshould be a valid uuid.
  warnings.warn('Invalid uuid. To ensure interoperability, identifiers'

Be sure keystone is providing uuids appropriately.

Gage Hugo (gagehugo)
Changed in keystone:
assignee: nobody → Gage Hugo (gagehugo)
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

I'd like to see a fix for this land before Ocata-RC. This can be moved from the milestone if it doesn't land before then, but making tests less chatty with non-useful data is great!

Changed in keystone:
status: New → Triaged
importance: Undecided → Medium
milestone: none → ocata-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
status: Triaged → In Progress
Revision history for this message
Steve Martinelli (stevemar) wrote :

bumping from RC, not necessary

Changed in keystone:
milestone: ocata-rc1 → none
Gage Hugo (gagehugo)
Changed in pycadf:
status: New → In Progress
assignee: nobody → Gage Hugo (gagehugo)
Changed in pycadf:
importance: Undecided → Medium
Changed in keystone:
assignee: Gage Hugo (gagehugo) → Tin Lam (tl3438)
Changed in keystone:
assignee: Tin Lam (tl3438) → Gage Hugo (gagehugo)
Revision history for this message
Lance Bragstad (lbragstad) wrote :

Patch to pycadf to loosen uuid validation - https://review.openstack.org/#/c/428543/

Changed in keystone:
assignee: Gage Hugo (gagehugo) → Steve Martinelli (stevemar)
Changed in keystone:
assignee: Steve Martinelli (stevemar) → Gage Hugo (gagehugo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to pycadf (master)

Reviewed: https://review.openstack.org/428543
Committed: https://git.openstack.org/cgit/openstack/pycadf/commit/?id=a4a8f46248ab1d1a68d422276df21f75b24be84c
Submitter: Jenkins
Branch: master

commit a4a8f46248ab1d1a68d422276df21f75b24be84c
Author: Gage Hugo <email address hidden>
Date: Thu Feb 2 20:01:53 2017 -0600

    Make `is_valid` more flexible with uuid validation

    In keystone, multiple domain ids are handled by concatenating
    two valid uuids together. This causes issues with pycadf validation
    and causes the following warning to be thrown:

    warnings.warn('Invalid uuid. To ensure interoperability, identifiers '
    'should be a valid uuid.')

    This appears throughout the testing logs while running keystone tests
    and there is a current attempt to remove most/all invalid uuids to
    eliminate this warning [0]. However due to the multiple domain id
    issue, this cannot be solved in keystone alone.

    The idea to allow multiple uuids that were joined together was
    mentioned before in a previous attempt to solve this issue [1].

    This change:
    - Allows 2 or more concatenated uuids to be considered valid without
    emitting a warning
    - Cleaned up the list of words that are exceptions for validation
    - Added 'default' to list of valid words in exception list
    - Added offending value to printed warning
    - Broke up test_identifiers for better clarity about which tests
    were valid. This also solves the issue of `warning_mock.called` always
    being `True` once an invalid uuid of type string was checked within
    test_identifier
    - Added test for valid exception words and extra characters that
    can be present in a valid uuid according to [2]

    [0] https://bugs.launchpad.net/keystone/+bug/1659053
    [1] https://bugs.launchpad.net/keystone/+bug/1521844
    [2] https://docs.python.org/2/library/uuid.html

    Co-Authored-By: Tin Lam <email address hidden>

    Partial-Bug: #1659053
    Change-Id: I58bba04c21c2d24fd37850c9ecc6fac99deb3fc4

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/426411
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=2be615ea9303109f11033e293c229df586e3b1e1
Submitter: Jenkins
Branch: master

commit 2be615ea9303109f11033e293c229df586e3b1e1
Author: Gage Hugo <email address hidden>
Date: Fri Jan 27 15:52:02 2017 -0600

    Fix multiple uuid warnings with pycadf

    There are multiple pycadf warnings about invalid uuids when
    running keystone tests:

    To ensure interoperability, identifiersshould be a valid uuid.
      warnings.warn('Invalid uuid. To ensure interoperability, identifiers'

    This changes multiple fixtures within default_fixtures to use valid
    uuids for their 'id' values. Also changed load_fixtures to build
    the fixtures based on the default_fixtures' 'name' value, rather
    than 'id'. Replaced many instances of invalid hard-coded ids to use
    random uuids, default_fixture ids, or 'default'.

    Co-Authored-By: Tin Lam <email address hidden>

    Change-Id: Ic4fff30c306561b71288712480f073aba1fccbde
    Closes-Bug: #1659053
    Depends-On: I58bba04c21c2d24fd37850c9ecc6fac99deb3fc4

Changed in keystone:
status: In Progress → Fix Released
Changed in pycadf:
status: In Progress → Fix Committed
Changed in keystone:
milestone: none → pike-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystone 12.0.0.0b1

This issue was fixed in the openstack/keystone 12.0.0.0b1 development milestone.

Changed in keystone:
status: Fix Released → Fix Committed
status: Fix Committed → Fix Released
Changed in pycadf:
status: Fix Committed → Fix Released
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.