-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-8.10
-
None
-
Important
-
1
-
rhel-sst-upgrades
-
20
-
None
-
False
-
-
None
-
Red Hat Enterprise Linux
-
Leapp: 9.6 & 10.0
-
None
-
None
-
None
What were you trying to do that didn't work?
Trying to upgrade a RHEL7 system, leapp preupgrade fails with following error:
Risk Factor: high (error) Title: Actor target_userspace_creator 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/targetuserspacecreator/actor.py", line 58, in process userspacegen.perform() File "/usr/lib/python2.7/site-packages/leapp/utils/deprecation.py", line 42, in process_wrapper return target_item(*args, **kwargs) File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py", line 1268, in perform _create_target_userspace(context, indata, indata.packages, indata.files, target_repoids) File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py", line 1117, in _create_target_userspace _prep_repository_access(context, target_path) File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py", line 629, in _prep_repository_access run(["chroot", target_userspace, "/bin/bash", "-c", "su - -c update-ca-trust"]) File "/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/__init__.py", line 192, in run result=result CalledProcessError: Command ['chroot', '/var/lib/leapp/el8userspace', '/bin/bash', '-c', 'su - -c update-ca-trust'] failed with exit code 1.
This is different from RHEL-43978
The root cause here is not having /etc/machine-id, which makes all executions of systemd-nspawn fail, before actually executing the command.
Because leapp doesn't make a difference between the systemd-nspawn failing and the executed command failing, this leads to leapp dying at the step where it merges the certificates of the system with the new certificates installed in the container.
When running leapp on a RHEL8 system, another error occurs, which as well doesn't give any details:
Risk Factor: high (error)
Title: Cannot set the container mode for the subscription-manager.
Summary:
Key: 06583cd4c6f9e1629a9c1937643c3897618f33ef
The real root cause behind this being:
2024-07-23 10:46:37.166 DEBUG PID: 18387 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: External command has started: ['systemd-nspawn', '--register=no', '--quiet', '--keep-unit', '--capability=all', '-D', '/var/lib/leapp/scratch/mounts/root_/system_overlay', '--setenv=LEAPP_HOSTNAME=vm-leapp8.libvirt', '--setenv=LEAPP_EXPERIMENTAL=0', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_NO_RHSM=1', '--setenv=LEAPP_NO_RHSM_FACTS=1', '--setenv=LEAPP_TARGET_ISO=/media/rhel-9.4-x86_64-dvd.iso', '--setenv=LEAPP_UPGRADE_PATH_TARGET_RELEASE=9.4', '--setenv=LEAPP_UPGRADE_PATH_FLAVOUR=default', '--setenv=LEAPP_IPU_IN_PROGRESS=8to9', '--setenv=LEAPP_EXECUTION_ID=953440c4-8417-484d-b2c0-e33b401abb7d', '--setenv=LEAPP_COMMON_TOOLS=:/etc/leapp/repos.d/system_upgrade/common/tools:/etc/leapp/repos.d/system_upgrade/el8toel9/tools', '--setenv=LEAPP_COMMON_FILES=:/etc/leapp/repos.d/system_upgrade/common/files:/etc/leapp/repos.d/system_upgrade/el8toel9/files', 'ln', '-s', '/etc/rhsm', '/etc/rhsm-host'] 2024-07-23 10:46:37.206 DEBUG PID: 18387 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Failed to retrieve machine ID: No such file or directory 2024-07-23 10:46:37.207 DEBUG PID: 18387 leapp.workflow.TargetTransactionFactsCollection.target_userspace_creator: Command ['systemd-nspawn', '--register=no', '--quiet', '--keep-unit', '--capability=all', '-D', '/var/lib/leapp/scratch/mounts/root_/system_overlay', '--setenv=LEAPP_HOSTNAME=vm-leapp8.libvirt', '--setenv=LEAPP_EXPERIMENTAL=0', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_NO_RHSM=1', '--setenv=LEAPP_NO_RHSM_FACTS=1', '--setenv=LEAPP_TARGET_ISO=/media/rhel-9.4-x86_64-dvd.iso', '--setenv=LEAPP_UPGRADE_PATH_TARGET_RELEASE=9.4', '--setenv=LEAPP_UPGRADE_PATH_FLAVOUR=default', '--setenv=LEAPP_IPU_IN_PROGRESS=8to9', '--setenv=LEAPP_EXECUTION_ID=953440c4-8417-484d-b2c0-e33b401abb7d', '--setenv=LEAPP_COMMON_TOOLS=:/etc/leapp/repos.d/system_upgrade/common/tools:/etc/leapp/repos.d/system_upgrade/el8toel9/tools', '--setenv=LEAPP_COMMON_FILES=:/etc/leapp/repos.d/system_upgrade/common/files:/etc/leapp/repos.d/system_upgrade/el8toel9/files', 'ln', '-s', '/etc/rhsm', '/etc/rhsm-host'] failed with exit code 1.
Clearly leapp needs to be able to distinguish between container spawning errors and command errors.
Because by design systemd-nspawn returns the error of the command, a solution could be to "test" spawning a container with a command which is known to execute properly (e.g. /bin/true).
Please provide the package NVR for which bug is seen:
leapp-upgrade-el7toel8-0.20.0-9.el7_9.noarch
leapp-upgrade-el8toel9-0.20.0-2.el8.noarch
How reproducible:
Steps to reproduce
- Delete /etc/machine-id
- Execute leapp preupgrade
Expected results
Error stating container cannot spawn correctly
Actual results
Error at "random" place
- is related to
-
RHEL-50661 Leapp crashes when "/etc/machine-id" is missng
- Planning
- relates to
-
RHEL-43978 Leapp fails while running "su - -c update-ca-trust" exit code 127
- Closed
- links to