Upgrading opennms ignores RUNAS when setting ownership on logs directory

Description

When upgrading OpenNMS, if you have set RUNAS to something other than opennms, the installer prints a warning and leaves directory ownership intact.

It does not leave directory ownership intact for /opt/opennms/logs (or /var/log/opennms), setting ownership to opennms:opennms even if RUNAS is set to a different user.

Steps to reproduce:

  1. Install an OpenNMS that's older than the current release.

  2. Configure RUNAS to a user that's not opennms.

  3. Set ownership for all OpenNMS files to that user.

  4. Upgrade OpenNMS.

Expected results:

If RUNAS is set to a value other than opennms, the /opt/opennms/logs and /var/log/opennms directory ownership should not be changed, or should be set to the configured RUNAS user.

Actual results:
/opt/opennms/logs (or /var/log/opennms) ownership is changed to opennms:opennms regardless of the value of RUNAS.

Environment

RHEL 7.9

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Benjamin Reed March 24, 2022 at 2:54 PM

FYI, I cherry-picked this back to foundation-2022

Christian Pape March 17, 2022 at 6:59 AM

Merged.

Christian Pape March 16, 2022 at 12:29 PM

Fixed

Details

Assignee

Reporter

Labels

HB Grooming Date

HB Backlog Status

Components

Sprint

Affects versions

Priority

PagerDuty

Created February 9, 2022 at 8:54 PM
Updated March 24, 2022 at 2:54 PM
Resolved March 17, 2022 at 6:59 AM