Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 914759 - nova-dhcpbridge does not support nova.conf and nova-dist.conf at the same time
nova-dhcpbridge does not support nova.conf and nova-dist.conf at the same time
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova (Show other bugs)
2.1
Unspecified Unspecified
high Severity high
: snapshot4
: 2.1
Assigned To: Brent Eagles
Kashyap Chamarthy
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-22 12:08 EST by Russell Bryant
Modified: 2016-04-26 12:45 EDT (History)
7 users (show)

See Also:
Fixed In Version: openstack-nova-2012.2.3-2.el6ost
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-21 14:16:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1131932 None None None Never
OpenStack gerrit 22746 None None None Never
Red Hat Product Errata RHSA-2013:0657 normal SHIPPED_LIVE Moderate: openstack-nova security, bug fix, and enhancement update 2013-03-21 18:12:14 EDT

  None (edit)
Description Russell Bryant 2013-02-22 12:08:32 EST
Description of problem:

The openstack-nova package was recently updated to have a nova-dist.conf file that includes distribution default values for configuration options.  Nova services read both /etc/nova/nova.conf and /usr/share/nova/nova-dist.conf.

Nova also includes a binary called nova-dhcpbridge.  This is executed by dnsmasq.  The configuration file that nova-dhcpbridge uses is passed to it via an environment variable.  The environment variable is populated with the value of the dhcpbridge_flagfile nova configuration option.  The problem is that only one configuration file can be specified in this option.  We need to support two.

My thoughts on fixing this ...

1) Convert the dhcpbridge_flagfile option to a MultiStrOpt, which allows a list of values.

2) Update our nova-dist.conf to set this option with both /usr/share/nova/nova-dist.conf and /etc/nova/nova.conf.

3) Update bin/nova-dhcpbridge to be able to handle receiving multiple configuration files in the FLAGFILE env var.
Comment 1 Russell Bryant 2013-02-22 12:10:26 EST
I think the code changes (not the nova-dist.conf update) make sense to submit for master upstream.  It probably won't make sense to backport to stable/folsom upstream, so we'll have to carry it as a patch.
Comment 6 Kashyap Chamarthy 2013-03-20 03:18:47 EDT
VERIFIED.


1] Version info:
#-------------#
$ cat /etc/redhat-release ; arch
Red Hat Enterprise Linux Server release 6.4 (Santiago)
x86_64
#-------------#


Verification info:
=================

2] grep the nova-dist.conf file, it's updated with both the values used by dhcpbridge_flagfile ( because now, it's converted to use a MultiStrOpt, so it takes multiple values)

#-------------#
$ sudo grep dhcpbridge_flagfile /usr/share/nova/nova-dist.conf 
dhcpbridge_flagfile = /usr/share/nova/nova-dist.conf
dhcpbridge_flagfile = /etc/nova/nova.conf
#-------------#


3] Relevant code fragment from the patch referenced.

3.1] For the MultiStrOpt:
#-------------#
.
.
    cfg.MultiStrOpt('dhcpbridge_flagfile',
               default='[/etc/nova/nova-dhcpbridge.conf]',
               help='location of flagfile for dhcpbridge'),
.
.
#-------------#

3.2] bin/nova-dhcpbridge indicating the ability to take multiple values via flagfile env var:
#-------------#
.
.
    """Parse environment and arguments and call the approproate action."""
    flagfile = os.environ.get('FLAGFILE', FLAGS.dhcpbridge_flagfile)
    argv = flags.parse_args(sys.argv,
        default_config_files=jsonutils.loads(flagfile))
    logging.setup("nova")

    if int(os.environ.get('TESTING', '0')):
#-------------#


4] Evidence of dnsmasq executing nova-dhcpbridge:
#-------------#
$ ps -ef | grep -i nova-dhcpbridge
nobody   25857     1  0 Feb13 ?        00:01:32 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-demonetbr0.pid --listen-address=10.65.207.49 --except-interface=lo --dhcp-range=set:'net1',10.65.207.50,static,120s --dhcp-lease-max=16 --dhcp-hostsfile=/var/lib/nova/networks/nova-demonetbr0.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
root     25858 25857  0 Feb13 ?        00:01:04 /usr/sbin/dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-demonetbr0.pid --listen-address=10.65.207.49 --except-interface=lo --dhcp-range=set:'net1',10.65.207.50,static,120s --dhcp-lease-max=16 --dhcp-hostsfile=/var/lib/nova/networks/nova-demonetbr0.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
tuser1   63550 78910  0 12:44 pts/6    00:00:00 grep -i nova-dhcpbridge
#-------------#
Comment 8 errata-xmlrpc 2013-03-21 14:16:52 EDT
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-0657.html

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