openstack devstack installation fails on RHEL7
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
devstack |
Fix Released
|
Undecided
|
Federico Ressi |
Bug Description
devstack deployment on RHEL7 is failing after 2cb3db338a17bd2
[suro@oxy-dev devstack (master)]$ pwd
/opt/stack/devstack
[suro@oxy-dev devstack (master)]$ git log -1
commit 2cb3db338a17bd2
Merge: 5453cdd 2babf39
Author: Jenkins <email address hidden>
Date: Mon Jan 11 17:01:33 2016 +0000
Merge "Don't die when yum fails."
[suro@oxy-dev devstack (master)]$
Snippet -
[suro@oxy-dev devstack (master)]$ ./stack.sh
+ unset GREP_OPTIONS
+ umask 022
......
.....
Dependencies Resolved
=======
Package Arch Version Repository Size
=======
Installing:
epel-release noarch 7-5 epel-bootstrap 14 k
Transaction Summary
=======
Install 1 Package
Total download size: 14 k
Installed size: 24 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-
Verifying : epel-release-
Installed:
epel-
Complete!
+ result=0
+ '[' 0 '!=' 0 ']'
+ [[ 1 != 0 ]]
+ echo 1344 'yum install failure'
1344 yum install failure
+ result=1
+ return 1
+ die 286 'Error installing EPEL repo, cannot continue'
+ local exitcode=1
+ set +o xtrace
[Call Trace]
./stack.
./stack.sh:286:die
[ERROR] ./stack.sh:286 Error installing EPEL repo, cannot continue
[suro@oxy-dev devstack (master)]$
affects: | magnum → devstack |
Changed in devstack: | |
assignee: | nobody → Surojit Pathak (suro-patz) |
Changed in devstack: | |
assignee: | Surojit Pathak (suro-patz) → Federico Ressi (federico-ressi-9) |
Changed in devstack: | |
status: | In Progress → Fix Released |
The issue is with https:/ /github. com/openstack- dev/devstack/ commit/ 2cb3db338a17bd2 6fef1f56fc155be 5d01a6ef7e
The usage of PIPESTATUS picks up wrong value. If not used immediately, the variable gets reset and commands executed within fills up the variable again, which leads to an unintended usage.
Following is a small code explaining the issue -
[suro@oxy-dev ~]$ result=0; echo ${PIPESTATUS[0]}; if [ $result != 0 ]; then echo "Does not execute"; elif [ ${PIPESTATUS[0]} != 0 ]; then echo "Should not come here"; fi
0
Should not come here
[suro@oxy-dev ~]$
[suro@oxy-dev ~]$ false | false
[suro@oxy-dev ~]$ echo ${PIPESTATUS[1]} ${PIPESTATUS[0]}
1 1
[suro@oxy-dev ~]$ echo ${PIPESTATUS[1]} ${PIPESTATUS[0]}
0
[suro@oxy-dev ~]$