tp-qemu icon indicating copy to clipboard operation
tp-qemu copied to clipboard

trans_hugepage.relocated: fix existing issues

Open mcasquer opened this issue 11 months ago • 10 comments

Depends on https://github.com/autotest/tp-qemu/pull/3987, https://github.com/autotest/tp-qemu/pull/3988

trans_hugepage.relocated: fix existing issues

Fixes existing issues with the params and variables casting. Removes the redhat prefix from cfg values. For memory fragmentation, uses the thp_fragment tool, now invoked from an external provider.

Signed-off-by: mcasquer [email protected] ID: 2037

mcasquer avatar Mar 06 '24 12:03 mcasquer

After applying the depending patches, no host hung and both defrag and relocated cases passed successfully: RHEL 9

 (1/6) repeat1.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: STARTED
 (1/6) repeat1.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: PASS (141.31 s)
 (2/6) repeat1.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: STARTED
 (2/6) repeat1.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: PASS (552.57 s)
 (3/6) repeat2.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: STARTED
 (3/6) repeat2.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: PASS (143.11 s)
 (4/6) repeat2.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: STARTED
 (4/6) repeat2.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: PASS (757.94 s)
 (5/6) repeat3.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: STARTED
 (5/6) repeat3.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: PASS (149.35 s)
 (6/6) repeat3.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: STARTED
 (6/6) repeat3.Host_RHEL.m9.u5.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: PASS (686.96 s)
RESULTS    : PASS 6 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

RHEL 8

 (1/6) repeat1.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: STARTED
 (1/6) repeat1.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: PASS (71.60 s)
 (2/6) repeat1.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: STARTED
 (2/6) repeat1.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: PASS (512.31 s)
 (3/6) repeat2.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: STARTED
 (3/6) repeat2.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: PASS (178.64 s)
 (4/6) repeat2.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: STARTED
 (4/6) repeat2.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: PASS (478.32 s)
 (5/6) repeat3.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: STARTED
 (5/6) repeat3.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.defrag.q35: PASS (155.05 s)
 (6/6) repeat3.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: STARTED
 (6/6) repeat3.Host_RHEL.m8.u10.product_rhel.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.x86_64.io-github-autotest-qemu.trans_hugepage.relocated.q35: PASS (566.20 s)
RESULTS    : PASS 6 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

mcasquer avatar Mar 18 '24 11:03 mcasquer

@YongxueHong @yanan-fu @zhenyzha @MiriamDeng could you review this PR? Thanks !

mcasquer avatar Mar 22 '24 07:03 mcasquer

A clarification, CI is failing due to the dependence of the https://github.com/autotest/tp-qemu/pull/3988 PR

mcasquer avatar Mar 22 '24 07:03 mcasquer

 (1/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.defrag.arm64-pci: STARTED
 (1/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.defrag.arm64-pci: FAIL: Failed on copying the tool package! (39.49 s)
 (2/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.relocated.arm64-pci: STARTED
 (2/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.relocated.arm64-pci: ERROR: [Errno 2] No such file or directory: '/home/kar/workspace/root/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-qemu/deps/thp_defrag_tool/thp_fragment.tar.gz' (57.85 s)

For details, please see https://github.com/autotest/tp-qemu/pull/3988

zhenyzha avatar Apr 02 '24 03:04 zhenyzha

 (1/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.defrag.arm64-pci: STARTED
 (1/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.defrag.arm64-pci: FAIL: Failed on copying the tool package! (39.49 s)
 (2/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.relocated.arm64-pci: STARTED
 (2/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.relocated.arm64-pci: ERROR: [Errno 2] No such file or directory: '/home/kar/workspace/root/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-qemu/deps/thp_defrag_tool/thp_fragment.tar.gz' (57.85 s)

For details, please see #3988

@zhenyzha As the patch description, it already list the dependency for this patch, and the reason for CI checking failure is same. Will you provide the test result that include the dependence ?

yanan-fu avatar Apr 02 '24 05:04 yanan-fu

 (1/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.defrag.arm64-pci: STARTED
 (1/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.defrag.arm64-pci: FAIL: Failed on copying the tool package! (39.49 s)
 (2/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.relocated.arm64-pci: STARTED
 (2/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.relocated.arm64-pci: ERROR: [Errno 2] No such file or directory: '/home/kar/workspace/root/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-qemu/deps/thp_defrag_tool/thp_fragment.tar.gz' (57.85 s)

For details, please see #3988

@zhenyzha As the patch description, it already list the dependency for this patch, and the reason for CI checking failure is same. Will you provide the test result that include the dependence ?

@yanan-fu This is a misunderstanding and the error is caused by #3988 changed thp_fragment.tar.gz -> thp_fragment.c missing files.

Mario just fixed this issue

zhenyzha avatar Apr 02 '24 06:04 zhenyzha

@yanan-fu @mcasquer Still hit 'No such file'

[stdlog] 2024-04-02 02:26:39,460 avocado.utils.process process          L0657 INFO | Running 'cp -rf /home/kar/workspace/root/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-qemu/deps/thp_defrag_tool/thp_fragment.tar.gz /var/tmp'
[stdlog] 2024-04-02 02:26:39,475 avocado.utils.process process          L0473 DEBUG| [stderr] cp: cannot stat '/home/kar/workspace/root/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-qemu/deps/thp_defrag_tool/thp_fragment.tar.gz'
[stdlog] 2024-04-02 02:26:39,475 avocado.utils.process process          L0473 DEBUG| [stderr] : No such file or directory
commit c1fbf55eed778f373496afcb1a8de6a2cb458394 (HEAD -> master)
Author: mcasquer <[email protected]>
Date:   Wed Mar 6 11:03:34 2024 +0100

    trans_hugepage.relocated: fix existing issues

    Fixes existing issues with the params and variables casting.
    Removes the redhat prefix from cfg values. For memory
    fragmentation, uses the thp_fragment tool, now invoked
    from an external provider.

    Signed-off-by: mcasquer <[email protected]>

commit 5bc04d691c830b4e46fca6aa18f5e4006f6d833f
Author: mcasquer <[email protected]>
Date:   Mon Mar 18 09:23:04 2024 +0100

    thp_fragment_tool: creates external provider

    Creates an external provider for the thp_fragment tool,
    this way, the tool, can be now easily invoked from different
    scripts avoiding duplicated code.

    Signed-off-by: mcasquer <[email protected]>

commit 9465953da5544759483c28413723a692c222b664
Author: mcasquer <[email protected]>
Date:   Fri Mar 15 09:21:31 2024 +0100

    thp_fragment: updates tool to v2 and extracts it to a new location

    Updates the thp_fragment to the new version where the tool
    works better in environments with a great amount of memory.

zhenyzha avatar Apr 02 '24 06:04 zhenyzha

(1/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.defrag.arm64-pci: PASS (58.73 s) (2/2) Host_RHEL.m9.u4.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.5.0.aarch64.page_64k.io-github-autotest-qemu.trans_hugepage.relocated.arm64-pci: PASS (289.22 s)

LGTM.Acked-by: Zhenyu Zhang [email protected]

zhenyzha avatar Apr 02 '24 07:04 zhenyzha

LGTM (1/2) Host_RHEL.m8.u10.product_rhel.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.ppc64le.io-github-autotest-qemu.trans_hugepage.relocated: STARTED Virsh executable not set or found on path, virsh module will not function normally (1/2) Host_RHEL.m8.u10.product_rhel.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.8.10.0.ppc64le.io-github-autotest-qemu.trans_hugepage.relocated: PASS (639.35 s) (2/2) Host_RHEL.m8.u10.product_rhel.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.4.0.ppc64le.io-github-autotest-qemu.trans_hugepage.relocated: STARTED Virsh executable not set or found on path, virsh module will not function normally (2/2) Host_RHEL.m8.u10.product_rhel.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.4.0.ppc64le.io-github-autotest-qemu.trans_hugepage.relocated: PASS (537.39 s)

MiriamDeng avatar Apr 02 '24 08:04 MiriamDeng

@YongxueHong please, could you review this PR? Thanks !

mcasquer avatar Apr 02 '24 09:04 mcasquer