Bug 971465

Summary: 5.4.3.2. Creating the Public Key Infrastructure Files - Creates log file owned by root.
Product: Red Hat OpenStack Reporter: Stephen Gordon <sgordon>
Component: doc-Installation_and_Configuration_GuideAssignee: Stephen Gordon <sgordon>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: high Docs Contact:
Priority: high    
Version: 3.0Keywords: Documentation
Target Milestone: ---   
Target Release: 3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Red_Hat_OpenStack-Installation_and_Configuration_Guide-3-en-US-3-17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-01 20:25:01 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:

Description Stephen Gordon 2013-06-06 15:15:34 UTC
Document URL: 

https://access.redhat.com/site/documentation//en-US/Red_Hat_OpenStack/3/html/Installation_and_Configuration_Guide/Creating_the_Public_Key_Infrastructure_Files.html

Section Number and Name: 

5.4.3.2. Creating the Public Key Infrastructure Files

Describe the issue: 

keystone-manage pki_setup is run as root. This results in the /var/log/keystone/keystone.log being created and owned by root. As a result when the openstack-keystone service is started it comes up as OK but silently fails in he background:

[root@localhost ~]# service openstack-keystone start
Starting keystone:                                         [  OK  ]
[root@localhost ~]# service openstack-keystone status
keystone dead but pid file exists
[root@localhost ~]# tail /var/log/keystone/keystone.log 
[root@localhost ~]# 

This isn't immediately apparent to the user until the attempt to create the service:

# keystone service-create --name=keystone --type=identity \
>         --description="Keystone Identity Service" 
[Errno 111] Connection refused

Suggestions for improvement: 

Run keystone-manager pki_setup as the keystone user:

su keystone -s /bin/sh -c "keystone-manage pki_setup --keystone-user=keystone --keystone-group=keystone"

Workaround:

Remove /var/log/keystone/keystone.log or change ownership to keystone user.