Leapp preupgrade check fails with "Failed to call `grubby` to list available boot entries" when run through Ansible

Solution Verified - Updated -

Issue

  • Leapp fails with "Failed to call `grubby` to list available boot entries" when run through SSH or Ansible using sudo:
Risk Factor: high
Title: Failed to call `grubby` to list available boot entries.
Summary: {"details": "Command ['grubby', '--info', 'ALL'] failed with exit code 1.", "stderr": "Process Process-204:\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"}

Environment

  • Red Hat Enterprise Linux 7
  • Ansible

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content