Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1057623 - openstack-keystone package in Grizzly RHOS is broken
Summary: openstack-keystone package in Grizzly RHOS is broken
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-keystone
Version: 3.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.0
Assignee: Alan Pevec
QA Contact: Ami Jeain
Depends On: 1057621
TreeView+ depends on / blocked
Reported: 2014-01-24 13:43 UTC by Martin Magr
Modified: 2016-04-26 20:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1057621
Last Closed: 2014-02-26 23:41:31 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Martin Magr 2014-01-24 13:43:26 UTC
+++ This bug was initially created as a clone of Bug #1057621 +++

Description of problem:
There is duplication of [DEFAULT] section in /etc/keystone/keystone.conf after installation of Grizzly RDO's openstack-keystone package.

Version-Release number of selected component (if applicable):
[para@localhost ~]$ rpm -qa openstack-keystone

How reproducible:

Steps to Reproduce:
[para@localhost ~]$ sudo yum install openstack-keystone
Loaded plugins: langpacks, priorities, refresh-packagekit
Resolving Dependencies
  openstack-keystone.noarch 0:2013.1.4-2.fc19                                                               
[para@localhost ~]$ sudo cat /etc/keystone/keystone.conf | grep -n DEFAULT

From my investigation it's openstack-config issue, but before it will be fixed there we should probably stop using it in our spec files:
[para@localhost ~]$ wget
[para@localhost ~]$ cat keystone.conf.sample | grep -n DEFAULT
[para@localhost ~]$ openstack-config --set keystone.conf.sample DEFAULT log_file /var/log/keystone/keystone.log
[para@localhost ~]$ cat keystone.conf.sample | grep -n DEFAULT
[para@localhost ~]$ 

[para@localhost ~]$ wget
--2014-01-24 08:38:16--
2014-01-24 08:38:16 (448 KB/s) - ‘keystone.conf.sample.1’ saved [16778/16778]
[para@localhost ~]$ openstack-config --set keystone.conf.sample.1 DEFAULT onready keystone.common.systemd
[para@localhost ~]$ cat keystone.conf.sample | grep -n DEFAULT
[para@localhost ~]$ 

Note that other sections don't get duplicated.

Actual results:
Duplicated DEFAULT section header in conf file.

Expected results:
Single DEFAULT section header in conf file.

Additional info:
This is breaking installations via Puppet since conf provider used in puppet-keystone deletes both [DEFAULT] headers and creates it's own at the end of the conf file. For more info see

Comment 1 Nathan Kinder 2014-02-26 20:23:57 UTC
I've added some details on this problem to the RDO bug:

The real problem here is in the crudini package, as it doesn't deal with an empty DEFAULT section properly.  We could either fix crudini, or we could work around this in openstack-keystone by changing the way we change the default keystone.conf in the %build section of the spec file.  For the workaround approach, we would need to do one of the following:

1 - Add the log_file setting to keystone.conf using something other than openstack-config/crudini from the spec file.

2 - Ensure that at least one value is set in the DEFAULT section of keystone.conf.sample in the source tarball (or via a patch in the SRPM).

3 - Remove the DEFAULT section header from keystone.conf.sample in the source tarball (or via a patch in the SRPM).

Option 3 is the easiest approach, though it might also be easy to go with option 2 by explicitly defining a setting to it's implicit default.

Comment 2 Nathan Kinder 2014-02-26 23:41:31 UTC
This issue actually doesn't affect RHOS 3.0.  In RHOS 3.0, openstack-config is not a wrapper around crudini.  The implementation of openstack-config does not have the problem of creating duplicate DEFAULT section lines.

In RHOS 4.0, crudini is used, but the openstack-keystone spec file does not call openstack-config.  This avoids the problem.

A bit more info for the sake of completeness:

- An upstream fix for crudini has been proposed to prevent this sort of issue in the future.

- RDO/Grizzly on F19 does have this problem since it uses crudini.  This will be addressed in bug 1057621.

Closing this as NOTABUG.

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