openstack devstack installation fails on RHEL7

Bug #1532998 reported by Surojit Pathak
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Federico Ressi

Bug Description

devstack deployment on RHEL7 is failing after 2cb3db338a17bd26fef1f56fc155be5d01a6ef7e

[suro@oxy-dev devstack (master)]$ pwd
/opt/stack/devstack
[suro@oxy-dev devstack (master)]$ git log -1
commit 2cb3db338a17bd26fef1f56fc155be5d01a6ef7e
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-7-5.noarch 1/1
  Verifying : epel-release-7-5.noarch 1/1

Installed:
  epel-release.noarch 0:7-5

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.sh:307:_install_epel_and_rdo
./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)
Revision history for this message
Surojit Pathak (suro-patz) wrote :

The issue is with https://github.com/openstack-dev/devstack/commit/2cb3db338a17bd26fef1f56fc155be5d01a6ef7e

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 ~]$

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/266079

Changed in devstack:
status: New → In Progress
Revision history for this message
Steven Hardy (shardy) wrote :

This is also broken on Fedora 23.

I can confirm the "Fixing PIPESTATUS usage" patch resolves the issue - I assume the revert also would but I've not tested it.

Changed in devstack:
assignee: Surojit Pathak (suro-patz) → Federico Ressi (federico-ressi-9)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on devstack (master)

Change abandoned by Surojit Pathak (<email address hidden>) on branch: master
Review: https://review.openstack.org/266079
Reason: Abandoning the patch in favor of https://review.openstack.org/#/c/266874/7

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.