Skip to content

OSASINFRA-3179: openstack failureDomain: Add RootVolume type#1496

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
shiftstack:openstack_volume_type
Jun 20, 2023
Merged

OSASINFRA-3179: openstack failureDomain: Add RootVolume type#1496
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
shiftstack:openstack_volume_type

Conversation

@pierreprinetti
Copy link
Member

The volumeType is as of OpenStack v17 the canonical way to distribute storage in separate failure domains. This change introduces the ability to set a variable volume type for the Control plane instances.

/cc mandre emilienm

@openshift-ci openshift-ci bot requested review from EmilienM and mandre June 15, 2023 09:49
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 15, 2023

Hello @pierreprinetti! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 15, 2023
@EmilienM
Copy link
Member

Nice addition, thanks. Could you add a test to the testsuite among rootVolume.availabilityZone maybe? Thanks

@pierreprinetti pierreprinetti force-pushed the openstack_volume_type branch from 502c252 to 1cb3e26 Compare June 15, 2023 13:21
@openshift-ci openshift-ci bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 15, 2023
@EmilienM
Copy link
Member

/lgtm

Thanks Pierre for this addition. I liked the validations & the tests.
This should cover our needs for 4.14.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 15, 2023
// +kubebuilder:validation:MaxLength=255
// +kubebuilder:validation:Pattern=`^[^ ]*$`
// +optional
VolumeType string `json:"volumeType,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

@pierreprinetti pierreprinetti changed the title openstack failureDomain: Add RootVolume type OSASINFRA-3179: openstack failureDomain: Add RootVolume type Jun 15, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 15, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 15, 2023

@pierreprinetti: This pull request references OSASINFRA-3179 which is a valid jira issue.

Details

In response to this:

The volumeType is as of OpenStack v17 the canonical way to distribute storage in separate failure domains. This change introduces the ability to set a variable volume type for the Control plane instances.

/cc mandre emilienm

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.

@pierreprinetti
Copy link
Member Author

/assign JoelSpeed

Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

Couple of documentation nits, but otherwise LGTM

// The maximum length of a volume type name is 255 as per the OpenStack limit.
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=255
// +kubebuilder:validation:Pattern=`^[^ ]*$`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain this validation in prose within the godoc please?
Can you possibly also provide examples of valid types that a user might put in there?

Copy link
Member Author

@pierreprinetti pierreprinetti Jun 19, 2023

Choose a reason for hiding this comment

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

Volume types with a space are apparently legit however the handling of those starting with a space appears to be buggy (actually it was me being buggy). I am updating the regex accordingly.

EDIT: I am removing the white space restrictions, as they are allowed in any position within the volume type name.

@pierreprinetti pierreprinetti force-pushed the openstack_volume_type branch from 1cb3e26 to c3af31f Compare June 19, 2023 10:48
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 19, 2023
@pierreprinetti pierreprinetti force-pushed the openstack_volume_type branch 2 times, most recently from bb0f158 to f5676c6 Compare June 19, 2023 11:51
@pierreprinetti
Copy link
Member Author

/hold
Removing the regex from the volumeType as spaces are allowed in the name.

@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 Jun 20, 2023
The volumeType is as of OpenStack v17 the canonical way to distribute
storage in separate failure domains. This change introduces the ability
to set a variable volume type for the Control plane instances.
@pierreprinetti pierreprinetti force-pushed the openstack_volume_type branch from f5676c6 to 5ca5168 Compare June 20, 2023 08:02
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 20, 2023

@pierreprinetti: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@pierreprinetti
Copy link
Member Author

/hold cancel
This should be ready for another pass!

@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 Jun 20, 2023
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=255
// +optional
VolumeType string `json:"volumeType,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there definitely no character limitations on this? Are there any examples of valid volume types we can include in the godoc to give the user an idea of a correct value?

Copy link
Member Author

Choose a reason for hiding this comment

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

There are no documented character limitations. Volume types are typically created by the OpenStack infrastructure administrators, and we are a tenant payload. This means that in practice, OpenShift administrators put here ready-made volume types that their OpenStack administrators make available to them.

For instance, as an admin of my cloud I just did this:

 $ openstack volume type create '432,+?^%$_ ù\f ~`helluva name'
+-------------+--------------------------------------+
| Field       | Value                                |
+-------------+--------------------------------------+
| description | None                                 |
| id          | ab3c8647-1bca-4ab8-89dd-f1ce1453ec3e |
| is_public   | True                                 |
| name        | 432,+?^%$_ ù\f ~`helluva name        |
+-------------+--------------------------------------+

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, in that case I guess there's not a lot we can do

@JoelSpeed
Copy link
Contributor

Are we expecting any further changes? Has this been tested at all to give us confidence in the API? I have no further feedback given we've gone through and established there's no patterns etc that can be applied

@pierreprinetti
Copy link
Member Author

pierreprinetti commented Jun 20, 2023

I don't expect any further changes on this. As for the pattern, I have slavishly followed the OpenStack ProviderSpec nomenclature.

Tests will happen in the CPMS PR. Do you want to defer merging until that PR is ready?

@JoelSpeed
Copy link
Contributor

No, I think in this case it's fine, I know that PR is pretty much ready to go
/lgtm

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

openshift-ci bot commented Jun 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: EmilienM, JoelSpeed, pierreprinetti

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

The pull request process is described here

Details 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 Jun 20, 2023
@openshift-merge-robot openshift-merge-robot merged commit b2e6ab3 into openshift:master Jun 20, 2023
@pierreprinetti pierreprinetti deleted the openstack_volume_type branch June 20, 2023 13:38
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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants