Skip to content

feat: Add copy-offload migration test for VMs with RDM disks - #206

Merged
myakove merged 4 commits into
mainfrom
add_rdm_virt_xcopy_test
Dec 24, 2025
Merged

myakove merged 4 commits into
mainfrom
add_rdm_virt_xcopy_test

Conversation

@shellymiron

Copy link
Copy Markdown
Collaborator

This change adds support for testing migration of VMs with RDM (Raw Device Mapping) disks using the copy-offload functionality.

Key changes:

  • Add add_rdm_disk_to_vm() method in VMWareProvider to attach RDM disks to VMs post-clone (required since RDM cannot be added during clone on NFS datastores)
  • Modify clone_vm() to filter RDM disks from add_disks and attach them after the clone completes using ReconfigVM_Task
  • Add test_copyoffload_rdm_virtual_disk_migration test for virtual compatibility mode RDM disk migration
  • Add test configuration in config.py
  • Update README with RDM testing documentation

Configuration:
Requires rdm_lun_uuid in .providers.json copyoffload section:
copyoffload: {
rdm_lun_uuid: naa.XXXXXXXXXXXXXXX
}

The implementation includes foundation for physical compatibility mode testing in future PRs.

image

@shellymiron
shellymiron requested a review from myakove December 8, 2025 15:32
@redhat-qe-bot2

Copy link
Copy Markdown

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Pre-commit Checks: pre-commit runs automatically if .pre-commit-config.yaml exists
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /automerge - Enable automatic merging when all requirements are met (maintainers and approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest pre-commit - Run pre-commit hooks and checks
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 0 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No WIP, hold, or conflict labels
  5. Verified: PR must be marked as verified (if verification is enabled)

📊 Review Process

Approvers and Reviewers

Approvers:

  • myakove

Reviewers:

  • AmenB
  • Chenli-Hu
  • krcmarik
  • myakove
  • rnetser
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
  • automerge

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is automatically removed on each new commit
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

@myakove myakove left a comment

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.

Code Review

Found 11 issue(s) in this PR:

🔴 Critical Issues (6)

File Line Issue
libs/providers/vmware.py 464 Deterministic config - no .get() default
libs/providers/vmware.py 465 Deterministic config - no .get() default
libs/providers/vmware.py 505 Deterministic config - no .get() default
tests/test_copyoffload_migration.py 503 Deterministic config - no .get() default
tests/test_copyoffload_migration.py 504 Deterministic config - no .get() default
tests/tests_config/config.py 111 Missing explicit rdm_type in config

⚠️ Warnings (3)

File Line Issue
libs/providers/vmware.py 467 Redundant validation after .get() fix
tests/test_copyoffload_migration.py 508 Inconsistent config access pattern
libs/providers/vmware.py 484 Magic number without explanation

💡 Suggestions (2)

File Line Issue
libs/providers/vmware.py 456 Missing type annotation for rdm_type
libs/providers/vmware.py 488 Magic number without explanation

Review generated by Claude Code

Comment thread libs/providers/vmware.py Resolved
Comment thread libs/providers/vmware.py Resolved
Comment thread libs/providers/vmware.py Resolved
Comment thread tests/test_copyoffload_migration.py Resolved
Comment thread tests/test_copyoffload_migration.py Resolved
Comment thread libs/providers/vmware.py Resolved
Comment thread tests/test_copyoffload_migration.py Resolved
Comment thread libs/providers/vmware.py Resolved
Comment thread libs/providers/vmware.py Resolved
Comment thread libs/providers/vmware.py Resolved
@shellymiron

Copy link
Copy Markdown
Collaborator Author
image

latest run after rebase

@shellymiron
shellymiron force-pushed the add_rdm_virt_xcopy_test branch 4 times, most recently from 680b4c5 to 276b271 Compare December 23, 2025 13:09
This change adds support for testing migration of VMs with RDM (Raw Device
Mapping) disks using the copy-offload functionality.

Key changes:
- Add add_rdm_disk_to_vm() method in VMWareProvider to attach RDM disks
  to VMs post-clone (required since RDM cannot be added during clone on
  NFS datastores)
- Modify clone_vm() to filter RDM disks from add_disks and attach them
  after the clone completes using ReconfigVM_Task
- Add test_copyoffload_rdm_virtual_disk_migration test for virtual
  compatibility mode RDM disk migration
- Add test configuration in config.py
- Update README with RDM testing documentation

Configuration:
Requires rdm_lun_uuid in .providers.json copyoffload section:
  copyoffload: {
    rdm_lun_uuid: naa.XXXXXXXXXXXXXXX
  }

The implementation includes foundation for physical compatibility mode
testing in future PRs.
@shellymiron
shellymiron force-pushed the add_rdm_virt_xcopy_test branch from 276b271 to 04495d9 Compare December 23, 2025 13:22
@shellymiron

Copy link
Copy Markdown
Collaborator Author

/verified
tested here: https://jenkins-csb-mtv-qe-main.dno.corp.redhat.com/job/mtv-2.10-ocp-4.20-api-test-runner-vsphere8-nfs-csi/46/testReport/

@myakove
myakove merged commit 10e8117 into main Dec 24, 2025
4 of 5 checks passed
@myakove
myakove deleted the add_rdm_virt_xcopy_test branch December 24, 2025 08:46
@redhat-qe-bot

Copy link
Copy Markdown

New container for quay.io/openshift-cnv/mtv-tests:latest published

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants