Skip to content

Commit

Permalink
Karkunpavan (#4)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
sjswerdlow authored Jan 22, 2025
1 parent 16433ea commit ca945cf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions pkg/gce-cloud-provider/compute/cloud-disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,6 @@ func (d *CloudDisk) GetKMSKeyName() string {
return ""
}

func (d *CloudDisk) GetMultiWriter() bool {
switch {
case d.disk != nil:
return false
case d.disk != nil && d.disk.AccessMode == "READ_WRITE_MANY":
return true
case d.betaDisk != nil:
return d.betaDisk.MultiWriter
default:
return false
}
}

func (d *CloudDisk) GetEnableConfidentialCompute() bool {
switch {
case d.disk != nil:
Expand Down
2 changes: 1 addition & 1 deletion pkg/gce-cloud-provider/compute/fake-gce.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (cloud *FakeCloudProvider) ValidateExistingDisk(ctx context.Context, resp *
}

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

Expand Down

0 comments on commit ca945cf

Please sign in to comment.