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 virtual_disks filedescriptor failure #5200

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

chunfuwen
Copy link
Contributor

Fix virtual_disks filedescriptor failure
utils_disk.get_added_parts_by_path() will get duplicated address for one partition(pci and virto-pci)

instead it need use utils_disk.get_added_parts()

utils_disk.get_added_parts_by_path() will get duplicated address for one partition(pci and virto-pci)

instead it need use utils_disk.get_added_parts()

Signed-off-by: chunfuwen <[email protected]>
@chunfuwen
Copy link
Contributor Author

previously failed log:

2023-09-14 07:45:23,596 utils_disk L1096 DEBUG| Partitions by path: ['pci-0000:04:00.0', 'virtio-pci-0000:04:00.0', 'pci-0000:04:00.0-part1', 'virtio-pci-0000:04:00.0-part1', 'pci-0000:04:00.0-part2', 'virtio-pci-0000:04:00.0-part2', 'pci-0000:04:00.0-part3', 'virtio-pci-0000:04:00.0-part3', 'pci-0000:07:00.0', 'virtio-pci-0000:07:00.0']
2023-09-14 07:45:23,596 utils_disk L1148 INFO | Added parts:['virtio-pci-0000:07:00.0', 'pci-0000:07:00.0']
2023-09-14 07:45:23,597 virtual_disks_fi L0054 DEBUG| Newly added partition(s) is: ['virtio-pci-0000:07:00.0', 'pci-0000:07:00.0']
2023-09-14 07:45:24,070 virsh L1595 DEBUG| Undefine VM avocado-vt-vm1
2023-09-14 07:45:24,090 virsh L1580 DEBUG| Define VM from /tmp/xml_utils_temp_tu6esbjp.xml
2023-09-14 07:45:24,125 stacktrace L0039 ERROR|
2023-09-14 07:45:24,125 stacktrace L0041 ERROR| Reproduced traceback from: /var/ci/libvirt-ci/runtest/avocado-vt/avocado-vt/avocado_vt/test.py:274
2023-09-14 07:45:24,126 stacktrace L0045 ERROR| Traceback (most recent call last):
2023-09-14 07:45:24,126 stacktrace L0045 ERROR| File "/var/lib/avocado/data/avocado-vt/virttest/test-providers.d/downloads/io-github-autotest-libvirt/libvirt/tests/src/virtual_disks/virtual_disks_filedescriptor.py", line 288, in run
2023-09-14 07:45:24,126 stacktrace L0045 ERROR| test.fail("Attached 1 virtual disk but got %s." % len(new_disks))
2023-09-14 07:45:24,126 stacktrace L0045 ERROR| File "/var/ci/libvirt-ci/runtest/avocado-vt/avocado/avocado/core/test.py", line 979, in fail
2023-09-14 07:45:24,126 stacktrace L0045 ERROR| raise exceptions.TestFail(message)
2023-09-14 07:45:24,126 stacktrace L0045 ERROR| avocado.core.exceptions.TestFail: Attached 1 virtual disk but got 2.
2023-09-14 07:45:24,126 stacktrace L0046 ERROR|

@chunfuwen
Copy link
Contributor Author

Command 'virsh list' finished with 0 after 0.037459077s
cleaning libvirtd logs...
DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file)
DATA (filename=stdout.expected) => NOT FOUND (data sources: variant, test, file)
DATA (filename=stderr.expected) => NOT FOUND (data sources: variant, test, file)
PASS 1-type_specific.io-github-autotest-libvirt.virtual_disks.file_descriptor.coldplug.attach_disk.associate_flag_seclabel_default

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

@dzhengfy dzhengfy merged commit 602a1d1 into autotest:master Sep 22, 2023
4 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.

2 participants