[Bug 1611987] Re: glance-simplestreams-sync charm doesn't support keystone v3

2018-04-24 Thread Felipe Reyes
** Description changed:

+ [Impact]
+ 
+ simplestreams can't sync images when keystone is configured to use v3,
+ keystone v2 is deprecated since mitaka[0] (the version shipped with
+ xenial)
+ 
+ The OpenStack Keystone charm supports v3 only since Queens and later[1]
+ 
+ [Test Case]
+ 
+ * deploy a openstack environment with keystone v3 enabled
+   - get a copy of the bundle available at 
http://paste.ubuntu.com/p/hkhsHKqt4h/ , this bundle deploys a minimal version 
of xenial-mitaka.
+ 
+ Expected result:
+ 
+ - "glance image-list" lists trusty and xenial images
+ - the file glance-simplestreams-sync/0:/var/log/glance-simplestreams-sync.log 
contains details of the images pulled from cloud-images.u.c (example: 
https://pastebin.ubuntu.com/p/RWG8QrkVDz/ )
+ 
+ Actual result:
+ 
+ - "glance image-list" is empty
+ - the file glance-simplestreams-sync/0:/var/log/glance-simplestreams-sync.log 
contains the following stacktrace
+ INFO * 04-09 22:04:06 [PID:14571] * root * Calling DryRun mirror to get item 
list
+ ERROR * 04-09 22:04:06 [PID:14571] * root * Exception during syncing:
+ Traceback (most recent call last):
+   File "/usr/share/glance-simplestreams-sync/glance-simplestreams-sync.py", 
line 471, in main
+ do_sync(charm_conf, status_exchange)
+   File "/usr/share/glance-simplestreams-sync/glance-simplestreams-sync.py", 
line 232, in do_sync
+ objectstore=store)
+   File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/glance.py", 
line 374, in __init__
+ super(ItemInfoDryRunMirror, self).__init__(config, objectstore)
+   File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/glance.py", 
line 126, in __init__
+ self.keystone_creds = openstack.load_keystone_creds()
+   File "/usr/lib/python2.7/dist-packages/simplestreams/openstack.py", line 
61, in load_keystone_creds
+ raise ValueError("(tenant_id or tenant_name)")
+ ValueError: (tenant_id or tenant_name)
+ 
+ [Regression Potential]
+ 
+ * A possible regression will manifest itself figuring out if v2 or v3
+ should be used, after the connection is made there are no further
+ changes introduced by this SRU
+ 
+ [Other Info]
+ 
  I was deploying a Mitaka Trusty 16.04 charm based Openstack cloud (using
  the cloud archives), including glance-simplestreams-sync, using keystone
  v3.
  
  Once I had everything deployed, the glance-simplestreams-sync service
  couldn't authenticate because it's using keystone v2, not v3, as you can
  see from the following:
  
  INFO  * 08-10 23:16:01 [PID:33554] * root * glance-simplestreams-sync 
started.
  DEBUG * 08-10 23:16:01 [PID:33554] * keystoneclient.session * REQ: curl 
-i -X POST http://x.y.z.240:5000/v2.0/tokens -H "Content-Type: 
application/json" -H "User-Agent: python-keystoneclient" -d '{"auth": 
{"passwordCredentials": {"username": "image-stream", "password": 
"thisisnotapassword"}, "tenantId": "blahblahtenantidblahblah"}}'
  INFO  * 08-10 23:16:01 [PID:33554] * urllib3.connectionpool * Starting 
new HTTP connection (1): x.y.z.240
  DEBUG * 08-10 23:16:01 [PID:33554] * urllib3.connectionpool * Setting 
read timeout to None
  DEBUG * 08-10 23:16:01 [PID:33554] * urllib3.connectionpool * "POST 
/v2.0/tokens HTTP/1.1" 401 114
  DEBUG * 08-10 23:16:01 [PID:33554] * keystoneclient.session * RESP: [401] 
CaseInsensitiveDict({'content-length': '114', 'vary': 'X-Auth-Token', 'server': 
'Apache/2.4.7 (Ubuntu)', 'date': 'Wed, 10 Aug 2016 23:16:01 GMT', 
'www-authenticate': 'Keystone uri="http://x.y.z.240:5000";', 
'x-openstack-request-id': 'req-f8aaf12d-01ea-46be-869a-6948ab38361b', 
'content-type': 'application/json', 'x-distribution': 'Ubuntu'})
  RESP BODY: {"error": {"message": "The request you have made requires 
authentication.", "code": 401, "title": "Unauthorized"}}
  
  DEBUG * 08-10 23:16:01 [PID:33554] * keystoneclient.session * Request 
returned failure status: 401
  DEBUG * 08-10 23:16:01 [PID:33554] * keystoneclient.v2_0.client * 
Authorization Failed.
  
  Please update the charm to understand when its using keystone v3 and use
  the right auth methods.
  
  Related bugs:
-  * bug 1686437: glance sync: need keystone v3 auth support
+  * bug 1686437: glance sync: need keystone v3 auth support

** Summary changed:

- glance-simplestreams-sync charm doesn't support keystone v3
+ [SRU] glance-simplestreams-sync charm doesn't support keystone v3

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1611987

Title:
  [SRU] glance-simplestreams-sync charm doesn't support keystone v3

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-glance-simplestreams-sync/+bug/1611987/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1611987] Re: glance-simplestreams-sync charm doesn't support keystone v3

2018-04-23 Thread Junien Fridrick
I can confirm that the workaround proposed in #13 works. Small twist
though : updating the "source" of an already installed glance-
simplestream-sync application won't do anything, since the "source"
option is only used at install time. You'll want to manually add the PPA
and upgrade the python-simplestreams package.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1611987

Title:
  glance-simplestreams-sync charm doesn't support keystone v3

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-glance-simplestreams-sync/+bug/1611987/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1611987] Re: glance-simplestreams-sync charm doesn't support keystone v3

2018-04-13 Thread Launchpad Bug Tracker
This bug was fixed in the package simplestreams - 0.1.0~bzr460-0ubuntu1

---
simplestreams (0.1.0~bzr460-0ubuntu1) bionic; urgency=medium

  * New upstream snapshot.
- Glance: handle Keystone v2 session based authentication.
  [David Ames] (LP: #1611987)

 -- Scott Moser   Thu, 12 Apr 2018 12:50:58 -0400

** Changed in: simplestreams (Ubuntu Bionic)
   Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1611987

Title:
  glance-simplestreams-sync charm doesn't support keystone v3

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-glance-simplestreams-sync/+bug/1611987/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1611987] Re: glance-simplestreams-sync charm doesn't support keystone v3

2018-04-12 Thread Ryan Beisner
As of today, the charm @ git master can deploy Xenial-Queens, using
ksv3, and sync images, if the dev ppa of simplestreams is used.  There
are SRUs of simplestreams packages underway.

We've added a test suite to the charm as well, which is what has allowed
us to confirm the combos which are ok, and raise simplestreams
regression reports against those that are not.  We will be adding that
test suite to a charm test gate in gerrit ASAP, to keep it all healthy
going forward.

The updated charm will not be released to the charm store until we can
verify that it actually works where expected and that it does not
regress functionality on the existing releases.  This validation is in
tandem with the simplestreams SRU.

 Workaround and Verification:
Use the charm at current master and set the 'source' charm config at 
deploy-time to 'ppa:simplestreams-dev/trunk' to pick up the version of 
simplestreams which supports ksv3.

We have not yet tested a charm-upgrade and post-deploy package upgrade
scenario, but that should also be possible.  If anyone validates that
before we do, please report back on this bug with your findings.

 Repo:
https://github.com/openstack-charmers/charm-glance-simplestreams-sync

https://github.com/openstack-charmers/charm-glance-simplestreams-
sync/commit/d8355af37c1b8683b33b39c873a672abdfa3eb2c

 Workload status correction:
Earlier in this bug, I observed that this charm had not implemented workload 
status updates, but it has, with some caveats.

The charm will show in an unknown state until the first image sync
begins.  If the sync never begins, the workload status is never updated.
That condition exists today by default with the released version of
simplestreams on Xenial, when used with ksv3, hence no workload status
in my initial test case.

Ex. when things go well, workload status is updated and helpful:

glance-simplestreams-sync/1*  maintenance  idle   610.5.0.3
Synchronising images

We will keep this bug updated as it all progresses.

** Changed in: charm-glance-simplestreams-sync
   Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1611987

Title:
  glance-simplestreams-sync charm doesn't support keystone v3

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-glance-simplestreams-sync/+bug/1611987/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1611987] Re: glance-simplestreams-sync charm doesn't support keystone v3

2018-04-12 Thread Ryan Beisner
** Changed in: charm-glance-simplestreams-sync
   Status: Triaged => In Progress

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1611987

Title:
  glance-simplestreams-sync charm doesn't support keystone v3

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-glance-simplestreams-sync/+bug/1611987/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1611987] Re: glance-simplestreams-sync charm doesn't support keystone v3

2018-04-12 Thread Ryan Beisner
** Changed in: charm-glance-simplestreams-sync
 Assignee: (unassigned) => Ryan Beisner (1chb1n)

** Changed in: charm-glance-simplestreams-sync
Milestone: None => 18.05

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1611987

Title:
  glance-simplestreams-sync charm doesn't support keystone v3

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-glance-simplestreams-sync/+bug/1611987/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1611987] Re: glance-simplestreams-sync charm doesn't support keystone v3

2018-04-12 Thread Launchpad Bug Tracker
** Branch linked: lp:simplestreams

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1611987

Title:
  glance-simplestreams-sync charm doesn't support keystone v3

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-glance-simplestreams-sync/+bug/1611987/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1611987] Re: glance-simplestreams-sync charm doesn't support keystone v3

2018-04-12 Thread Scott Moser
** Branch linked: lp:~thedac/simplestreams/lp1611987

** Also affects: simplestreams
   Importance: Undecided
   Status: New

** Also affects: simplestreams (Ubuntu)
   Importance: Undecided
   Status: New

** Changed in: simplestreams (Ubuntu)
   Status: New => Confirmed

** Changed in: simplestreams (Ubuntu)
   Importance: Undecided => Medium

** Changed in: simplestreams
   Status: New => Confirmed

** Changed in: simplestreams
   Importance: Undecided => Medium

** Changed in: simplestreams
 Assignee: (unassigned) => David Ames (thedac)

** Also affects: simplestreams (Ubuntu Bionic)
   Importance: Medium
   Status: Confirmed

** Also affects: simplestreams (Ubuntu Artful)
   Importance: Undecided
   Status: New

** Also affects: simplestreams (Ubuntu Xenial)
   Importance: Undecided
   Status: New

** Changed in: simplestreams (Ubuntu Xenial)
   Status: New => Confirmed

** Changed in: simplestreams (Ubuntu Artful)
   Status: New => Confirmed

** Changed in: simplestreams (Ubuntu Xenial)
   Importance: Undecided => Medium

** Changed in: simplestreams (Ubuntu Artful)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1611987

Title:
  glance-simplestreams-sync charm doesn't support keystone v3

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-glance-simplestreams-sync/+bug/1611987/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs