[library] nova-network OCF script does not properly detects 'use_ipv6' setting

Bug #1349432 reported by Igor Zinovik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Medium
Igor Zinovik

Bug Description

nova-network OCF script does not properly determines absence of 'use_ipv6' setting in /etc/nova/nova.conf.
This setting is commented by default.

Right now nova-network checks exit code of sed command, which is always true:
nova_network_cleanup()
...
        use_ipv6=$(egrep -e '^use_ipv6' $OCF_RESKEY_config | sed -e 's/$regexp/\1/')

        rc=$?

 # Consider IPv4 when we did not found 'use_ipv6' stanza
 if [ $rc -ne 0 ]; then
  use_ipv6=false
        fi
...

Better way is to check variable length.

Changed in fuel:
assignee: nobody → Igor Zinovik (izinovik)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/109988
Committed: https://git.openstack.org/cgit/stackforge/fuel-library/commit/?id=851b29ac6434c1671078ef293bb25a04dc492f49
Submitter: Jenkins
Branch: master

commit 851b29ac6434c1671078ef293bb25a04dc492f49
Author: Igor Zinovik <email address hidden>
Date: Mon Jul 28 17:56:11 2014 +0400

    Detect absence of 'use_ipv6' stanza in /etc/nova/nova.conf

    - 'use_ipv6' configuration stanza is commented by default in
      /etc/nova/nova.conf. We need to check return code of grep invocation
      to detect this. If stanza is commented we consider IPv4.

    Closes-bug: #1349432
    Change-Id: I6311d02e4bb0ab9e62e5d82c12648cc509d67a9b

Changed in fuel:
status: In Progress → Fix Committed
Changed in fuel:
importance: Undecided → Medium
milestone: none → 5.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.