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

backingchain/snapshot_blockpull: fix disk disovery #5429

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

smitterl
Copy link
Contributor

The test identified new disks by their target name. However, a reboot can mess up the non-persistent disk namings /dev/vdX.

Use instead a function that identifies a new disk inside of a VM as the one disk that has no root mount on itself, its partitions or volumes.

@smitterl
Copy link
Contributor Author

JOB ID     : 3d38e175e4db2e0ab4d4bfa07567299583d43798
JOB LOG    : /var/lib/avocado/job-results/job-2024-01-31T05.48-3d38e17/job.log
 (1/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.auth_backend_test.native_path.middle_to_top_to_base: PASS (53.26 s)
 (2/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.block_backend_test.native_path.middle_to_top: PASS (33.64 s)
 (3/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.file_backend_test.native_path.async: PASS (31.87 s)
 (4/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.file_backend_test.native_path.bandwidth: PASS (25.37 s)
 (5/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.file_backend_test.native_path.timeout: PASS (24.54 s)
 (6/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.file_backend_test.native_path.middle_to_top: PASS (26.27 s)
 (7/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.file_backend_test.reuse_external.keep_relative: PASS (81.80 s)
 (8/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.nbd_backend_test.native_path.base_to_top: PASS (30.15 s)
 (9/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.nbd_backend_test.native_path.middle_to_top: PASS (30.79 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-01-31T05.48-3d38e17/results.html
JOB TIME   : 338.23 s

@smitterl
Copy link
Contributor Author

@chunfuwen please help review

Copy link
Contributor

@chunfuwen chunfuwen left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@Yingshun Yingshun left a comment

Choose a reason for hiding this comment

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

Others LGTM

@@ -359,7 +353,11 @@ def start_middletotop_blkpull_on_vm():
setup_nbd_env(params)
try:
vm.start()
vm.wait_for_login().close()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'd better to wait for vm login for other non-additional_disk scenarios, I mean keep this line for others. what do you think?

Copy link
Contributor Author

@smitterl smitterl Feb 21, 2024

Choose a reason for hiding this comment

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

@Yingshun Updated (s. following lines)

JOB ID     : b7a6f92be4e4aabd7060fa4faf68248b7420fbd9
JOB LOG    : /var/lib/avocado/job-results/job-2024-02-21T10.09-b7a6f92/job.log
 (1/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.auth_backend_test.native_path.middle_to_top_to_base: PASS (63.55 s)
 (2/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.block_backend_test.native_path.middle_to_top: PASS (38.42 s)
 (3/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.file_backend_test.native_path.async: PASS (35.63 s)
 (4/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.file_backend_test.native_path.bandwidth: PASS (30.31 s)
 (5/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.file_backend_test.native_path.timeout: PASS (29.71 s)
 (6/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.file_backend_test.native_path.middle_to_top: PASS (29.41 s)
 (7/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.file_backend_test.reuse_external.keep_relative: PASS (30.21 s)
 (8/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.nbd_backend_test.native_path.base_to_top: PASS (31.17 s)
 (9/9) type_specific.io-github-autotest-libvirt.virtual_disks.snapshot_blockpull.positive_test.nbd_backend_test.native_path.middle_to_top: PASS (30.77 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-02-21T10.09-b7a6f92/results.html
JOB TIME   : 319.78 s

The test identified new disks by their target name.
However, a reboot can mess up the non-persistent disk namings /dev/vdX.

Use instead a function that identifies a new disk inside of a VM as the
one disk that has no root mount on itself, its partitions or volumes.

Signed-off-by: Sebastian Mitterle <[email protected]>
@smitterl smitterl requested a review from Yingshun February 21, 2024 15:19
@Yingshun Yingshun merged commit b730309 into autotest:master Feb 22, 2024
5 checks passed
@smitterl smitterl deleted the snapshot_blockpull branch July 26, 2024 13:33
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