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

util: put ParseDiskSpec func to util #3484

Merged
merged 3 commits into from
May 31, 2023
Merged

Conversation

HuijingHei
Copy link
Member

@HuijingHei HuijingHei commented May 22, 2023

Refer to @jlebon's suggestion, see #3477 (comment)

@openshift-ci
Copy link

openshift-ci bot commented May 22, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

mantle/util/common.go Outdated Show resolved Hide resolved
mantle/util/common.go Show resolved Hide resolved
@HuijingHei HuijingHei force-pushed the util-parsedisk branch 6 times, most recently from b2a4002 to e853e0e Compare May 29, 2023 00:18
mantle/util/common.go Outdated Show resolved Hide resolved
mantle/util/common.go Outdated Show resolved Hide resolved
cgwalters
cgwalters previously approved these changes May 30, 2023
Copy link
Member

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just a few nits

mantle/platform/api/gcloud/compute.go Outdated Show resolved Hide resolved
@@ -54,7 +54,7 @@ func testMountDisks(c cluster.TestCluster) {
config := setupIgnitionConfig()

options := platform.MachineOptions{
AdditionalDisks: []string{"1024M", "1024M"},
AdditionalDisks: []string{"1G", "1G"},
Copy link
Member

Choose a reason for hiding this comment

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

Hmm tricky...if we were supporting the M specifier before it may be safer to continue doing so.

It looks like all of the external tests use G though.

Copy link
Member Author

Choose a reason for hiding this comment

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

That would be better, but we intend to get size as int (trim sufix G) in the ParseDiskSpec func:

  • for qemu, need to re-add G as it needs string to be passed to qemu-img
  • for gcp and other cloud, need int, as the default is size in G

WDYT?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, it seems a bit hard to do without re-implementing the suffix parsing here entirely which would be unfortunate.

I think this is OK as is!

mantle/platform/qemu.go Outdated Show resolved Hide resolved
mantle/platform/qemu.go Outdated Show resolved Hide resolved
@cgwalters cgwalters merged commit 6f0ed42 into coreos:main May 31, 2023
2 checks passed
@HuijingHei HuijingHei deleted the util-parsedisk branch May 31, 2023 13:21
@HuijingHei
Copy link
Member Author

Thanks @cgwalters and @jlebon for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants