Skip to content

fix: keep bootstrapRef across the VM creation request-id patch - #800

Open
vijayaraghavanr31 wants to merge 1 commit into
mainfrom
issue/fix-bootstrapref-nil-panic
Open

vijayaraghavanr31 wants to merge 1 commit into
mainfrom
issue/fix-bootstrapref-nil-panic

Conversation

@vijayaraghavanr31

Copy link
Copy Markdown
Contributor

Summary

  • The VM creation request-id patch dropped an in-memory spec.bootstrapRef, because controller-runtime zeros the object before decoding the API response.
  • addGuestCustomizationToVM then panicked on bootstrapRef.Kind during the first VM create. The retry usually succeeded, which is why scale tests logged the panic and the cluster often still came up.
  • The request-id patch now persists bootstrapRef, so cloud-init is still applied on the first create. Both guest-customization helpers return an error when the ref is nil instead of panicking.

Test plan

  • go test -count=1 -run 'TestNutanixMachineReconciler_getOrMintVMCreationRequestID|TestAddGuestCustomizationNilBootstrapRef|TestNutanixMachineReconciler_getOrCreateVM' ./controllers/
  • Create a cluster and confirm CAPX logs have no addGuestCustomizationToVM nil-pointer panic on the first VM create
  • Confirm the created VM has guest customization and the node joins

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.52%. Comparing base (883f3c9) to head (9c3baed).
⚠️ Report is 131 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #800       +/-   ##
===========================================
+ Coverage   43.96%   54.52%   +10.56%     
===========================================
  Files          18       32       +14     
  Lines        2593     6294     +3701     
===========================================
+ Hits         1140     3432     +2292     
- Misses       1417     2546     +1129     
- Partials       36      316      +280     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants