Skip to content

Commit ca945cf

Browse files
authored
Karkunpavan (#4)
* Removing alpha disk from tests. * Changes setup the test to run with hyperdisk extreme. * Updates the disk type back to balanced, as HDX doesn't support multi writer. * Moving over to m1 megamem as thats the only type of machine that can support all needed disk types. * Changes update the tests to use two contexts, one for multiwriter and one for the existing tests. This was deemed necessary as only some disks can support multi-writer, and only some VM shapes can support said disks. * Changes update the tests to use two contexts, one for multiwriter and one for the existing tests. This was deemed necessary as only some disks can support multi-writer, and only some VM shapes can support said disks. * Fixing some git oddness * Fixing some formatting. * More formatting fixes. * Hopefully last changes for formatting. * Fixing linting issue. * Cleaning up un-used / un-needed GetMultiWriter test function.
1 parent 16433ea commit ca945cf

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

pkg/gce-cloud-provider/compute/cloud-disk.go

-13
Original file line numberDiff line numberDiff line change
@@ -213,19 +213,6 @@ func (d *CloudDisk) GetKMSKeyName() string {
213213
return ""
214214
}
215215

216-
func (d *CloudDisk) GetMultiWriter() bool {
217-
switch {
218-
case d.disk != nil:
219-
return false
220-
case d.disk != nil && d.disk.AccessMode == "READ_WRITE_MANY":
221-
return true
222-
case d.betaDisk != nil:
223-
return d.betaDisk.MultiWriter
224-
default:
225-
return false
226-
}
227-
}
228-
229216
func (d *CloudDisk) GetEnableConfidentialCompute() bool {
230217
switch {
231218
case d.disk != nil:

pkg/gce-cloud-provider/compute/fake-gce.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (cloud *FakeCloudProvider) ValidateExistingDisk(ctx context.Context, resp *
213213
}
214214

215215
// We are assuming here that a multiWriter disk could be used as non-multiWriter
216-
if multiWriter && !resp.GetMultiWriter() {
216+
if multiWriter {
217217
return fmt.Errorf("disk already exists with incompatible capability. Need MultiWriter. Got non-MultiWriter")
218218
}
219219

0 commit comments

Comments
 (0)