Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-17119

Leapp fails to find grubby with error "[Errno 2] No such file or directory" when executing the jobs from Satellite WebUI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • 6.14.0
    • 6.12.3
    • Leapp integration
    • None
    • False
    • Hide

      None

      Show
      None
    • 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

      1. Setup a Satellite for REX + Leapp plugin ( prepare it for performing RHEL 7 - 8 conversion on client hosts )
      2. 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.
      3. Register that system with the satellite.
      4. Remote Execution SSH User should be set to that non-root user and the effective user should be root.
      5. Run the Preupgrade job on that host from Satellite UI --> Hosts --> All Hosts --> Select Actions dropdown
      6. If it succeeds, then run the Upgrade job in the same way.

      Acceptance criteria

      1. We can reproduce the issue
      2. leapp preupgrade job works for non-root user
      3. leapp upgrade job works for non-root user

       

            jira-bugzilla-migration RH Bugzilla Integration
            jira-bugzilla-migration RH Bugzilla Integration
            RH Bugzilla Integration RH Bugzilla Integration
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: