Project

General

Profile

Actions

Bug #14957

closed

Image-based provisioning failing due to switching to 'sh' in 14131

Added by Greg Sutcliffe over 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Orchestration
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

My image-based provisioning is currently failing. With a finish template of "true\n" I get

2016-05-08T20:58:49 [app] [W] Failed to launch script on oactest687.elysium.emeraldreverie.org: ERF42-0453 [Foreman::Exception]: Provision script had a non zero exit
| Foreman::Exception: ERF42-0453 [Foreman::Exception]: Provision script had a non zero exit

Switching to debug logs, these seems to be due to the change to 'sh' from 'bash' in 14131:

2016-05-08T20:58:49 [app] [D] about to execute  sh -c '(chmod 0701 ./bootstrap-cf49f50f-7c60-46c4-ab0d-c833ec1d8408 &&  ./bootstrap-cf49f50f-7c60-46c4-ab0d-c833ec1d8408) 2>&1 | tee bootstrap-cf49f50f-7c60-46c4-ab0d-c833ec1d8408.log; exit ${PIPESTATUS[0]}'
2016-05-08T20:58:49 [app] [D] sh: 1: Bad substitution

I guess I'm hitting this because Jessie links /bin/sh to Dash, not Bash, and PIPESTATUS is a Bash-specific thing. Changing this back to Bash clearly fixes the issue, but we should probably think about a sh-compatible way to do this.


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #14131: Libvirt image provision fails on FreeBSD without bashClosedKarli Sjöberg03/10/2016Actions
Actions

Also available in: Atom PDF