Bug 812219

Summary: systemctl start returns before keystone is ready
Product: [Fedora] Fedora Reporter: Derek Higgins <derekh>
Component: openstack-keystoneAssignee: Alan Pevec (Fedora) <apevec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: apevec, apevec, bfilippov, breu, jonathansteffan, jpazdziora, markmc, matt_domsch, p, rbryant
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-keystone-2012.2-0.8.rc1.fc18 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-23 17:46:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 820448, 850556, 982376    
Bug Blocks:    

Description Derek Higgins 2012-04-13 06:52:24 UTC
starting keystone-all and immediately trying to use it doesn't work

[root@test ~]# /bin/systemctl stop openstack-keystone.service ; /bin/systemctl start openstack-keystone.service ; /usr/bin/keystone --token keystone_admin_token --endpoint http://127.0.0.1:35357/v2.0/ service-list

Unable to communicate with identity service: 'NoneType' object has no attribute 'makefile'. (HTTP 400)



Adding a delay allows it to work

[root@test ~]# /bin/systemctl stop openstack-keystone.service ; /bin/systemctl start openstack-keystone.service ; sleep 1 ; /usr/bin/keystone --token keystone_admin_token --endpoint http://127.0.0.1:35357/v2.0/ service-list
+----------------------------------+-------------+----------+----------------------------+
|                id                |     name    |   type   |        description         |
+----------------------------------+-------------+----------+----------------------------+
| 47b13f0377844c0598ea375f6f8c2c63 | keystone    | identity | OpenStack Identity Service |
| 6fc27a24ae9646c982ad5d5936a970b1 | nova_ec2    | ec2      | EC2 service                |
| 92f587177d514120b28333b2ebc9da7d | glance      | image    | Openstack Image Service    |
| 9876ca7d32d14d52b95be0de9cde1933 | nova_volume | volume   | Volume Service             |
| e80fd93a16554794b04c12153eb8ec0e | nova        | compute  | Openstack Compute Service  |
+----------------------------------+-------------+----------+----------------------------+


This is a problem in automated environments e.g. puppet

Comment 1 Derek Higgins 2012-04-13 06:54:48 UTC
Bug submitted upstream
https://bugs.launchpad.net/keystone/+bug/980037

and fix suggested that will allow us to use 
Type=notify
in the systemd service unit
https://review.openstack.org/#/c/6489/

Comment 2 Fedora Admin XMLRPC Client 2012-05-22 17:34:37 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Alan Pevec 2012-07-23 08:59:05 UTC
systemd issue workaround from bug 820448 comment 2
implemented for openstack-keystone service
https://review.openstack.org/#/c/9219/

TODO deploy this workaround in all openstack services