ERROR was raised when no custmo config file matches in generate_sample.sh

Bug #1251297 reported by ChangBo Guo(gcb)
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
High
Ben Nemec

Bug Description

In generate_sample.sh, the following code will fail when there is no file matches $BASEDIR/tools/config/*.conf.sample, CONCAT_FILE will be set with $BASEDIR/tools/config/*.conf.sample. An ERROR will be raised :
cat: ${BASEDIR}/tools/config/*.conf.sample: No such file or directory

for CONCAT_FILE in $BASEDIR/tools/config/*.conf.sample; do

    cat $CONCAT_FILE >> $OUTPUTFILE

done

Need get vlaue of 'ls $BASEDIR/tools/config/*.conf.sample' first to make sure we are passing right value to variable CONCAT_FILE.

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

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

Changed in oslo:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress
Changed in oslo:
assignee: ChangBo Guo (guochbo) → Ben Nemec (bnemec)
Ben Nemec (bnemec)
Changed in oslo:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/56409
Committed: http://github.com/openstack/oslo-incubator/commit/ddc4f0d002b17c6eeb9c132d11ba1c110ab60391
Submitter: Jenkins
Branch: master

commit ddc4f0d002b17c6eeb9c132d11ba1c110ab60391
Author: Chang Bo Guo <email address hidden>
Date: Thu Nov 14 07:20:27 2013 -0800

    Fix error when no custom config file matches *.conf.sample

    In generate_sample.sh, an error will be raised when no custom config
    files match '$BASEDIR/tools/config/*.conf.sample', because CONCAT_FILE
    will be set with value '$BASEDIR/tools/config/*.conf.sample'.

    for CONCAT_FILE in $BASEDIR/tools/config/*.conf.sample; do

        cat $CONCAT_FILE >> $OUTPUTFILE

    done

    This path will check match result first to avoid the error.

    Closes-Bug: #1251297
    Change-Id: I4bb2036b1d385e8f7621cbd8b14134f12618230d

Changed in oslo:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: icehouse-1 → 2014.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.