Merge lp://qastaging/~thedac/simplestreams/keystone-v3-support into lp://qastaging/simplestreams

Proposed by David Ames
Status: Merged
Merged at revision: 450
Proposed branch: lp://qastaging/~thedac/simplestreams/keystone-v3-support
Merge into: lp://qastaging/simplestreams
Diff against target: 209 lines (+106/-16)
3 files modified
simplestreams/mirrors/glance.py (+7/-2)
simplestreams/objectstores/swift.py (+5/-1)
simplestreams/openstack.py (+94/-13)
To merge this branch: bzr merge lp://qastaging/~thedac/simplestreams/keystone-v3-support
Reviewer Review Type Date Requested Status
Scott Moser (community) Approve
Server Team CI bot continuous-integration Approve
Alex Kavanagh (community) Approve
Review via email: mp+325781@code.qastaging.launchpad.net

Commit message

Keystone v3 Support

Get the correct environment variables for Keystone v3.
Use keystoneauth1 sessions when available.

Description of the change

Keystone v3 Support

Get the correct environment variables for Keystone v3.
Use keystoneauth1 sessions when available.

To post a comment you must log in.
Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

LGTM

review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote :

Hi,

Very slow in responding, sorry.

I think this looks really good. There are 2 points I'd like addressed though:
a.) I think we need to take the v3 route only if 'OS_AUTH_VERSION' is set to 3 (or possibly OS_IDENTITY_API_VERSION). i'm not sure which is right, i see both of these in my 'serverstack' creds file. We should respect this if set, rather than your 'get_ks_api_version'

 b.) I suspect it is possible that the 'import' of 'v3' would fail . looking at my "example sync" from
http://bazaar.launchpad.net/~smoser/simplestreams/example-sync/view/head:/setup , this previously worked on trusty, so i'd like to have it continue to work there. I think we need to add some ImportError handling to address that.

review: Needs Fixing
Revision history for this message
Scott Moser (smoser) wrote :

David,

Can you try this out and see if it works for you?

https://code.launchpad.net/~smoser/simplestreams/keystone-v3-support/+merge/329379

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
David Ames (thedac) wrote :

This should be ready now. I cannot test against serverstack until we are done with release.

The final remaining issue was swiftclient authentication. By sending it the session that seems to have fixed it in my test environments.

Revision history for this message
Scott Moser (smoser) wrote :

You can test with any credentials. Do not need any special privileges.

On September 1, 2017 7:31:00 PM EDT, David Ames <email address hidden> wrote:
>This should be ready now. I cannot test against serverstack until we
>are done with release.
>
>The final remaining issue was swiftclient authentication. By sending it
>the session that seems to have fixed it in my test environments.
>--
>https://code.launchpad.net/~thedac/simplestreams/keystone-v3-support/+merge/325781
>You are reviewing the proposed merge of
>lp:~thedac/simplestreams/keystone-v3-support into lp:simplestreams.

Revision history for this message
Joshua Powers (powersj) wrote :

Four CI failures:

https://jenkins.ubuntu.com/server/job/simplestreams-ci/39/nodes=metal-ppc64el/console

simplestreams/openstack.py:138:8: E111 indentation is not a multiple of four
simplestreams/openstack.py:144:8: E111 indentation is not a multiple of four

======================================================================
FAIL: test_create_glance_properties (tests.unittests.test_glancemirror.TestGlanceMirror)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/slaves/axew/workspace/simplestreams-ci/nodes/metal-ppc64el/ss-39/tests/unittests/test_glancemirror.py", line 256, in test_create_glance_properties
    properties)
AssertionError: {'con[19 chars]1', 'os_version': '16.04', 'version_name': 'X'[190 chars]ntu'} != {'con[19 chars]1', 'version_name': 'X', 'simplestreams_metada[144 chars]ntu'}
  {'content_id': 'content-1',
   'item_name': 'disk1.img',
- 'os_distro': 'ubuntu',
- 'os_version': '16.04',
   'product_name': 'foobuntu',
   'simplestreams_metadata': '{"extra": "value", "os": "ubuntu", "version": '
                             '"16.04"}',
   'source_content_id': 'source-1',
   'version_name': 'X'}

======================================================================
FAIL: test_insert_item_full (tests.unittests.test_glancemirror.TestGlanceMirror)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/lib/jenkins/slaves/axew/workspace/simplestreams-ci/nodes/metal-ppc64el/ss-39/tests/unittests/test_glancemirror.py", line 595, in test_insert_item_full
    self.assertEqual(expected_create_kwargs, passed_create_kwargs)
AssertionError: {'con[62 chars]c', 'os_version': '14.04', 'version_name': '20[878 chars]3f1'} != {'con[62 chars]c', 'architecture': 'x86_64', 'version_name': [832 chars]3f1'}
Diff is 1866 characters long. Set self.maxDiff to None to see it.
-------------------- >> begin captured stdout << ---------------------
created image-1: auto-sync/ubuntu-trusty-14.04-amd64-server-20160602-disk1.img

--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
sstreams: DEBUG: getting local copy of http://image-store/fooubuntu-X-disk1.img
--------------------- >> end captured logging << ---------------------

Revision history for this message
David Ames (thedac) wrote :

Scott,

Note, I had to revert the following to get unit tests to pass.

=== modified file 'simplestreams/mirrors/glance.py'
--- simplestreams/mirrors/glance.py 2017-08-22 17:41:18 +0000
+++ simplestreams/mirrors/glance.py 2017-09-11 16:44:40 +0000
@@ -272,8 +272,8 @@
                 name_old, name_new = carry_over_property
             else:
                 name_old = name_new = carry_over_property
- if name_new in image_metadata:
- properties[name_new] = image_metadata[name_old]
+ properties[name_new] = image_metadata[name_old]

         if 'arch' in image_metadata:
             properties['architecture'] = canonicalize_arch(

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Ames (thedac) wrote :

That change is required. Looking at how to fix the unit tests.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
David Ames (thedac) wrote :

This has been tested against v3 and v2 clouds. Ready for merge.

Revision history for this message
Scott Moser (smoser) wrote :

Thank you David!

Revision history for this message
Scott Moser (smoser) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: