leapp upgrade stops with Inhibitor "Upgrade requires links in root directory to be relative"
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- Leapp
Issue
-
The command
leapp upgradeorleapp preupgradereports an inhibitor:Risk Factor: high (inhibitor) Title: Upgrade requires links in root directory to be relative Summary: After rebooting, parts of the upgrade process can fail if symbolic links in / point to absolute paths. Please change these links to relative ones. Remediation: [command] sh -c ln -snf data /softlink Key: 3d895ad37ceaf4157864d439edb6bd75562061fa
NOTE: The remediation command suggested in leapp-report.txt is faulty and we are working to fix it through This content is not included.RHEL-30447 . The command is missing (") double quotes for subcommand of shell.
Resolution
-
Identify any softlinks pointing to a full path target in
/. In the example below we have/softlinkthat points to/data# ls -l / | grep ^l lrwxrwxrwx. 1 root root 7 May 23 2022 bin -> usr/bin lrwxrwxrwx. 1 root root 7 May 23 2022 lib -> usr/lib lrwxrwxrwx. 1 root root 9 May 23 2022 lib64 -> usr/lib64 lrwxrwxrwx. 1 root root 8 May 23 2022 sbin -> usr/sbin lrwxrwxrwx. 1 root root 5 Dec 8 13:08 softlink -> /data -
Symlinks with absolute path such as
softlink -> /dataneed to be corrected with a relative path.# sh -c "ln -snf data /softlink" <-- Rectified command, leapp report remediation is missing ("") # ll / | grep ^l lrwxrwxrwx. 1 root root 7 May 23 2022 bin -> usr/bin lrwxrwxrwx. 1 root root 7 May 23 2022 lib -> usr/lib lrwxrwxrwx. 1 root root 9 May 23 2022 lib64 -> usr/lib64 lrwxrwxrwx. 1 root root 8 May 23 2022 sbin -> usr/sbin lrwxrwxrwx. 1 root root 4 Dec 8 13:10 softlink -> data
Root Cause
Leapp does not allow upgrades to continue if a softlink in / is pointing to a full path target since leapp operates from outside of a chroot environment, the softlink would have an incorrect target unless it is relative.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.