Skip to content
This repository was archived by the owner on May 22, 2026. It is now read-only.
This repository was archived by the owner on May 22, 2026. It is now read-only.

install.sh: offline rpm/dpkg + tee hides install failure exit status #804

Description

@sercanokur

Describe the bug

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

  1. Use offline install path in install.sh (section that runs rpm -Uvh *.rpm | tee … or dpkg -i … | tee …).
  2. Force rpm or dpkg to fail (for example missing dependencies in the local bundle or a constrained test environment).
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue or pull request addresses broken functionality

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    🆕 Product Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions