Quickstart UI validation step fails

Bug #1739428 reported by David Peacock
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
David Peacock

Bug Description

CentOS 7 target system VIRTHOST
Ubuntu 16.04 deployment desktop

Reliably when deploying tripleo-quickstart via devmode, the validate-ui step fails.

TASK [validate-ui : Create the tripleo-ui simple validate script] **************************************
task path: /home/dpeacock/.quickstart/usr/local/share/ansible/roles/validate-ui/tasks/main.yml:2
Tuesday 19 December 2017 22:31:14 -0500 (0:00:00.149) 2:14:10.437 ******
changed: [localhost] => {"changed": true, "checksum": "12144c81ab71e04cb17135d818120c34c6e90302", "dest": "/home/dpeacock/.quickstart/ui_validate_simple.sh", "failed": false, "gid": 1000, "group": "dpeacock", "md5sum": "ef7faf47a7aaac0ff34b6baeaedffeb5", "mode": "0744", "owner": "dpeacock", "size": 151, "src": "/home/dpeacock/.ansible/tmp/ansible-tmp-1513740674.41-142766567586231/source", "state": "file", "uid": 1000}

TASK [validate-ui : Execute the simple tripleo-ui validation] ******************************************
task path: /home/dpeacock/.quickstart/usr/local/share/ansible/roles/validate-ui/tasks/main.yml:8
Tuesday 19 December 2017 22:31:14 -0500 (0:00:00.319) 2:14:10.757 ******
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "set -o pipefail && /home/dpeacock/.quickstart/ui_validate_simple.sh | tee validate_ui_simple.log", "delta": "0:00:00.001337", "end": "2017-12-19 22:31:14.812503", "failed": true, "msg": "non-zero return code", "rc": 2, "start": "2017-12-19 22:31:14.811166", "stderr": "/bin/sh: 1: set: Illegal option -o pipefail", "stderr_lines": ["/bin/sh: 1: set: Illegal option -o pipefail"], "stdout": "", "stdout_lines": []}

PLAY RECAP *********************************************************************************************
gandalf : ok=149 changed=72 unreachable=0 failed=0
localhost : ok=20 changed=9 unreachable=0 failed=2
undercloud : ok=121 changed=77 unreachable=0 failed=0

When I try to reproduce manually, I see the shell incompatibility:

dpeacock@lia:~/Code/tripleo-quickstart (master) $ /bin/sh
$ set -o pipefail && /home/dpeacock/.quickstart/ui_validate_simple.sh | tee validate_ui_simple.log
/bin/sh: 1: set: Illegal option -o pipefail

Actual results: See above.
Expected results: No shell error due to `set -o pipefail`, and successful validation test.

Tags: quickstart
Changed in tripleo:
assignee: nobody → David Peacock (davidjpeacock)
tags: added: quickstart
Revision history for this message
David Peacock (davidjpeacock) wrote :

On my system, /bin/sh points to dash, and dash shell doesn't allow `set -o pipefail`.

Revision history for this message
David Peacock (davidjpeacock) wrote :

https://en.wikipedia.org/wiki/Almquist_shell#dash:_Ubuntu,_Debian_and_POSIX_compliance_of_Linux_distributions

Ubuntu and Debian have adopted dash in place of Bourne shell since 2006.

Next I need to figure out where in the code to fix this to be more platform independent.

Changed in tripleo:
milestone: none → rocky-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-quickstart-extras (master)

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

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
David Peacock (davidjpeacock) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-quickstart-extras (master)

Reviewed: https://review.openstack.org/529407
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart-extras/commit/?id=d0ad1ec469f28371a24f66583c9e6451147e2608
Submitter: Zuul
Branch: master

commit d0ad1ec469f28371a24f66583c9e6451147e2608
Author: David J Peacock <email address hidden>
Date: Wed Dec 20 15:03:37 2017 -0500

    Fix failure of UI validation in some shells

    The Bourne shell, dash shell and other truly POSIX compliant shells
    have no mechanism for `set -o pipefail`, thus causing a failure and
    termination of deployment steps when being run from those systems.

    In particular, Debian and Ubuntu systems see these failures.

    This patch explicitly specifies the bash shell, meaning Debian and
    Ubuntu systems will not trip up in running this script.

    Change-Id: Id52fbbca51a2491346ff979433387c7e695bbb43
    Closes-Bug: 1739428

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-quickstart-extras 2.1.1

This issue was fixed in the openstack/tripleo-quickstart-extras 2.1.1 release.

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.