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

Guestvcpus: enable/disable max vcpu by guest agent #5899

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

rh-jugraham
Copy link
Contributor

@rh-jugraham rh-jugraham commented Sep 17, 2024

Case ID: VIRT-301878
Automates the case that verifies that the maximum vcpu (numbers = #host_online_cpu - 1) in the guest can be disabled and then enabled. This is done by modifying the existing virsh_guestvcpus.py test file.

Evidence of tests passing:

[root@ampere-mtsnow-altra-07 /]# avocado run --vt-type libvirt virsh.guestvcpus.max_test
No python imaging library installed. Screendump and Windows guest BSOD detection are disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
No python imaging library installed. PPM image conversion to JPEG disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
JOB ID     : 1b1991ea18284ce10f02306864ac7f7bfbdbb903
JOB LOG    : /var/log/avocado/job-results/job-2024-09-23T12.50-1b1991e/job.log
 (1/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: STARTED
 (1/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: PASS (94.42 s)
 (2/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: STARTED
 (2/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: PASS (86.99 s)
 (3/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: STARTED
 (3/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: PASS (84.96 s)
 (4/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: STARTED
 (4/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: PASS (84.49 s)
 (5/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: STARTED
 (5/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: PASS (85.38 s)
 (6/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: STARTED
 (6/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: PASS (83.34 s)
 (7/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: STARTED
 (7/7) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: PASS (85.10 s)
RESULTS    : PASS 7 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /var/log/avocado/job-results/job-2024-09-23T12.50-1b1991e/results.html
JOB TIME   : 608.71 s

@rh-jugraham rh-jugraham force-pushed the enable_disable_max_vcpus branch 4 times, most recently from b1d0ee8 to beb9351 Compare September 18, 2024 21:41
@rh-jugraham rh-jugraham marked this pull request as ready for review September 18, 2024 21:55
@Yingshun
Copy link
Contributor

@dzhengfy

Can you please help confirm if we can check vcpu count using virsh.guestvcpus instead of virsh.vcpucount in this test?

https://github.com/autotest/tp-libvirt/pull/5899/files?diff=split&w=0#diff-14d5af0ce88c7a363a2327c4ceeddf856336a2d123eb1b4fa37422ca5a488cffR100-R102

in polarion, it used vcpucount:

Check vcpucount info by guest agent 
# virsh vcpucount vm --guest

@rh-jugraham rh-jugraham force-pushed the enable_disable_max_vcpus branch 3 times, most recently from 40fec16 to a9951d1 Compare September 24, 2024 17:16
@dzhengfy
Copy link
Contributor

dzhengfy commented Oct 9, 2024

@dzhengfy

Can you please help confirm if we can check vcpu count using virsh.guestvcpus instead of virsh.vcpucount in this test?

https://github.com/autotest/tp-libvirt/pull/5899/files?diff=split&w=0#diff-14d5af0ce88c7a363a2327c4ceeddf856336a2d123eb1b4fa37422ca5a488cffR100-R102

in polarion, it used vcpucount:

Check vcpucount info by guest agent 
# virsh vcpucount vm --guest

The main checkpoint is to test guestvcpus could enable/disable vcpu normally. How to check the online vcpu number is not a key checkpoint. So it is ok to use virsh.guestvcpus to get the vcpu number.

@dzhengfy
Copy link
Contributor

dzhengfy commented Oct 9, 2024

As the code structure is changed very much, could you help rerun all test cases in this python file as we usually do?
Please use below command to run those cases which could avoid to run 7 same cases as in the PR description.
avocado run --vt-type libvirt --vt-machine-type arm64-mmio virsh.guestvcpus

@rh-jugraham

@dzhengfy
Copy link
Contributor

dzhengfy commented Oct 9, 2024

@rh-jugraham Please help add the polarion case id info in the PR description, then the reviewer could easily find and understand the case steps.
I already added it into the description this time.
Thanks.

@rh-jugraham
Copy link
Contributor Author

@rh-jugraham Please help add the polarion case id info in the PR description, then the reviewer could easily find and understand the case steps. I already added it into the description this time. Thanks.

Thanks for adding it, and I will keep this in mind for the future

@rh-jugraham rh-jugraham force-pushed the enable_disable_max_vcpus branch 2 times, most recently from a65595f to fe602f3 Compare October 9, 2024 19:04
@rh-jugraham
Copy link
Contributor Author

As the code structure is changed very much, could you help rerun all test cases in this python file as we usually do? Please use below command to run those cases which could avoid to run 7 same cases as in the PR description. avocado run --vt-type libvirt --vt-machine-type arm64-mmio virsh.guestvcpus

Result:

[root@ampere-mtjade-altra-02 /]# avocado run --vt-type libvirt --vt-machine-type arm64-mmio virsh.guestvcpus
No python imaging library installed. Screendump and Windows guest BSOD detection are disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
No python imaging library installed. PPM image conversion to JPEG disabled. In order to enable it, please install python-imaging or the equivalent for your distro.
JOB ID     : ddfa0201e3584f60fba81b1a00fe9737802ae1f0
JOB LOG    : /var/lib/avocado/job-results/job-2024-10-10T15.58-ddfa020/job.log
 (1/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.no-option: STARTED
 (1/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.no-option: PASS (57.48 s)
 (2/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.disable: STARTED
 (2/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.disable: PASS (61.33 s)
 (3/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.enable: STARTED
 (3/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.enable: PASS (59.33 s)
 (4/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.combine: STARTED
 (4/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.normal_test.combine: PASS (62.96 s)
 (5/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: STARTED
 (5/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.max_test: PASS (81.79 s)
 (6/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.error_test.invalid_dom.no_dom: STARTED
 (6/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.error_test.invalid_dom.no_dom: PASS (57.01 s)
 (7/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.error_test.invalid_dom.err_dom: STARTED
 (7/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.error_test.invalid_dom.err_dom: PASS (56.83 s)
 (8/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.error_test.invalid_cpulist.enable: STARTED
 (8/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.error_test.invalid_cpulist.enable: PASS (57.97 s)
 (9/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.error_test.invalid_cpulist.disable: STARTED
 (9/9) type_specific.io-github-autotest-libvirt.virsh.guestvcpus.error_test.invalid_cpulist.disable: PASS (57.29 s)
RESULTS    : PASS 9 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /var/lib/avocado/job-results/job-2024-10-10T15.58-ddfa020/results.html
JOB TIME   : 559.03 s

Copy link
Contributor

@dzhengfy dzhengfy left a comment

Choose a reason for hiding this comment

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

LGTM

@Yingshun Yingshun merged commit 53d3adc into autotest:master Oct 17, 2024
5 checks passed
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.

3 participants