wazuh / wazuh-qa

Wazuh - Quality Assurance
GNU General Public License v2.0
64 stars 30 forks source link

Fedora 38 AMI does not work with the Allocation module #5602

Closed davidcr01 closed 1 month ago

davidcr01 commented 1 month ago

Description

While working on https://github.com/wazuh/wazuh/issues/24855, we have detected that the AWS instances launched with the Allocation module (and also provisioning the instances directly in the AWS console) that the Fedora 38 AMI is not working. It seems that the machine is having some errors while booting the system:

[  202.362365] dracut-initqueue[356]: Warning: dracut-initqueue: starting timeout scripts

[  202.915816] dracut-initqueue[356]: Warning: dracut-initqueue: timeout, still waiting for following initqueue hooks:

[  202.918917] dracut-initqueue[356]: Warning: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2ffedora\x2froot.sh: "[ -e "/dev/fedora/root" ]"

[  202.925721] dracut-initqueue[356]: Warning: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fmapper\x2ffedora-root.sh: "if ! grep -q After=remote-fs-pre.target /run/systemd/generator/systemd-cryptsetup@*.service 2>/dev/null; then

[  202.925841] dracut-initqueue[356]:     [ -e "/dev/mapper/fedora-root" ]

[  202.931544] dracut-initqueue[356]: fi"

[  202.931688] dracut-initqueue[356]: Warning: dracut-initqueue: starting timeout scripts

[  203.473341] dracut-initqueue[356]: Warning: dracut-initqueue: timeout, still waiting for following initqueue hooks:

[  203.477598] dracut-initqueue[356]: Warning: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2ffedora\x2froot.sh: "[ -e "/dev/fedora/root" ]"

[  203.485864] dracut-initqueue[356]: Warning: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fmapper\x2ffedora-root.sh: "if ! grep -q After=remote-fs-pre.target /run/systemd/generator/systemd-cryptsetup@*.service 2>/dev/null; then

[  203.485980] dracut-initqueue[356]:     [ -e "/dev/mapper/fedora-root" ]

[  203.486021] dracut-initqueue[356]: fi"

[  203.493548] dracut-initqueue[356]: Warning: dracut-initqueue: starting timeout scripts

[  203.495428] dracut-initqueue[356]: Warning: Could not boot.

         Starting [0;1;39mdracut-emergency.â¦ce[0m - Dracut Emergency Shell...

Warning: /dev/fedora/root does not exist
Warning: /dev/mapper/fedora-root does not exist

Generating "/run/initramfs/rdsosreport.txt"

Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.

Press Enter for maintenance

:warning: This makes the machine inaccessible, so currently we can not provide this system. It is necessary to re-create the AMI and update the Allocation module.

[!NOTE] We have ensured that the problem is not related to the userData script.

c-bordon commented 1 month ago

Update report

I've been trying to recreate the Fedora 38 image and I keep running into connection issues after starting the instance with the new AMI, I'll continue investigating what's going on.

c-bordon commented 1 month ago

I continue to have problems when trying to boot the new AMI created from the Fedora 37 AMI upgraded to Fedora 38, so I decided to change the approach, I made a virtual machine with the Fedora 38 iso and I am in the process of importing it into AWS, the image has not yet finished processing.

cbordon@cbordon-MS-7C88:~/Documents$ aws ec2 import-image --description "Fedora 38" --disk-containers "file:///home/cbordon/Documents/fedora-38.json"
{
    "Description": "Fedora 38",
    "ImportTaskId": "import-ami-0db7287a044e5d3c0",
    "Progress": "1",
    "SnapshotDetails": [
        {
            "Description": "Fedora 38",
            "DiskImageSize": 0.0,
            "Format": "OVA",
            "Url": "s3://warehouse.wazuh.com/tmp/fedora-38.ova",
            "UserBucket": {
                "S3Bucket": "warehouse.wazuh.com",
                "S3Key": "tmp/fedora-38.ova"
            }
        }
    ],
    "Status": "active",
    "StatusMessage": "pending"
}
c-bordon commented 1 month ago

This AMI will not be used in future testing, so there is no need to create it.