Bug 903545 - take /usr/share/*dist.conf into account when writing /etc/*conf
Summary: take /usr/share/*dist.conf into account when writing /etc/*conf
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-packstack
Version: 2.0 (Folsom)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: snapshot4
: 2.1
Assignee: Martin Magr
QA Contact: Pavel Sedlák
URL:
Whiteboard:
: 904712 (view as bug list)
Depends On: 903719
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-24 09:29 UTC by Alan Pevec
Modified: 2022-07-09 07:20 UTC (History)
6 users (show)

Fixed In Version: openstack-packstack-2012.2.3-0.1.dev454
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-21 18:25:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
dhcp patch (1.16 KB, patch)
2013-02-25 15:37 UTC, Derek Higgins
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-16581 0 None None None 2022-07-09 07:20:39 UTC
Red Hat Product Errata RHSA-2013:0671 0 normal SHIPPED_LIVE Moderate: openstack-packstack security and bug fix update 2013-03-21 22:22:21 UTC

Description Alan Pevec 2013-01-24 09:29:19 UTC
openstack puppet recipes will override whatever we put in *dist.conf, with its own version in /etc/*.conf, we'll have to make sure

1. these values match up with what the distro default should be
2. the bug is fixed that causes it to blow up if it doesn't see values its expecting

Comment 1 Alan Pevec 2013-01-24 17:03:03 UTC
(In reply to comment #0)
> 2. the bug is fixed that causes it to blow up if it doesn't see values its
> expecting

this was filed as bug 903719

Comment 2 Derek Higgins 2013-02-22 00:08:49 UTC
I went through the conf files for nova, glance and cinder (keystone isn't done yet) to compare the values packstack puts in /etc/*/*conf that conflict with the values that are put in *dist.conf below are the values that stood out

nova.conf differences (openstack-nova-common-2012.2.3-1.el6ost)

rhos : dhcpbridge_flagfile = /usr/share/nova/nova-dist.conf
ps   : dhcpbridge_flagfile=/etc/nova/nova.conf

rhos : force_dhcp_release = True
ps   : force_dhcp_release=false

rhos : rpc_backend = nova.openstack.common.rpc.impl_qpid
ps   : rpc_backend=nova.rpc.impl_qpid

glance-api : openstack-glance-2012.2.3-1.el6ost
# not set in RHOS, but maybe worth mentioning ?
ps   : workers = 2       


there are many others that packstack sets but they either match whats in the dist.conf files or set values needed by the deployment (e.g. sql credentials), which of these should be changed in packstack ?

Comment 3 Russell Bryant 2013-02-22 17:21:35 UTC
(In reply to comment #2)
> I went through the conf files for nova, glance and cinder (keystone isn't
> done yet) to compare the values packstack puts in /etc/*/*conf that conflict
> with the values that are put in *dist.conf below are the values that stood
> out
> 
> nova.conf differences (openstack-nova-common-2012.2.3-1.el6ost)
> 
> rhos : dhcpbridge_flagfile = /usr/share/nova/nova-dist.conf
> ps   : dhcpbridge_flagfile=/etc/nova/nova.conf

Yikes ... this actually exposes a bug with our nova-dist.conf approach.  There is no way to get the nova-dhcpbridge binary to read both config files.  I've filed a bug here:

https://bugzilla.redhat.com/show_bug.cgi?id=914759

As for packstack, it's sort of tricky ... in the case of RHOS, you shouldn't set it at all.  You should let the default in nova-dist.conf stand (to be set to both nova-dist.conf and nova.conf once the above bug is fixed).  In the non-RHOS case, you probably *do* want to set it, and set it to /etc/nova/nova.conf.  The default is /etc/nova/nova-dhcpbridge.conf, which isn't going to exist.

So ... I see a couple of options.  You could check for the existence of nova-dist.conf, and not set the option if it's there.  The other option would be to install a nova-dhcpbridge.conf that is a symlink to nova.conf.  That way if the installed version of nova doesn't set this option, the default value will work by going to nova.conf.

Messy.

> rhos : force_dhcp_release = True
> ps   : force_dhcp_release=false

The upstream default is False.  This seems like a good option to set to True, though.  I would set it to True.
 
> rhos : rpc_backend = nova.openstack.common.rpc.impl_qpid
> ps   : rpc_backend=nova.rpc.impl_qpid

Both will work.  The RHOS version is more correct.  The ps version is supported for backwards compatibility.  I would change it to match RHOS.
 
> glance-api : openstack-glance-2012.2.3-1.el6ost
> # not set in RHOS, but maybe worth mentioning ?
> ps   : workers = 2       
> 
> 
> there are many others that packstack sets but they either match whats in the
> dist.conf files or set values needed by the deployment (e.g. sql
> credentials), which of these should be changed in packstack ?

Comment 4 Derek Higgins 2013-02-25 15:37:51 UTC
Created attachment 702398 [details]
dhcp patch

Removes the line that sets dhcpbridge_flagfile and force_dhcp_release in packstack so that the default in /usr/share/nova.... will be used

Comment 5 Derek Higgins 2013-02-25 15:40:22 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > I went through the conf files for nova, glance and cinder (keystone isn't
> > done yet) to compare the values packstack puts in /etc/*/*conf that conflict
> > with the values that are put in *dist.conf below are the values that stood
> > out
> > 
> > nova.conf differences (openstack-nova-common-2012.2.3-1.el6ost)
> > 
> > rhos : dhcpbridge_flagfile = /usr/share/nova/nova-dist.conf
> > ps   : dhcpbridge_flagfile=/etc/nova/nova.conf
> 
> Yikes ... this actually exposes a bug with our nova-dist.conf approach. 
> There is no way to get the nova-dhcpbridge binary to read both config files.
> I've filed a bug here:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=914759
> 
> As for packstack, it's sort of tricky ... in the case of RHOS, you shouldn't
> set it at all.  You should let the default in nova-dist.conf stand (to be
> set to both nova-dist.conf and nova.conf once the above bug is fixed).  In
> the non-RHOS case, you probably *do* want to set it, and set it to
> /etc/nova/nova.conf.  The default is /etc/nova/nova-dhcpbridge.conf, which
> isn't going to exist.
> 
> So ... I see a couple of options.  You could check for the existence of
> nova-dist.conf, and not set the option if it's there.  The other option
> would be to install a nova-dhcpbridge.conf that is a symlink to nova.conf. 
> That way if the installed version of nova doesn't set this option, the
> default value will work by going to nova.conf.
> 
> Messy.
> 
> > rhos : force_dhcp_release = True
> > ps   : force_dhcp_release=false
> 
> The upstream default is False.  This seems like a good option to set to
> True, though.  I would set it to True.

patch attached to handle both changes above, RHOS will have to carry these changes since they wont work with EPEL

>  
> > rhos : rpc_backend = nova.openstack.common.rpc.impl_qpid
> > ps   : rpc_backend=nova.rpc.impl_qpid
> 
> Both will work.  The RHOS version is more correct.  The ps version is
> supported for backwards compatibility.  I would change it to match RHOS.

changed to match RHOS

>  
> > glance-api : openstack-glance-2012.2.3-1.el6ost
> > # not set in RHOS, but maybe worth mentioning ?
> > ps   : workers = 2       
> > 
> > 
> > there are many others that packstack sets but they either match whats in the
> > dist.conf files or set values needed by the deployment (e.g. sql
> > credentials), which of these should be changed in packstack ?

Comment 6 Derek Higgins 2013-02-28 11:04:37 UTC
*** Bug 904712 has been marked as a duplicate of this bug. ***

Comment 11 Derek Higgins 2013-03-21 14:34:26 UTC
After running packstack you can check the following in nova.conf to verify

dhcpbridge_flagfile : should not be present ad its being set in nova-dist.conf
force_dhcp_release  : should not be present ad its being set in nova-dist.conf
rpc_backend         : nova.openstack.common.rpc.impl_qpid (not nova.rpc.impl_qpid)

Comment 12 Derek Higgins 2013-03-21 15:40:30 UTC
Correction to comment 11

force_dhcp_release  : this should be set to true so it doesn't conflict with whats in  nova-dist.conf

Comment 13 Nir Magnezi 2013-03-21 15:53:16 UTC
(In reply to comment #11)
> After running packstack you can check the following in nova.conf to verify
> 
> dhcpbridge_flagfile : should not be present ad its being set in
> nova-dist.conf

Tested OK.
# grep dhcpbridge_flagfile nova.conf 
#dhcpbridge_flagfile=/etc/nova/nova.conf

> force_dhcp_release  : should not be present ad its being set in
> nova-dist.conf

Ignored due to Comment #12 Correction

> rpc_backend         : nova.openstack.common.rpc.impl_qpid (not
> nova.rpc.impl_qpid)

Tested OK.
# grep rpc_backend nova.conf 
#rpc_backend=nova.openstack.common.rpc.impl_qpid
rpc_backend=nova.openstack.common.rpc.impl_qpid

---

(In reply to comment #12)
> Correction to comment 11
> 
> force_dhcp_release  : this should be set to true so it doesn't conflict with
> whats in  nova-dist.conf

Tested OK.
# grep force_dhcp_release nova.conf 
#force_dhcp_release=True
force_dhcp_release=true

Kashyap, IMHO the bug can be marked as Verified.

Comment 14 Nir Magnezi 2013-03-21 15:59:04 UTC
Supplementary to Comment #13

Verified NVR: openstack-packstack-2012.2.3-0.7.dev475.el6ost.noarch

Comment 15 Pavel Sedlák 2013-03-21 16:19:02 UTC
Verified with openstack-packstack-2012.2.3-0.1.dev454.el6ost.

/etc/nova/nova.conf contains:
  [DEFAULT]
  #dhcpbridge_flagfile=/etc/nova/nova.conf
  #force_dhcp_release=True
  force_dhcp_release=true
  #rpc_backend=nova.openstack.common.rpc.impl_qpid
  rpc_backend=nova.openstack.common.rpc.impl_qpid

/usr/share/nova/nova-dist.conf contains:
  [DEFAULT]
  dhcpbridge_flagfile = /usr/share/nova/nova-dist.conf
  dhcpbridge_flagfile = /etc/nova/nova.conf
  force_dhcp_release = True
  rpc_backend = nova.openstack.common.rpc.impl_qpid


So no conflicting options present:
- dhcpbridge_flagfile is not set by packstack
- force_dhcp_release is set by packstack but to 'true' (not original 'false')
- rpc_backend set by packstack also matches the default one for RHOS

Comment 17 errata-xmlrpc 2013-03-21 18:25:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0671.html


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