Run Patch manager failed on amazonlinux2

0

I found recentry Run Patch manager failed on amazonlinux2. Failed package is "grub2-tools".

SSM log here:

Removing grub2-tools.x86_64 1:2.06-14.amzn2 - u due to obsoletes from grub2-tools.x86_64 1:2.06-14.amzn2.0.1 - u
08/02/2023 06:11:43 root [ERROR]: yum update failed with result code: 1, message: [u'1:grub2-tools-2.06-14.amzn2.x86_64 \u306f grub2-common = 1:2.06-14.amzn2 \u3092\u8981\u6c42\u3057\u307e\u3059']

Test of Reproducibility: Launch new instance from AMI:ami-08bb5f75961e63185, and run patch manager manualy. Then same error occured.

Note: For disable update when first boot. added forrowing line to user script before this test.

#cloud-config
repo_upgrade: none

Whats happend? patch manager have any problem? How fix this issue with using patch manager?

PS: I confirmed this patch applied normary when just manually.(without patch manager)

Thanks.

papico
asked 9 months ago1123 views
1 Answer
0

The error message indicates that a specific version of grub2-common is required but may not be available or compatible with the newer version of grub2-tools.

Here's how you can try to resolve this issue:

  • Manual Inspection of Dependencies: Check the dependencies for the versions of grub2-tools and grub2-common on the system. Ensure that compatible versions of both packages are installed.
  • Exclude Specific Package from Patching (Temporary Solution): You can exclude the grub2-tools package from the update process temporarily if it's not critical to your system's operation. In your SSM Patch Manager configuration, you can specify a list of packages to exclude from the update process.
"Operation": "Install",
"DocumentVersion": "$DEFAULT",
"Parameters": {
    "action": "Install",
    "name": "ALL",
    "exclude": "grub2-tools"
}
  • Apply Patch Manually (If Needed): If you need to apply the patch to grub2-tools, you can do it manually by logging into the instance and using the appropriate package manager commands.

  • Wait for Updates: Sometimes, these kinds of issues are resolved by the maintainers of the package repositories. They might release updates to the packages to fix the dependency issues. So, keep an eye on the repository for updates to the grub2-tools and grub2-common packages.

  • Review Cloud-Init Configuration: Make sure that your cloud-init configuration (#cloud-config repo_upgrade: none) is functioning as intended and not interfering with the patching process.

Keep in mind that the exact solution might vary depending on the specific configuration of your system and the packages involved. If this is a production system, you may want to test these solutions in a staging environment first to ensure that they won't cause any unexpected issues.

profile picture
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions