vmware / ansible-vsphere-gos-validation

Guest OS validation test set for vSphere using Ansible
Other
41 stars 30 forks source link

[Linux] Fix issue caused by DNF version bump on Fedora 41 #630

Closed keirazhang closed 1 month ago

keirazhang commented 1 month ago

In Fedora 41, DNF version is 5.2.5.0, which requires to use Ansible dnf5 module for package management. But currently dnf5 module is still under development, and would throw exception on Fedora 41. So this fix is to replace dnf or dnf5 module with dnf commands as a workaround.

+---------------------------------------------------------------------------------+
| GuestInfo Detailed Data   | architecture='X86'                                  |
|                           | bitness='64'                                        |
|                           | cpeString='cpe:/o:fedoraproject:fedora:41'          |
|                           | distroAddlVersion='41 (Forty One Prerelease)'       |
|                           | distroName='Fedora Linux'                           |
|                           | distroVersion='41'                                  |
|                           | familyName='Linux'                                  |
|                           | kernelVersion='6.11.0-0.rc5.43.fc41.x86_64'         |
|                           | prettyName='Fedora Linux 41 (Forty One Prerelease)' |
+---------------------------------------------------------------------------------+

Test Results (Total: 2, Passed: 2, Elapsed Time: 00:28:46)
+--------------------------------------------------+
| ID | Name                   | Status | Exec Time |
+--------------------------------------------------+
|  1 | check_inbox_driver     | Passed | 00:04:07  |
|  2 | nvdimm_cold_add_remove | Passed | 00:23:57  |
+--------------------------------------------------+
TASK [Install latest packages on Fedora 41] ************************************
task path: /home/worker/workspace/Ansible_Fedora_80GA_LSILOGICSAS_VMXNET3_BIOS-18/ansible-vsphere-gos-validation/linux/utils/install_uninstall_package.yml:153
changed: [localhost -> ] => {
    "changed": true,
    "cmd": "dnf install -y python3-libdnf5",
    "delta": "0:01:32.257681",
    "end": "2024-09-19 02:49:04.570618",
    "invocation": {
        "module_args": {
            "_raw_params": "dnf install -y python3-libdnf5",
            "_uses_shell": true,
            "argv": null,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "stdin_add_newline": true,
            "strip_empty_ends": true
        }
    },
    "msg": "",
    "rc": 0,
    "start": "2024-09-19 02:47:32.312937",
    "stderr": "warning: posix.fork(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead\nwarning: posix.wait(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead\nwarning: posix.exec(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead",
    "stderr_lines": [
        "warning: posix.fork(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead",
        "warning: posix.wait(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead",
        "warning: posix.exec(): .fork(), .exec(), .wait() and .redirect2null() are deprecated, use rpm.execute() instead"
    ],
    "stdout": "Updating and loading repositories:\n Fedora 41 openh264 (From Cisco) - x86_ 100% |   7.8 KiB/s |   6.0 KiB |  00m01s\n Fedora 41 - x86_64                     100% | 447.8 KiB/s |  35.4 MiB |  01m21s\n Fedora 41 - x86_64 - Test Updates      100% |   2.5 MiB/s |   6.4 MiB |  00m03s\n Fedora 41 - x86_64 - Updates           100% |  40.1 KiB/s |  31.9 KiB |  00m01s\nRepositories loaded.\nPackage          Arch   Version        Repository      Size\nInstalling:\n python3-libdnf5 x86_64 5.2.5.0-2.fc41 fedora       7.7 MiB\n\nTransaction Summary:\n Installing:        1 packages\n\nTotal size of inbound packages is 1 MiB. Need to download 1 MiB.\nAfter this operation 8 MiB will be used (install 8 MiB, remove 0 B).\n[1/1] python3-libdnf5-0:5.2.5.0-2.fc41. 100% |   3.2 MiB/s |   1.4 MiB |  00m00s\n--------------------------------------------------------------------------------\n[1/1] Total                             100% |   1.7 MiB/s |   1.4 MiB |  00m01s\nRunning transaction\n[1/3] Verify package files              100% | 125.0   B/s |   1.0   B |  00m00s\n[2/3] Prepare transaction               100% |  16.0   B/s |   1.0   B |  00m00s\n[3/3] Installing python3-libdnf5-0:5.2. 100% |  17.5 MiB/s |   7.8 MiB |  00m00s\n>>> Running trigger-install scriptlet: glibc-common-0:2.40-3.fc41.x86_64\n>>> Stop trigger-install scriptlet: glibc-common-0:2.40-3.fc41.x86_64\nComplete!",
    "stdout_lines": [
        "Updating and loading repositories:",
        " Fedora 41 openh264 (From Cisco) - x86_ 100% |   7.8 KiB/s |   6.0 KiB |  00m01s",
        " Fedora 41 - x86_64                     100% | 447.8 KiB/s |  35.4 MiB |  01m21s",
        " Fedora 41 - x86_64 - Test Updates      100% |   2.5 MiB/s |   6.4 MiB |  00m03s",
        " Fedora 41 - x86_64 - Updates           100% |  40.1 KiB/s |  31.9 KiB |  00m01s",
        "Repositories loaded.",
        "Package          Arch   Version        Repository      Size",
        "Installing:",
        " python3-libdnf5 x86_64 5.2.5.0-2.fc41 fedora       7.7 MiB",
        "",
        "Transaction Summary:",
        " Installing:        1 packages",
        "",
        "Total size of inbound packages is 1 MiB. Need to download 1 MiB.",
        "After this operation 8 MiB will be used (install 8 MiB, remove 0 B).",
        "[1/1] python3-libdnf5-0:5.2.5.0-2.fc41. 100% |   3.2 MiB/s |   1.4 MiB |  00m00s",
        "--------------------------------------------------------------------------------",
        "[1/1] Total                             100% |   1.7 MiB/s |   1.4 MiB |  00m01s",
        "Running transaction",
        "[1/3] Verify package files              100% | 125.0   B/s |   1.0   B |  00m00s",
        "[2/3] Prepare transaction               100% |  16.0   B/s |   1.0   B |  00m00s",
        "[3/3] Installing python3-libdnf5-0:5.2. 100% |  17.5 MiB/s |   7.8 MiB |  00m00s",
        ">>> Running trigger-install scriptlet: glibc-common-0:2.40-3.fc41.x86_64",
        ">>> Stop trigger-install scriptlet: glibc-common-0:2.40-3.fc41.x86_64",
        "Complete!"
    ]
}
vmwclabot commented 1 month ago

@keirazhang, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.