-
Bug
-
Resolution: Done
-
Normal
-
6.12.3
-
None
-
False
-
-
False
-
NEW
-
2,050
-
Rocket
-
-
-
new Rocket sprint 7, new Rocket sprint 8, Rocket Sprint 9, Rocket Sprint 10
-
Moderate
-
None
Description of issue
Running `leapp preupgrade` from Satellite UI with non-root REX user fails with:
Summary : {"details": "Command ['grubby', '--info', 'ALL'] failed with exit code 1.", "stderr": "Process Process-237:\nTraceback (most recent call last):\n File \"/usr/lib64/python2.7/multiprocessing/process.py\", line 258, in _bootstrap\n self.run()\n File \"/usr/lib64/python2.7/multiprocessing/process.py\", line 114, in run\n self._target(*self._args, **self._kwargs)\n File \"/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py\", line 72, in _do_run\n actor_instance.run(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/leapp/actors/__init__.py\", line 289, in run\n self.process(*args)\n File \"/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/sourcebootloaderscanner/actor.py\", line 18, in process\n scan_source_boot_loader_configuration()\n File \"/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/sourcebootloaderscanner/libraries/sourcebootloaderscanner.py\", line 87, in scan_source_boot_loader_configuration\n entries=scan_boot_entries()\n File \"/usr/share/leapp-repository/repositories/system_upgrade/el7toel8/actors/sourcebootloaderscanner/libraries/sourcebootloaderscanner.py\", line 41, in scan_boot_entries\n grubby_output = run(CMD_GRUBBY_INFO_ALL, split=True)\n File \"/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/__init__.py\", line 181, in run\n stdin=stdin, env=env, encoding=encoding)\n File \"/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/call.py\", line 217, in _call\n os.execvpe(command[0], command, env=environ)\n File \"/usr/lib64/python2.7/os.py\", line 353, in execvpe\n _execvpe(file, args, env)\n File \"/usr/lib64/python2.7/os.py\", line 380, in _execvpe\n func(fullname, *argrest)\nOSError: [Errno 2] No such file or directory\n"}
Steps to reproduce
- Setup a Satellite for REX + Leapp plugin ( prepare it for performing RHEL 7 - 8 conversion on client hosts )
- On an RHEL 7.9 system, create a non-root user, give it sudo privileges and ensure that it has a PATH env variable set where /usr/sbin/ is not the PATH.
- Register that system with the satellite.
- Remote Execution SSH User should be set to that non-root user and the effective user should be root.
- Run the Preupgrade job on that host from Satellite UI --> Hosts --> All Hosts --> Select Actions dropdown
- If it succeeds, then run the Upgrade job in the same way.
Acceptance criteria
- We can reproduce the issue
- leapp preupgrade job works for non-root user
- leapp upgrade job works for non-root user
- external trackers