Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ch libvirt #3562

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fix ch libvirt #3562

wants to merge 3 commits into from

Conversation

praveen-pk
Copy link
Contributor

This patch series fixes the libvirt version parsing and sets the domain based on the underlying hypervisor.

@praveen-pk praveen-pk force-pushed the fix_ch_libvirt branch 2 times, most recently from 0d96c83 to c9741e8 Compare December 20, 2024 22:06
@praveen-pk
Copy link
Contributor Author

fyi, working on flake8 failures.

@squirrelsc
Copy link
Member

fyi, working on flake8 failures.

You can follow this doc to set local dev env, so check errors could be fixed locally.

https://mslisa.readthedocs.io/en/main/write_test/dev_setup.html

lisa/sut_orchestrator/libvirt/transformers.py Outdated Show resolved Hide resolved
Comment on lines +574 to +561
node.execute("systemctl enable libvirtd", shell=True, sudo=True)
node.execute("systemctl enable virtnetworkd", shell=True, sudo=True)
log.info("Enabled libvirtd and virtnetworkd services")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these steps apply to the older 6.X Libvirt as well? If not, we should execute them conditionally based on the the version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by 6.x do you mean by the Libvirt in ch branch? I am not sure how this will work when compiled within our test pipelines.

If installed with rpms, virtnetworkd.service will be a service packaged in our libvirt rpms.

Properly parse libvirt version and return only the version information.

Signed-off-by: Praveen K Paladugu <[email protected]>
Libvirt versions greater than 10.2.0, define domain as 'hyperv' or 'kvm'
based on the underlying hypervisor. Set this domain appropriately in
domain's XML after checking libvirt version.

Signed-off-by: Praveen K Paladugu <[email protected]>
Enable virtnetworkd service along with libvritd service. virtnetworkd
service will setup the default NAT network for guests to use.

Signed-off-by: Praveen K Paladugu <[email protected]>
@praveen-pk
Copy link
Contributor Author

Seems like a failure while installing python modules:

 Collecting pycairo
        Downloading pycairo-1.27.0.tar.gz (661 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 661.5/661.5 kB 14.7 MB/s eta 0:00:00
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [461 lines of output]
            + meson setup /tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8 /tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8/.mesonpy-mamhqbp2 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dwheel=true -Dtests=false --native-file=/tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8/.mesonpy-mamhqbp2/meson-python-native-file.ini
            The Meson build system
            Version: 1.6.1
            Source dir: /tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8
            Build dir: /tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8/.mesonpy-mamhqbp2
            Build type: native build
            Project name: pycairo
            Project version: 1.27.0
            C compiler for the host machine: cc (gcc 13.3.0 "cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0")
            C linker for the host machine: cc ld.bfd 2.42
            Host machine cpu family: x86_64
            Host machine cpu: x86_64
            Program python3 found: YES (/home/runner/work/lisa/lisa/.nox/pylint/bin/python)
            Compiler for C supports arguments -Wall: YES
            Compiler for C supports arguments -Warray-bounds: YES
            Compiler for C supports arguments -Wcast-align: YES
            Compiler for C supports arguments -Wconversion: YES
            Compiler for C supports arguments -Wextra: YES
            Compiler for C supports arguments -Wformat=2: YES
            Compiler for C supports arguments -Wformat-nonliteral: YES
            Compiler for C supports arguments -Wformat-security: YES
            Compiler for C supports arguments -Wimplicit-function-declaration: YES
            Compiler for C supports arguments -Winit-self: YES
            Compiler for C supports arguments -Winline: YES
            Compiler for C supports arguments -Wmissing-format-attribute: YES
            Compiler for C supports arguments -Wmissing-noreturn: YES
            Compiler for C supports arguments -Wnested-externs: YES
            Compiler for C supports arguments -Wold-style-definition: YES
            Compiler for C supports arguments -Wpacked: YES
            Compiler for C supports arguments -Wpointer-arith: YES
            Compiler for C supports arguments -Wreturn-type: YES
            Compiler for C supports arguments -Wshadow: YES
            Compiler for C supports arguments -Wsign-compare: YES
            Compiler for C supports arguments -Wstrict-aliasing: YES
            Compiler for C supports arguments -Wundef: YES
            Compiler for C supports arguments -Wunused-but-set-variable: YES
            Compiler for C supports arguments -Wswitch-default: YES
            Compiler for C supports arguments -Wno-missing-field-initializers: YES
            Compiler for C supports arguments -Wno-unused-parameter: YES
            Compiler for C supports arguments -fno-strict-aliasing: YES
            Compiler for C supports arguments -fvisibility=hidden: YES
            Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
            Found CMake: /usr/local/bin/cmake (3.31.2)
            Run-time dependency cairo found: NO (tried pkgconfig and cmake)
      
            ../cairo/meson.build:31:12: ERROR: Dependency "cairo" not found, tried pkgconfig and cmake
      
            A full log can be found at /tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8/.mesonpy-mamhqbp2/meson-logs/meson-log.txt

Could re-triggering the pipeline fix the failures?

@squirrelsc squirrelsc self-requested a review January 4, 2025 01:55
@squirrelsc
Copy link
Member

@LiliDeng LGTM

@LiliDeng
Copy link
Collaborator

LiliDeng commented Jan 4, 2025

Seems like a failure while installing python modules:

 Collecting pycairo
        Downloading pycairo-1.27.0.tar.gz (661 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 661.5/661.5 kB 14.7 MB/s eta 0:00:00
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [461 lines of output]
            + meson setup /tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8 /tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8/.mesonpy-mamhqbp2 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md -Dwheel=true -Dtests=false --native-file=/tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8/.mesonpy-mamhqbp2/meson-python-native-file.ini
            The Meson build system
            Version: 1.6.1
            Source dir: /tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8
            Build dir: /tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8/.mesonpy-mamhqbp2
            Build type: native build
            Project name: pycairo
            Project version: 1.27.0
            C compiler for the host machine: cc (gcc 13.3.0 "cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0")
            C linker for the host machine: cc ld.bfd 2.42
            Host machine cpu family: x86_64
            Host machine cpu: x86_64
            Program python3 found: YES (/home/runner/work/lisa/lisa/.nox/pylint/bin/python)
            Compiler for C supports arguments -Wall: YES
            Compiler for C supports arguments -Warray-bounds: YES
            Compiler for C supports arguments -Wcast-align: YES
            Compiler for C supports arguments -Wconversion: YES
            Compiler for C supports arguments -Wextra: YES
            Compiler for C supports arguments -Wformat=2: YES
            Compiler for C supports arguments -Wformat-nonliteral: YES
            Compiler for C supports arguments -Wformat-security: YES
            Compiler for C supports arguments -Wimplicit-function-declaration: YES
            Compiler for C supports arguments -Winit-self: YES
            Compiler for C supports arguments -Winline: YES
            Compiler for C supports arguments -Wmissing-format-attribute: YES
            Compiler for C supports arguments -Wmissing-noreturn: YES
            Compiler for C supports arguments -Wnested-externs: YES
            Compiler for C supports arguments -Wold-style-definition: YES
            Compiler for C supports arguments -Wpacked: YES
            Compiler for C supports arguments -Wpointer-arith: YES
            Compiler for C supports arguments -Wreturn-type: YES
            Compiler for C supports arguments -Wshadow: YES
            Compiler for C supports arguments -Wsign-compare: YES
            Compiler for C supports arguments -Wstrict-aliasing: YES
            Compiler for C supports arguments -Wundef: YES
            Compiler for C supports arguments -Wunused-but-set-variable: YES
            Compiler for C supports arguments -Wswitch-default: YES
            Compiler for C supports arguments -Wno-missing-field-initializers: YES
            Compiler for C supports arguments -Wno-unused-parameter: YES
            Compiler for C supports arguments -fno-strict-aliasing: YES
            Compiler for C supports arguments -fvisibility=hidden: YES
            Found pkg-config: YES (/usr/bin/pkg-config) 1.8.1
            Found CMake: /usr/local/bin/cmake (3.31.2)
            Run-time dependency cairo found: NO (tried pkgconfig and cmake)
      
            ../cairo/meson.build:31:12: ERROR: Dependency "cairo" not found, tried pkgconfig and cmake
      
            A full log can be found at /tmp/pip-install-8fg37n9o/pycairo_d978cf57bcd74b96966eb907f5e5e0a8/.mesonpy-mamhqbp2/meson-logs/meson-log.txt

Could re-triggering the pipeline fix the failures?

rebase code from latest main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants