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: scsi ids changing on machines built with v2.6.x #2115

Merged

Conversation

vasilsatanasov
Copy link
Contributor

Description

After the introduction of the SR-IOV feature network adapters due to inconsistent check for changes in the physical_function attribute have been recreated after clone since the check always returned true. The result is that instead of updating existing NICs the relocate tack started after clone was always deleting the existing NICs and creating new ones. This was causing the new VM to be disconnected from network

Changed the check for changes in physical_function attribute to treat nil and empty string equaly so missing physical_function attribute in the device compared to empty string from the schema won't be cosnidered as changed.

Testing done: cloned VM from template with 2 nics and verified that there is network connectivity. Also verified the output from lspci command on the template VM and on the clone VM.

Fixes #2089

Acceptance tests

  • Have you added an acceptance test for the functionality being added?
  • Have you run the acceptance tests on this branch?

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

Release Note

Release note for CHANGELOG:

...

References

#2089

After the introduction of the SR-IOV feature network adapters due to
inconsistent check for changes in the `physical_function` attribute have
been recreated after clone since the check always returned `true`. The
result is that instead of updating existing NICs the relocate tack
started after clone was always deleting the existing NICs and creating
new ones. This was causing the new VM to be disconnected from network

Changed the check for changes in `physical_function` attribute to treat
nil and empty string equaly so missing `physical_function` attribute in
the device compared to empty string from the schema won't be cosnidered as changed.

Testing done: cloned VM from template with 2 nics and verified that
there is network connectivity. Also verified the output from lspci
command on the template VM and on the clone VM.

Fixes hashicorp#2089

Signed-off-by: Vasil Atanasov <[email protected]>
@vasilsatanasov vasilsatanasov requested a review from a team as a code owner January 15, 2024 13:27
Copy link
Collaborator

@tenthirtyam tenthirtyam left a comment

Choose a reason for hiding this comment

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

LGTM

@tenthirtyam tenthirtyam changed the title [fix] SCSI IDs changing on machines built with 2.6 fix: scsi ids changing on machines built with v2.6.x Jan 16, 2024
@tenthirtyam tenthirtyam merged commit cc7366c into hashicorp:main Jan 16, 2024
4 checks passed
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SCSI IDs changing on machines built with 2.60+.
3 participants