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

fix issue if adding more disks than scsictrlunitnumber value #178

Closed
wants to merge 4 commits into from

Conversation

jarvin521
Copy link
Contributor

add_disks fails if adding more disks than the value of controller.scsiCtlrUnitNumber

Description

In my situation I was trying to add 7 disks to my template during kitchen create. My template already has 2 disks to begin with. When creating my VMs I found that controller.scsi.CtlrUnitNumber = 7. When adding my disks and iterating through :Add_disks, line 412 would change next_id from 7 to 8. However, when trying to add another disk after 7 next_id would be 8 again causing the create to fail.

This code change moves highest_id and next_id outside of the loop and no longer relies on the idx variable to determine next_id.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (non-breaking change that does not add functionality or fix an issue)

Checklist:

  • I have read the CONTRIBUTING document.
  • I have run the pre-merge tests locally and they pass.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • If Gemfile.lock has changed, I have used --conservative to do it and included the full output in the Description above.
  • All new and existing tests passed.
  • All commits have been signed-off for the Developer Certificate of Origin.

@jarvin521 jarvin521 requested review from a team as code owners February 24, 2025 21:15
@jarvin521
Copy link
Contributor Author

Signed-off-by: Jason Arvin jarvin521@hotmail.com

@jarvin521 jarvin521 closed this Feb 24, 2025
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.

1 participant