Leapp preupgrade is failing with the error "Actor system_facts unexpectedly terminated with exit code: 1"

Solution Verified - Updated -

Issue

When performing an offline upgrade using Leapp with the DVD ISO, the leapp preupgrade process fails with the following error message:

# leapp preupgrade --no-rhsm --iso <iso-path>
..
Title: Actor system_facts unexpectedly terminated with exit code: 1
Summary: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run
    actor_instance.run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 289, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/systemfacts/actor.py", line 57, in process
    self.produce(systemfacts.get_repositories_status())
  File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/systemfacts/libraries/systemfacts.py", line 220, in get_repositories_status
    return RepositoriesFacts(repositories=repofileutils.get_parsed_repofiles())
  File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/repofileutils.py", line 74, in get_parsed_repofiles
    cmd = ['find', '-L'] + get_repodirs() + ['-maxdepth', '1', '-type', 'f', '-name', '*.repo']
  File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/repofileutils.py", line 54, in get_repodirs
    with dnf.base.Base() as base:
NameError: global name 'dnf' is not defined

Environment

Red Hat Enterprise Linux

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