fix: limit NIC name detection to preserve_static_ips tests#536
fix: limit NIC name detection to preserve_static_ips tests#536MiriSafra wants to merge 1 commit into
Conversation
NIC name preservation udev rules are generated by the same firstboot script as static IP preservation. Gate both detect_guest_nic_names (pre-migration) and check_nic_name_preservation (post-migration) on preserve_static_ips config, matching the static IP check pattern. Fixes regression where detect_guest_nic_names crashed setup on clone-based tests (e.g. copy-offload) where VMware Tools hadn't reported guestFamily yet.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
WalkthroughThis PR aligns NIC name preservation logic across two integration test paths. The test fixture setup and post-migration validation both now gate NIC name operations on the ChangesNIC name preservation conditional alignment
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
/verified |
| source_provider_data=fixture_store["source_provider_data"], | ||
| vm_details=source_vm_details, | ||
| ) | ||
| if plan.get("preserve_static_ips"): |
There was a problem hiding this comment.
The gating on preserve_static_ips makes sense - NIC name detection and static IP origin detection share the same precondition of a running source guest with tools active. I believe tho that It's currently an undocumented assumption - preserve_static_ips implicitly requires source_vm_power: "on" in the test config - without a running guest, neither static IP origins nor NIC names can be collected. We should consider making it explicit with a validation in the prepared_plan fixture (validating that if we set preserve_static_ips in the text config source_vm_power is set to "on" too) or alternatively, document this requirement (or both).
Summary
detect_guest_nic_names(pre-migration) andcheck_nic_name_preservation(post-migration) onpreserve_static_ipsconfigdetect_guest_nic_namescrashed setup on clone-based tests (e.g. copy-offload) where VMware Tools hadn't reportedguestFamilyyetSummary by CodeRabbit
Bug Fixes
Refactor