Use *string for backingObjectId #3942
Merged
+6
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
BackingObjectId is an optional value which means there is a distinction between unset and empty value.
The serialization process treats empty value as unset, which means it is changing the content between serialize/deserialize. Hostd differientiates between these 2 values and if it notices it changes will reject modifications when the VM is powered on, even though our intent was not to modify the content.
This change uses *string value to distinguish all the states. Clients that care about this value will have to do similar changes as I made to the tests.
Closes: #(issue-number)
How Has This Been Tested?
I deployed this change in our environment where a vm.Reconfigure was consistently failing. With the change the operation succeeded.
Guidelines
Please read and follow the
CONTRIBUTIONguidelines of this project.