Failure to invoke '/etc/platform/openrc' with bash nounset option
Bug #2051549 reported by
Kyle MacLeod
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Kyle MacLeod |
Bug Description
Brief Description
Failure to invoke '/etc/platform/
<Minor: System/Feature is usable with minor issue>
Steps to Reproduce
Invoke '/etc/platform/
Expected Behavior
the script should be invoked without issues
Actual Behavior
the shell scripts with nounset option throws an exception regarding unbound variables
Reproducibility
100%
System Configuration
any
Load info (eg: 2022-03-
any
Last Pass
new request/scenario
Note: we have some tools in shell scripts that invokes /etc/platform/
Timestamp/Logs
no logs
Alarms
no alarms
Test Activity
test automation
Workaround
pass 'none' as an argument to /etc/platform/
Changed in starlingx: | |
status: | New → In Progress |
Changed in starlingx: | |
assignee: | nobody → Kyle MacLeod (kmacleod) |
Changed in starlingx: | |
importance: | Undecided → Low |
tags: | added: stx.9.0 stx.config |
To post a comment you must log in.
Reviewed: https:/ /review. opendev. org/c/starlingx /stx-puppet/ +/907063 /opendev. org/starlingx/ stx-puppet/ commit/ 2e60f12f29f62d1 697c624e1755c9a 8185443bc5
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 2e60f12f29f62d1 697c624e1755c9a 8185443bc5
Author: Kyle MacLeod <email address hidden>
Date: Mon Jan 29 08:49:30 2024 -0500
Fix openrc source when invoked with bash nounset option
This change fixes the check for the --no-credentials argument to handle
the case where no argument is present and nounset is active, i.e.:
set -o nounset
In this case we default $1 to "" via ${1:-}
Test Plan:
Pass: openrc file with and without
- Build and source the /etc/platform/
arguments. Test with and without the nounset option.
Closes-Bug: 2051549
Change-Id: Iab7f21d26751b0 24bf58c41b16aac 79daa351abf
Signed-off-by: Kyle MacLeod <email address hidden>