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

Add new disk to existingDevices list #10844

Merged
merged 2 commits into from
Mar 30, 2021
Merged

Add new disk to existingDevices list #10844

merged 2 commits into from
Mar 30, 2021

Conversation

sylviamoss
Copy link
Contributor

@sylviamoss sylviamoss commented Mar 30, 2021

The newly created devices weren't being added to the existingDevices list. This was causing devices to be created with the same key.

Closes #10430

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #10844 (c0c6d04) into master (77a29fc) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted Files Coverage Δ
builder/vsphere/driver/disk.go 61.11% <100.00%> (+61.11%) ⬆️
builder/azure/dtl/tempname.go 68.75% <0.00%> (-6.25%) ⬇️
builder/vsphere/driver/datastore.go 34.64% <0.00%> (+1.30%) ⬆️
builder/azure/arm/tempname.go 86.11% <0.00%> (+5.55%) ⬆️
builder/vsphere/driver/vm.go 18.69% <0.00%> (+5.63%) ⬆️
builder/vsphere/driver/folder.go 9.52% <0.00%> (+9.52%) ⬆️
builder/vsphere/driver/network.go 21.27% <0.00%> (+21.27%) ⬆️

@sylviamoss sylviamoss changed the title [WIP] Add new disk to existingDevices list Add new disk to existingDevices list Mar 30, 2021
@@ -60,3 +60,46 @@ func TestVirtualMachineDriver_Configure(t *testing.T) {
t.Fatalf("Configure should fail")
}
}

func TestVirtualMachineDriver_CreateVM(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't able to test this with a real environment yet but this test, which uses a simulator, fails for the same reported issue without the changes from this PR. With the changes, it starts passing 👍🏼

Copy link
Contributor Author

@sylviamoss sylviamoss Mar 30, 2021

Choose a reason for hiding this comment

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

Before the change:

=== RUN   TestVirtualMachineDriver_CreateVM
    vm_test.go:103: unexpected error *types.InvalidDeviceSpec
--- FAIL: TestVirtualMachineDriver_CreateVM (0.04s)

After the change:

=== RUN   TestVirtualMachineDriver_CreateVM
--- PASS: TestVirtualMachineDriver_CreateVM (0.04s)

@sylviamoss sylviamoss marked this pull request as ready for review March 30, 2021 15:46
@sylviamoss sylviamoss requested a review from a team as a code owner March 30, 2021 15:46
Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

LGTM

@nywilken nywilken merged commit 349a300 into master Mar 30, 2021
@nywilken nywilken deleted the fix_10430 branch March 30, 2021 18:48
@ghost
Copy link

ghost commented Apr 30, 2021

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vsphere-iso: error creating vm: Invalid configuration for device '2'.
2 participants