Resolve the "failed to leapp upgrade" error

更新时间:
复制 MD 格式

The "failed to leapp upgrade" error occurs during SMC Linux OS migration due to software package download failures or invalid /etc/fstab mount configurations.

Problem description

This error occurs when you migrate a Linux OS to Anolis OS by using SMC.

Cause

Possible causes:

  • Failed to download software packages.

  • Invalid mount configurations in /etc/fstab.

Solution

Failed to download software packages

  1. Connect to the source server. For more information, see Connect to an instance.

  2. View the error logs in the log directory of the SMC client.

    For more information about the directories of the SMC client, see View the SMC client. Sample command:

    cat /smc/go2aliyun_client2.7.6_linux_x86_64/Logs/osm_prepare.log

    In the preceding command, 2.7.6 is the version number of the SMC client. Replace the version number with the actual value.

    image

    Run the following command. The error message in the following figure is reported.

    cat /var/log/leapp/leapp-preupgrade.log

    image

    The preceding error information indicates that invalid dependencies are found by the dnf_transaction_check actor during the update of software packages. This may occur if a required software package does not exist in the specified repository or software packages on which the current software package depends conflict with each other. For example, the preceding error information indicates that the anolis-indexhtml package on which the lynx package depends is not found in the specified repository during the update of the lynx package.

  3. Analyze the dependencies that are mentioned in the error information and uninstall the software package that causes the error. For example, to resolve the preceding error, run the following command to uninstall lynx:

    yum remove lynx-2.8.8-0.3.dev15.1.al7.x86_64
  4. After you resolve the network issue, run the SMC client to retry the operation. For more information, see Run the SMC client.

Invalid mount configurations in the /etc/fstab file

  1. Connect to the source server. For more information, see Connect to an instance.

  2. View the error logs in the log directory of the SMC client.

    For more information about the directories of the SMC client, see View the SMC client. Sample command:

    cat /smc/go2aliyun_client2.7.6_linux_x86_64/Logs/osm_prepare.log

    In the preceding command, 2.7.6 is the version number of the SMC client. Replace the version number with the actual value.

    image

  3. Check the mount configurations in the /etc/fstab file based on the error information.

    • Make sure that the entry for each file system is written in one line. Do not write an entry in multiple lines due to too many parameters.

    • Make sure that all file systems can be mounted. You can run the mount -a command to check whether a file system can be mounted.

    • Make sure that the configuration file does not contain Chinese characters.

  4. After you resolve the network issue, run the SMC client to retry the operation. For more information, see Run the SMC client.