RDO tickets are now tracked in Jira https://issues.redhat.com/projects/RDO/issues/
Bug 1213149 - openstack-keystone service is in " failed " status when CONFIG_KEYSTONE_SERVICE_NAME=httpd
Summary: openstack-keystone service is in " failed " status when CONFIG_KEYSTONE_SERVI...
Keywords:
Status: CLOSED EOL
Alias: None
Product: RDO
Classification: Community
Component: openstack-packstack
Version: trunk
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: Kilo
Assignee: Nathan Kinder
QA Contact: Shai Revivo
URL:
Whiteboard:
Depends On:
Blocks: 1218771 1219261
TreeView+ depends on / blocked
 
Reported: 2015-04-19 13:29 UTC by Eran Kuris
Modified: 2017-05-01 13:55 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1218771 (view as bug list)
Environment:
Last Closed: 2016-05-19 15:53:55 UTC
Embargoed:


Attachments (Terms of Use)

Description Eran Kuris 2015-04-19 13:29:36 UTC
Description of problem:
Installed RDO with packstack and in answer file keystone service configured to "httpd"  , CONFIG_KEYSTONE_SERVICE_NAME=httpd 
as a result openstack-keystone service is in failed status.  

Version-Release number of selected component (if applicable):
AllInOne RHEL 7.1 RDO
# rpm -qa |grep rdo
rubygem-rdoc-4.0.0-24.el7.noarch
[root@puma16 ~]# rpm -qa |grep keystone
python-keystonemiddleware-1.5.0-post10.el7.centos.noarch
openstack-keystone-2015.2-dev31.el7.centos.noarch
python-keystone-2015.2-dev31.el7.centos.noarch
python-keystoneclient-1.3.0-post24.el7.centos.noarch

How reproducible:

Install RDO with packstack (ceilometer- disable in answer-file)
In answer file : CONFIG_KEYSTONE_SERVICE_NAME=httpd 
Steps to Reproduce:
1.Install RDO AIO ENV : https://www.rdoproject.org/Quickstart
2.# openstack-status 
== Nova services ==
openstack-nova-api:                     active
openstack-nova-cert:                    active
openstack-nova-compute:                 active
openstack-nova-network:                 inactive  (disabled on boot)
openstack-nova-scheduler:               active
openstack-nova-conductor:               active
== Glance services ==
openstack-glance-api:                   active
openstack-glance-registry:              active
== Keystone service ==
openstack-keystone:                     failed
3.# openstack-service openstack-keystone status
Unknown operation 'openstack-keystone'.
[root@puma16 ~(keystone_admin)]# service openstack-keystone status
Redirecting to /bin/systemctl status  openstack-keystone.service
openstack-keystone.service - OpenStack Identity Service (code-named Keystone)
   Loaded: loaded (/usr/lib/systemd/system/openstack-keystone.service; enabled)
   Active: failed (Result: start-limit) since Sun 2015-04-19 16:01:10 IDT; 17min ago
  Process: 23782 ExecStart=/usr/bin/keystone-all (code=exited, status=1/FAILURE)
 Main PID: 23782 (code=exited, status=1/FAILURE)

Apr 19 16:01:10 puma16.scl.lab.tlv.redhat.com systemd[1]: Failed to start OpenStack Identity Service (code-named Keystone).
Apr 19 16:01:10 puma16.scl.lab.tlv.redhat.com systemd[1]: Unit openstack-keystone.service entered failed state.
Apr 19 16:01:10 puma16.scl.lab.tlv.redhat.com systemd[1]: openstack-keystone.service holdoff time over, scheduling restart.
Apr 19 16:01:10 puma16.scl.lab.tlv.redhat.com systemd[1]: Stopping OpenStack Identity Service (code-named Keystone)...
Apr 19 16:01:10 puma16.scl.lab.tlv.redhat.com systemd[1]: Starting OpenStack Identity Service (code-named Keystone)...
Apr 19 16:01:10 puma16.scl.lab.tlv.redhat.com systemd[1]: openstack-keystone.service start request repeated too quickly, refusing to start.
Apr 19 16:01:10 puma16.scl.lab.tlv.redhat.com systemd[1]: Failed to start OpenStack Identity Service (code-named Keystone).
Apr 19 16:01:10 puma16.scl.lab.tlv.redhat.com systemd[1]: Unit openstack-keystone.service entered failed state.
[root@puma16 ~(keystone_admin)]# cat answers.txt |grep httpd
# httpd). ['keystone', 'httpd']
CONFIG_KEYSTONE_SERVICE_NAME=httpd

Actual results:
openstack-keystone: failed
keystone actual work in the background 
Expected results:
 
openstack-keystone: "run with httpd" --> for example or other explain or message 
Additional info:
it is relevant also to latest OSP6

Comment 1 Eran Kuris 2015-04-19 14:03:08 UTC
RDO Kilo

Comment 2 Nathan Kinder 2015-04-19 18:19:15 UTC
When Keystone is deployed in httpd, we need to make changes similar to the following in openstack-status:

--- /root/openstack-status	2015-04-19 18:12:50.863396965 +0000
+++ /bin/openstack-status	2015-04-19 18:17:41.834446593 +0000
@@ -29,7 +29,7 @@
 rpm -q openstack-nova-common > /dev/null && nova='nova'
 rpm -q openstack-glance > /dev/null && glance='glance'
 rpm -q openstack-dashboard > /dev/null && dashboard='httpd'
-rpm -q openstack-keystone > /dev/null && keystone='keystone'
+rpm -q openstack-keystone > /dev/null && keystone='httpd'
 rpm -q openstack-neutron > /dev/null && neutron='neutron' ||
 { rpm -q openstack-quantum > /dev/null && neutron='quantum'; }
 rpm -q openstack-swift > /dev/null && swift='swift'
@@ -134,7 +134,10 @@
 
 if test "$keystone"; then
   printf "== Keystone service ==\n"
-  for svc in $keystone; do check_svc "openstack-$svc"; done
+  keystone_status="$(curl -L -s -w '%{http_code}\n' http://localhost:5000/v3 -o /dev/null)"
+  [ "$keystone_status" = 200 ] && keystone_status=active
+  [ "$keystone_status" = 000 ] && keystone_status=uncontactable
+  printf '%-40s%s\n' "openstack-keystone:" "$keystone_status"
 fi
 
 if test "$dashboard"; then

Comment 3 Rich Megginson 2015-05-05 20:07:23 UTC
What if we just made the openstack-keystone service an alias to httpd?  Then when you did things like

# service openstack-keystone status
or
# systemctl restart openstack-keystone

It would just restart httpd instead.  Note that this means it will affect _all_ httpd apps (horizon, nagios, php, etc.) that use the same apache, so that could be a problem.  AFAIK there is no way to just restart one or more Apache VirtualHosts.

Comment 4 Rich Megginson 2015-05-06 16:39:09 UTC
Ok.  Here one extremely simple workaround:

# ln -s /usr/lib/systemd/system/httpd.service /etc/systemd/system/openstack-keystone.service
# systemctl daemon-reload

What this does is make "openstack-keystone" an "alias" for httpd.  So now, all of the commands work, and they operate on httpd instead:

# openstack-status
...
openstack-keystone:  active
...

# openstack-service status openstack-keystone
MainPID=5555 Id=httpd.service ActiveState=active

# systemctl status openstack-keystone
* httpd.service - The Apache HTTPD Server
  Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
  ... other httpd stuff ...
  CGroup: /system.slice/httpd.service
          ...
          55551 - keystone-admin  -DFOREGROUND
          55552 - keystone-main   -DFOREGROUND
          ... other procs ...

Is this acceptable?

Comment 5 Alan Pevec (Fedora) 2015-05-06 17:03:05 UTC
> # ln -s /usr/lib/systemd/system/httpd.service
> /etc/systemd/system/openstack-keystone.service

Sounds good, this should remove eventlet based service provided by openstack-keystone RPM.
Could this fit into puppet-keystone, to create this symlink when httpd is used to deploy keystone?

Comment 6 Alan Pevec (Fedora) 2015-05-06 17:04:44 UTC
> this should remove eventlet based service

I meant, remove it out of the picture i.e. services in /etc have precedence

Comment 9 Chandan Kumar 2016-05-19 15:53:55 UTC
This bug is against a Version which has reached End of Life.
If it's still present in supported release (http://releases.openstack.org), please update Version and reopen.


Note You need to log in before you can comment on or make changes to this bug.