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

Bug 1836339: GCP: Enable disk type and size customization #3595

Merged
merged 1 commit into from May 18, 2020

Conversation

rna-afk
Copy link
Contributor

@rna-afk rna-afk commented May 13, 2020

Currently, the installer does not allow the users to customize the
type and size of the disks for the workers and control plane.
Added the option for the user to specify the type and the size of
the disks for both machines in GCP.

The user can specify two types of disks, pd-standard and pd-ssd disks
which are the options that GCP/Terraform provides. pd-standard is not
recommended for control planes and will not be allowed as a value in
the DefaultMachinePlatform and the master compute section.

@rna-afk
Copy link
Contributor Author

rna-afk commented May 13, 2020

/test e2e-gcp

// OSDisk defines the storage for instance.
//
// +optional
OSDisk `json:"OSDisk"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
OSDisk `json:"OSDisk"`
OSDisk `json:"osDisk"`

@abhinavdahiya
Copy link
Contributor

@abhinavdahiya abhinavdahiya added the version/4.6 Tracking changes that should end up in 4.6 release label May 13, 2020
@rna-afk
Copy link
Contributor Author

rna-afk commented May 14, 2020

also make sure https://github.com/openshift/installer/blob/master/docs/dev/explain.md#generating-the-documentation is used to generate the new explain

Nice feature! Added them.

@rna-afk
Copy link
Contributor Author

rna-afk commented May 14, 2020

/test images

@abhinavdahiya abhinavdahiya changed the title GCP: Enable disk type and size customization Bug: 1836339: GCP: Enable disk type and size customization May 15, 2020
@abhinavdahiya abhinavdahiya removed the version/4.6 Tracking changes that should end up in 4.6 release label May 15, 2020
@abhinavdahiya
Copy link
Contributor

/test e2e-gcp

// OSDisk defines the disk for machines on GCP.
type OSDisk struct {
// DiskType defines the type of disk.
// The valid values are <`pd-standard`, `pd-ssd`>
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to keep the list in <>

@@ -17,5 +19,42 @@ func ValidateMachinePool(platform *gcp.Platform, p *gcp.MachinePool, fldPath *fi
}
}

if p.OSDisk.DiskSizeGB < 0 {
allErrs = append(allErrs, field.Invalid(fldPath.Child("diskSizeGB"), p.OSDisk.DiskSizeGB, "Storage DiskSizeGB must be positive"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
allErrs = append(allErrs, field.Invalid(fldPath.Child("diskSizeGB"), p.OSDisk.DiskSizeGB, "Storage DiskSizeGB must be positive"))
allErrs = append(allErrs, field.Invalid(fldPath.Child("diskSizeGB"), p.OSDisk.DiskSizeGB, "must be a positive value"))

@abhinavdahiya abhinavdahiya changed the title Bug: 1836339: GCP: Enable disk type and size customization Bug 1836339: GCP: Enable disk type and size customization May 15, 2020
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels May 15, 2020
@openshift-ci-robot
Copy link
Contributor

@rna-afk: This pull request references Bugzilla bug 1836339, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1836339: GCP: Enable disk type and size customization

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rna-afk rna-afk force-pushed the gcp-disk-types branch 2 times, most recently from c414a6b to ab7d7e2 Compare May 15, 2020 17:29
@abhinavdahiya
Copy link
Contributor

/test e2e-gcp

1 similar comment
@rna-afk
Copy link
Contributor Author

rna-afk commented May 18, 2020

/test e2e-gcp

type OSDisk struct {
// DiskType defines the type of disk.
// The valid values are pd-standard and pd-ssd
// For master nodes, the valid value is pd-ssd.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// For master nodes, the valid value is pd-ssd.
// For control plane nodes, the valid value is pd-ssd.

Comment on lines 109 to 111
if platform != nil {
allErrs = append(allErrs, gcpvalidation.ValidateDefaultDiskType(platform.GCP.DefaultMachinePlatform, f)...)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

i think https://github.com/openshift/installer/pull/3520/files#diff-8722408266807d908915d162b2a30ed9R23 is the better place to validate the platform's default machinepool.

@rna-afk rna-afk force-pushed the gcp-disk-types branch 2 times, most recently from b1e4e4d to bd00c26 Compare May 18, 2020 19:31
},
},
},
valid: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be valid true?

@abhinavdahiya
Copy link
Contributor

/approve

/test e2e-gcp

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 18, 2020
Currently, the installer does not allow the users to customize the
type and size of the disks for the workers and control plane.
Added the option for the user to specify the type and the size of
the disks for both machines in GCP.

The user can specify two types of disks, pd-standard and pd-ssd disks
which are the options that GCP/Terraform provides. pd-standard is not
recommended for control planes and will not be allowed as a value in
the DefaultMachinePlatform and the master compute section.
@abhinavdahiya
Copy link
Contributor

/test e2e-gcp

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented May 18, 2020

@rna-afk: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-ovirt d90c191 link /test e2e-ovirt
ci/prow/e2e-openstack d90c191 link /test e2e-openstack
ci/prow/e2e-aws-scaleup-rhel7 d90c191 link /test e2e-aws-scaleup-rhel7

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 18, 2020
@openshift-merge-robot openshift-merge-robot merged commit f6716ea into openshift:master May 18, 2020
@openshift-ci-robot
Copy link
Contributor

@rna-afk: All pull requests linked via external trackers have merged: openshift/installer#3595. Bugzilla bug 1836339 has been moved to the MODIFIED state.

In response to this:

Bug 1836339: GCP: Enable disk type and size customization

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants