Commands are not executed by default in rhel9 images due to PATH problem

Description

It seems we have to manually update PATH to be able to use the binaries inside pmm-server, it was already set by default in rhel7, this causes many automation-related jobs to fail because we have to update secure_path to `/usr/local/bin` to be able to run

grafana binary commands, 

supervisorctl commands etc. 

How to test

You can check EL-9 AMI from this test job:
https://pmm.cd.percona.com/blue/organizations/jenkins/pmm2-ami/detail/pmm2-ami/5080/pipeline/41/

Anyway, its: ami-03a775d664192c547
Now, you can spin up an new instance via pmm2-ami-staging-start and login to the instance via admin user and run the following command:
$ sudo supervisorctl status

How to document

None

Attachments

1

Activity

Show:

talha.rizwan June 23, 2023 at 8:18 AM
Edited

On EL7, supervisorctl was installed in */usr/bin* and its one of the default PATHs set as *secure_path* in */etc/sudoers*.

Now, on EL9, we have supervisorctl installed in /usr/local/bin, and its not set as secure_path variable. If we add it to the secure_path, then the following command will work:
{{ $ sudo supervisorctl status}}

I'll update Ansible playbook to fix this.

Done

Details

Assignee

Reporter

Priority

Components

Needs QA

Yes

Needs Doc

No

Planned Version/s

Fix versions

Story Points

Regression Issue

Yes

Found by Automation

Yes

Affects versions

Smart Checklist

Created June 23, 2023 at 5:29 AM
Updated March 5, 2024 at 10:20 PM
Resolved July 3, 2023 at 9:36 AM