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

CORS-1770: Support pd-balanced disk types for GCP deployments #7337

Merged
merged 1 commit into from Jul 27, 2023

Conversation

marcbrown2024
Copy link
Contributor

Adding support for pd-balanced disk types for the compute nodes by allowing users to provide it in the disk type field under compute in the install config.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 17, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 17, 2023

@marcbrown2024: This pull request references CORS-1770 which is a valid jira issue.

In response to this:

Adding support for pd-balanced disk types for the compute nodes by allowing users to provide it in the disk type field under compute in the install config.

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
Copy link
Contributor

rna-afk commented Jul 17, 2023

You also need to change this

// ValidateMasterDiskType checks that the specified disk type is valid for control plane.
func ValidateMasterDiskType(p *types.MachinePool, fldPath *field.Path) field.ErrorList {
	allErrs := field.ErrorList{}
	if p.Name == "master" && p.Platform.GCP.OSDisk.DiskType == "pd-standard" {
		allErrs = append(allErrs, field.Invalid(fldPath.Child("diskType"), p.Platform.GCP.OSDisk.DiskType, fmt.Sprintf("%s not compatible with control planes.", p.Platform.GCP.OSDisk.DiskType)))
	}
	return allErrs
}

to this

// ValidateMasterDiskType checks that the specified disk type is valid for control plane.
func ValidateMasterDiskType(p *types.MachinePool, fldPath *field.Path) field.ErrorList {
	allErrs := field.ErrorList{}
	if p.Name == "master" {
                diskTypes := sets.NewString( "pd-ssd")
		if !diskTypes.Has(p.Platform.GCP.OSDisk.DiskType) {
			allErrs = append(allErrs, field.NotSupported(fldPath.Child("diskType"), p.Platform.GCP.OSDisk.DiskType, diskTypes.List()))
		}
	}
	return allErrs
}

Let's keep the disk checking uniform by creating the supported list.

@marcbrown2024 marcbrown2024 force-pushed the pd-balanced branch 2 times, most recently from 7f40d4a to 45ed748 Compare July 17, 2023 17:11
@@ -82,7 +83,7 @@ func ValidateDefaultDiskType(p *gcp.MachinePool, fldPath *field.Path) field.Erro
allErrs := field.ErrorList{}

if p != nil && p.OSDisk.DiskType != "" {
diskTypes := sets.NewString("pd-ssd")
diskTypes := sets.NewString("pd-ssd", "pd-balanced")
Copy link
Contributor

Choose a reason for hiding this comment

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

The DefaultMachinePlatform provides a way to set values for both the compute and control plane machinepools. In order to prevent pd-balanced from being used with control-plane machines, you should probably not include this change.

@marcbrown2024
Copy link
Contributor Author

/retest

@@ -48,7 +48,7 @@ func TestValidateMachinePool(t *testing.T) {
DiskType: "pd-",
},
},
expected: `^test-path\.diskType: Unsupported value: "pd-": supported values: "pd-ssd", "pd-standard"$`,
expected: `^test-path\.diskType: Unsupported value: "pd-": supported values: "pd-ssd", "pd-balanced", "pd-standard"$`,
Copy link
Contributor

@rna-afk rna-afk Jul 18, 2023

Choose a reason for hiding this comment

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

Ordering is alphabetical so this needs to be.

Suggested change
expected: `^test-path\.diskType: Unsupported value: "pd-": supported values: "pd-ssd", "pd-balanced", "pd-standard"$`,
expected: `^test-path\.diskType: Unsupported value: "pd-": supported values: "pd-balanced", "pd-ssd", "pd-standard"$`,

@marcbrown2024
Copy link
Contributor Author

/retest

2 similar comments
@jhixson74
Copy link
Member

/retest

@marcbrown2024
Copy link
Contributor Author

/retest

@patrickdillon
Copy link
Contributor

/approve

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 19, 2023

@marcbrown2024: This pull request references CORS-1770 which is a valid jira issue.

In response to this:

Adding support for pd-balanced disk types for the compute nodes by allowing users to provide it in the disk type field under compute in the install config.

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 19, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 19, 2023
@jhixson74
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD de33516 and 2 for PR HEAD 4d29613 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 1e9209a and 1 for PR HEAD 4d29613 in total

@marcbrown2024
Copy link
Contributor Author

/retest

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2023
@rna-afk
Copy link
Contributor

rna-afk commented Jul 20, 2023

We shouldn't have merge commits in a PR. You need to remove c6718fb

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 20, 2023
@marcbrown2024
Copy link
Contributor Author

/retest


if p.Name == "master" && p.Platform.GCP.OSDisk.DiskType == "pd-standard" {
allErrs = append(allErrs, field.Invalid(fldPath.Child("diskType"), p.Platform.GCP.OSDisk.DiskType, fmt.Sprintf("%s not compatible with control planes.", p.Platform.GCP.OSDisk.DiskType)))
if p.Name == "master" {
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
if p.Name == "master" {
if p.Name == "master" && p.Platform.GCP.OSDisk.DiskType != "" {

Copy link
Contributor

@barbacbd barbacbd left a comment

Choose a reason for hiding this comment

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

@marcbrown2024 I am not exactly sure how it happened but code-gen thinks you added pd-ssd rather than pd-balanced and it seems to be complaining about it

@@ -379,6 +379,7 @@ spec:
control plane nodes, the valid value is pd-ssd.
enum:
- pd-ssd
- pd-balanced
Copy link
Contributor

Choose a reason for hiding this comment

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

Put this above pd-ssd. I think it's the ordering.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok

@@ -1142,6 +1143,7 @@ spec:
plane nodes, the valid value is pd-ssd.
enum:
- pd-ssd
- pd-balanced
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

@@ -2570,6 +2572,7 @@ spec:
plane nodes, the valid value is pd-ssd.
enum:
- pd-ssd
- pd-balanced
Copy link
Contributor

Choose a reason for hiding this comment

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

Here too

OCPBUGS-16245: Make nmstateconfig.yaml optional in config-drive
@marcbrown2024
Copy link
Contributor Author

/retest

4 similar comments
@marcbrown2024
Copy link
Contributor Author

/retest

@marcbrown2024
Copy link
Contributor Author

/retest

@marcbrown2024
Copy link
Contributor Author

/retest

@marcbrown2024
Copy link
Contributor Author

/retest

@rna-afk
Copy link
Contributor

rna-afk commented Jul 25, 2023

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 25, 2023
@marcbrown2024
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 8cd8f79 and 2 for PR HEAD badf67c in total

@marcbrown2024
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD b3fc874 and 1 for PR HEAD badf67c in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 26a0d5c and 0 for PR HEAD badf67c in total

@marcbrown2024
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link
Contributor

/hold

Revision badf67c was retested 3 times: holding

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 27, 2023
@rna-afk
Copy link
Contributor

rna-afk commented Jul 27, 2023

/hold cancel
/override ci/prow/okd-scosimages
/skip

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 27, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2023

@rna-afk: /override requires failed status contexts, check run or a prowjob name to operate on.
The following unknown contexts/checkruns were given:

  • ci/prow/okd-scosimages

Only the following failed contexts/checkruns were expected:

  • ci/prow/agent-integration-tests
  • ci/prow/aro-unit
  • ci/prow/e2e-agent-compact-ipv4
  • ci/prow/e2e-agent-compact-ipv4-none-platform
  • ci/prow/e2e-agent-ha-dualstack
  • ci/prow/e2e-agent-sno-ipv4-pxe
  • ci/prow/e2e-agent-sno-ipv6
  • ci/prow/e2e-aws-ovn
  • ci/prow/e2e-gcp-ovn
  • ci/prow/e2e-gcp-ovn-shared-vpc
  • ci/prow/e2e-gcp-ovn-xpn
  • ci/prow/e2e-gcp-secureboot
  • ci/prow/gofmt
  • ci/prow/golint
  • ci/prow/govet
  • ci/prow/images
  • ci/prow/okd-e2e-aws-ovn
  • ci/prow/okd-e2e-aws-ovn-upgrade
  • ci/prow/okd-images
  • ci/prow/okd-scos-e2e-aws-ovn
  • ci/prow/okd-scos-images
  • ci/prow/okd-scos-unit
  • ci/prow/okd-scos-verify-codegen
  • ci/prow/okd-unit
  • ci/prow/okd-verify-codegen
  • ci/prow/shellcheck
  • ci/prow/tf-fmt
  • ci/prow/tf-lint
  • ci/prow/unit
  • ci/prow/verify-codegen
  • ci/prow/verify-vendor
  • ci/prow/yaml-lint
  • pull-ci-openshift-installer-fcos-gofmt
  • pull-ci-openshift-installer-fcos-golint
  • pull-ci-openshift-installer-fcos-govet
  • pull-ci-openshift-installer-fcos-images
  • pull-ci-openshift-installer-fcos-unit
  • pull-ci-openshift-installer-fcos-verify-codegen
  • pull-ci-openshift-installer-fcos-verify-vendor
  • pull-ci-openshift-installer-master-agent-integration-tests
  • pull-ci-openshift-installer-master-aro-unit
  • pull-ci-openshift-installer-master-e2e-agent-compact-ipv4
  • pull-ci-openshift-installer-master-e2e-agent-compact-ipv4-none-platform
  • pull-ci-openshift-installer-master-e2e-agent-ha-dualstack
  • pull-ci-openshift-installer-master-e2e-agent-sno-ipv4-pxe
  • pull-ci-openshift-installer-master-e2e-agent-sno-ipv6
  • pull-ci-openshift-installer-master-e2e-aws-ovn
  • pull-ci-openshift-installer-master-e2e-gcp-ovn
  • pull-ci-openshift-installer-master-e2e-gcp-ovn-shared-vpc
  • pull-ci-openshift-installer-master-e2e-gcp-ovn-xpn
  • pull-ci-openshift-installer-master-e2e-gcp-secureboot
  • pull-ci-openshift-installer-master-okd-e2e-aws-ovn
  • pull-ci-openshift-installer-master-okd-e2e-aws-ovn-upgrade
  • pull-ci-openshift-installer-master-okd-images
  • pull-ci-openshift-installer-master-okd-scos-e2e-aws-ovn
  • pull-ci-openshift-installer-master-okd-scos-images
  • pull-ci-openshift-installer-master-okd-scos-unit
  • pull-ci-openshift-installer-master-okd-scos-verify-codegen
  • pull-ci-openshift-installer-master-okd-unit
  • pull-ci-openshift-installer-master-okd-verify-codegen
  • pull-ci-openshift-installer-master-shellcheck
  • pull-ci-openshift-installer-master-tf-fmt
  • pull-ci-openshift-installer-master-tf-lint
  • pull-ci-openshift-installer-master-yaml-lint
  • tide

If you are trying to override a checkrun that has a space in it, you must put a double quote on the context.

In response to this:

/hold cancel
/override ci/prow/okd-scosimages
/skip

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
Copy link
Contributor

rna-afk commented Jul 27, 2023

/override ci/prow/okd-scos-images

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2023

@rna-afk: Overrode contexts on behalf of rna-afk: ci/prow/okd-scos-images

In response to this:

/override ci/prow/okd-scos-images

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.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 27, 2023

@marcbrown2024: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-agent-ha-dualstack badf67c link false /test e2e-agent-ha-dualstack
ci/prow/okd-e2e-aws-ovn-upgrade badf67c link false /test okd-e2e-aws-ovn-upgrade

Full PR test history. Your PR dashboard.

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.

@openshift-merge-robot openshift-merge-robot merged commit 9dfc08b into openshift:master Jul 27, 2023
33 checks passed
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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. 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

7 participants