Closed platymatt closed 5 months ago
After testing I'm still getting the same error so it may not be an issue with the double //
. Still investigating.
amazon-ebs.minimal-de-rhel-8-hvm: RUNNING HANDLER [RHEL8-STIG : make grub2 config] *******************************
amazon-ebs.minimal-de-rhel-8-hvm: fatal: [default]: FAILED! => {"changed": true, "cmd": "/usr/sbin/grub2-mkconfig --output=/boot/grub2/grub.cfg", "delta": "0:00:00.012800", "end": "2024-02-21 21:43:08.980175", "msg": "non-zero return code", "rc": 1, "start": "2024-02-21 21:43:08.967375", "stderr": "/usr/sbin/grub2-probe: error: failed to get canonical path of `none'.", "stderr_lines": ["/usr/sbin/grub2-probe: error: failed to get canonical path of `none'."], "stdout": "", "stdout_lines": []}
Still testing. I have updated the issue as it is not actually an issue with the amount of slashes and instead is a grub issue and could be related to how the instance is already configured.
The issue is because the /boot partition is an LVM partition the grub tool cannot read the /boot partition causing the grub2-mkconfig command to fail.
When disabling rhel_08_010020
to get around this I get this error:
amazon-ebs.minimal-de-rhel-8-hvm: TASK [RHEL8-STIG : HIGH | RHEL-08-010020 | PATCH | If /boot or /boot/efi reside on separate partitions, the kernel parameter boot=<partition> must be added to the kernel command line.] ***
amazon-ebs.minimal-de-rhel-8-hvm: fatal: [default]: FAILED! => {"msg": "Error in jmespath.search in json_query filter plugin:\n[?mount=='{{ rhel8stig_boot_part.stdout }}'] | [0]: 'dict object' has no attribute 'stdout'. 'dict object' has no attribute 'stdout'"}
Might need to have a default variable set for the variable rhel8stig_boot_part.stdout
or disabling rhel_08_010020
will still fail to complete.
Closing this as the issue was the partitoned server needed a reboot before being STIG'd
Describe the Issue
/usr/sbin/grub2-mkconfig --output=/boot/grub2/grub.cfg
command fails on a RHEL 8.8 ec2-instance that is already FIPS enabled with the response:/usr/sbin/grub2-probe: error: failed to get canonical path of
none'.`It's possible that this issue is present because the server already is FIPS enabled and present as a kernel boot parameter.
Expected Behavior I expect the
make grub2 config
handler to succeed or be skipped if not needed.Actual Behavior
rhel8stig_bootloader_path
gets captured in the PRELIM tasksControl(s) Affected
This affects controls that notify the handler
confirm grub2 user cfg
when run on a machine with BIOS and not UEFI.Environment (please complete the following information):
branch being used: [devel] Commit:
Base Server File System details:
Additional Notes
Possible Solution
Skip the grub edit if fips is already configured correctly.