You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In install.sh, offline package installation logs rpm and dpkg output through tee (e.g. sudo rpm … | tee /tmp/rpm_install.log). In Bash, without pipefail, the pipeline’s exit status comes from tee, which usually exits 0. If rpm or dpkg fails, the if …; then branch can still behave as success, skipping the intended failure handling (dependency-message branch, retries, exit, etc.). This risks silent continuation after a broken offline install.
To Reproduce
Use offline install path in install.sh (section that runs rpm -Uvh *.rpm | tee … or dpkg -i … | tee …).
Force rpm or dpkg to fail (for example missing dependencies in the local bundle or a constrained test environment).
Observe that the script may treat the step as successful because tee returned 0.
Please complete the following information
Desktop:
OS: N/A (server-side installer)
Browser: N/A
Software version: N/A
Server:
OS: e.g. RHEL/Rocky/Alma (RPM path) or Ubuntu/Debian (DEB path) during ./install.sh --offline
Software Versions:
LME: install.sh from current develop
N/A ELK/container versions unless install progressed past packaging
Expected behavior
When rpm or dpkg fails, the pipeline should propagate a non-zero exit status so the installer enters the else path (failure messages, grep of logs, exit 1 as appropriate).
Screenshots OPTIONAL
N/A
Additional context
A straightforward fix is to run each rpm|tee / dpkg|tee pipeline in a subshell with set -o pipefail so the pipeline status reflects failure in rpm/dpkg rather than tee. Related PR branch (example): sercanokur-0-pipefail-rpm-dpkg-tee — branch name should be renamed to <username>-<this-issue-number>-pipefail-rpm-dpkg-tee per CONTRIBUTING after this issue exists.
Describe the bug
In
install.sh, offline package installation logsrpmanddpkgoutput throughtee(e.g.sudo rpm … | tee /tmp/rpm_install.log). In Bash, withoutpipefail, the pipeline’s exit status comes fromtee, which usually exits0. Ifrpmordpkgfails, theif …; thenbranch can still behave as success, skipping the intended failure handling (dependency-message branch, retries, exit, etc.). This risks silent continuation after a broken offline install.To Reproduce
install.sh(section that runsrpm -Uvh *.rpm | tee …ordpkg -i … | tee …).rpmordpkgto fail (for example missing dependencies in the local bundle or a constrained test environment).teereturned0.Please complete the following information
Desktop:
Server:
./install.sh --offlineinstall.shfrom currentdevelopExpected behavior
When
rpmordpkgfails, the pipeline should propagate a non-zero exit status so the installer enters theelsepath (failure messages, grep of logs,exit 1as appropriate).Screenshots OPTIONAL
N/A
Additional context
A straightforward fix is to run each
rpm|tee/dpkg|teepipeline in a subshell withset -o pipefailso the pipeline status reflects failure inrpm/dpkgrather thantee. Related PR branch (example):sercanokur-0-pipefail-rpm-dpkg-tee— branch name should be renamed to<username>-<this-issue-number>-pipefail-rpm-dpkg-teeper CONTRIBUTING after this issue exists.