Skip to content

memory_hotplug_virshdump: add sequential attach/dump - #6912

Open
sneh-3 wants to merge 4 commits into
autotest:masterfrom
sneh-3:test_hotplug_virshdump
Open

memory_hotplug_virshdump: add sequential attach/dump #6912
sneh-3 wants to merge 4 commits into
autotest:masterfrom
sneh-3:test_hotplug_virshdump

Conversation

@sneh-3

@sneh-3 sneh-3 commented Jun 30, 2026

Copy link
Copy Markdown
  • Validate memory hotplug followed by virsh dump per iteration
  • Ensure consistent VM state and avoid race conditions during runtime
  • Improve error handling, logging, and cleanup to prevent spurious failures

Signed-off-by: Sneh Shikha Yadav syadav@linux.ibm.com

sneh-3 added 4 commits June 28, 2026 01:32
…lug/unplug

- Implement full pool lifecycle (define > start > autostart > volume creation)
- Support dirpool, fspool, and defaultpool with qcow2/raw formats
- Validate attach-disk and attach-device-xml variants
- Ensure cleanup via finally block (delete volume, destroy/undefine pool, remove target dir)

Signed-off-by: Sneh Shikha Yadav <syadav@linux.ibm.com>
… variants

- Add qcow2 disk variants for --live, --config, and --persistent attach cases
- Enable attach followed by immediate detach for selected test scenarios
- Introduce helpers for domblklist verification and device absence checks
- Add support for non-root disk selection via /dev/disk/by-id
- Handle --config attach with VM restart and verification
- Validate persistent XML changes across VM restart
- Extend detach verification for both active and persistent configurations

Signed-off-by: Sneh Shikha Yadav <syadav@linux.ibm.com>
Add VirtualDiskQcow2Raw test variants to cover hot attach/detach of
100M qcow2 virtio disks across --live, --config, and --persistent
modes. Enable attach+detach flow and validate behavior before/after
attach, including restart handling for --config.

Introduce VirtualDiskQcow2Raw class to support qcow2/raw formats using
create_local_disk, set driver type, and verify disk via domblklist and
guest checks.

Signed-off-by: Sneh Shikha Yadav <syadav@linux.ibm.com>
- Validate memory hotplug followed by virsh dump per iteration
- Ensure consistent VM state and avoid race conditions during runtime
- Improve error handling, logging, and cleanup to prevent spurious failures

Signed-off-by: Sneh Shikha Yadav <syadav@linux.ibm.com>
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@sneh-3, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 48 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d5fdddf9-61a6-4cf8-bbf7-214cce2c88fe

📥 Commits

Reviewing files that changed from the base of the PR and between c96ab65 and 06cfcc7.

📒 Files selected for processing (8)
  • libvirt/tests/cfg/memory/memory_hotplug_virshdump.cfg
  • libvirt/tests/cfg/storage/virsh_pool_vol.cfg
  • libvirt/tests/cfg/virsh_cmd/domain/virsh_attach_detach_disk.cfg
  • libvirt/tests/cfg/virsh_cmd/domain/virsh_attach_device.cfg
  • libvirt/tests/src/memory/memory_hotplug_virshdump.py
  • libvirt/tests/src/storage/virsh_pool_vol.py
  • libvirt/tests/src/virsh_cmd/domain/virsh_attach_detach_disk.py
  • libvirt/tests/src/virsh_cmd/domain/virsh_attach_device.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@harihare

harihare commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

As per initial comment, I assume it is only memory releated patch. However I see code related to disk attach and detach. Please correct me if I am wrong.

try:
logging.info(" [virsh dump] %s", dump_file)
dump_result = virsh.dump(vm_name, dump_file, dump_options, debug=True)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

as per code for every iteration of hotplug dump is taken. is that you are planning. As dump is a distructive tests it will take good amount of time for multiple iterations. I would recommend to run virsh dump once or twice in parallel to hotplug.

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