If FUNCNAME[0] is undefined and 'set -u' used, devstack can fail

Bug #1543749 reported by Surojit Pathak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
John L. Villalovos

Bug Description

While following ironic-devstack instructions, as per [1], on RHEL7.1, I am encountering an error at create_bridge_and_vms step[2], while running stack.sh

[1] - http://docs.openstack.org/developer/ironic/dev/dev-quickstart.html#deploying-ironic-with-devstack

[2] - 2016-02-08 23:47:44.331 | ++ /opt/stack/ironic/devstack/lib/ironic:create_bridge_and_vms:L583: sudo su stack -c /opt/stack/ironic/devstack/tools/ironic/scripts/setup-network.sh
2016-02-08 23:47:44.331 | /opt/stack/ironic/devstack/tools/ironic/scripts/setup-network.sh: line 10: FUNCNAME[0]: unbound variable

Changed in devstack:
assignee: nobody → Surojit Pathak (suro-patz)
Revision history for this message
John L. Villalovos (happycamp) wrote :

I believe that this issue is actually caused by the PS4 variable.

It is set in devstack/stackrc as:

export PS4='+ ${BASH_SOURCE}:${FUNCNAME[0]}:L${LINENO}: '

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (master)

Fix proposed to branch: master
Review: https://review.openstack.org/278097

Changed in devstack:
assignee: Surojit Pathak (suro-patz) → John L. Villalovos (happycamp)
status: New → In Progress
summary: - devstack installation with Ironic fails on RHEL7
+ If FUNCNAME[0] is undefined and 'set -u' used, devstack can fail
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.openstack.org/278097
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=6f013631a27a726ae45e27b209fa769d96d5f069
Submitter: Jenkins
Branch: master

commit 6f013631a27a726ae45e27b209fa769d96d5f069
Author: John L. Villalovos <email address hidden>
Date: Tue Feb 9 13:30:58 2016 -0800

    Handle case where FUNCNAME[0] is undefined

    If FUNCNAME[0] is undefined and 'set -u' has been used it will cause the
    devstack run to fail.

    Handle undefined values in PS4.

    Closes-Bug: #1543749
    Change-Id: I06a013a5e7683e3a3461ff06361d867f61d48e6a

Changed in devstack:
status: In Progress → Fix Released
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.