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

operator: make CephBlockPoolRadosNamespace and CephFilesystemSubVolumeGroup get outputs more verbose #14049

Merged
merged 1 commit into from Apr 16, 2024

Conversation

NymanRobin
Copy link
Contributor

@NymanRobin NymanRobin commented Apr 9, 2024

The following printcolumns were added

CephBlockPoolRadosNamespace: Phase, BlockPool, Age
CephFilesystemSubVolumeGroup: Filesystem, Quota, Pinning

Related to issue: #13775

@NymanRobin
Copy link
Contributor Author

Did assume that Distributed was the default based on PinCephFSSubVolumeGroup function, with this information I also did slight change to validatePinningValues as they were a bit contradicting, let me know in case there was some misunderstanding here on my part. Other than that I was not exactly sure if pinningType, pinningConfig or pinningSetting would best describe the field.

Copy link
Member

@travisn travisn left a comment

Choose a reason for hiding this comment

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

just some small questions and naming suggestions

deploy/charts/rook-ceph/templates/resources.yaml Outdated Show resolved Hide resolved
deploy/charts/rook-ceph/templates/resources.yaml Outdated Show resolved Hide resolved
deploy/charts/rook-ceph/templates/resources.yaml Outdated Show resolved Hide resolved
deploy/examples/operator.yaml Outdated Show resolved Hide resolved
pkg/daemon/ceph/client/subvolumegroup.go Outdated Show resolved Hide resolved
if !(*pinning.Distributed == 1) && !(*pinning.Distributed == 0) {
err = errors.Errorf("validate pinning type failed, Distributed: unknown value %d", *pinning.Distributed)
if *pinning.Distributed != 0 && *pinning.Distributed != 1 {
return fmt.Errorf("validate pinning type failed, Distributed: value must be 0 or 1, got %d", *pinning.Distributed)
Copy link
Member

Choose a reason for hiding this comment

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

The changes look equivalent to me in this method. @parth-gr Any concerns?

Copy link
Member

@parth-gr parth-gr Apr 12, 2024

Choose a reason for hiding this comment

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

I think no need for the change unless it improves anything,

And with the updated change,
we look for this only if the config is correct, but this is the first priority to be check.

	if numNils > 1 {
		return fmt.Errorf("only one can be set")
	}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I see so earlier returning is disabled by choice as this error should have priority makes sense, thanks for explanation @parth-gr! Okay, then I will just adjust the error message that has the 1.1 instead of 1.0

pkg/operator/ceph/file/subvolumegroup/controller.go Outdated Show resolved Hide resolved
Copy link

mergify bot commented Apr 10, 2024

This pull request has merge conflicts that must be resolved before it can be merged. @NymanRobin please rebase it. https://rook.io/docs/rook/latest/Contributing/development-flow/#updating-your-fork

@NymanRobin
Copy link
Contributor Author

Thanks for the comments @travisn was a bit unsure how to name the pinning field but let's go with just pinning :)

pkg/apis/ceph.rook.io/v1/types.go Outdated Show resolved Hide resolved
pkg/daemon/ceph/client/subvolumegroup.go Outdated Show resolved Hide resolved
pkg/operator/ceph/file/subvolumegroup/controller.go Outdated Show resolved Hide resolved
@NymanRobin NymanRobin force-pushed the crd-output-enhancements branch 3 times, most recently from ace1384 to aed6a1f Compare April 15, 2024 09:49
The following printcolumns were added

CephBlockPoolRadosNamespace: Phase,
BlockPoolName, Age
CephFilesystemSubVolumeGroup: Phase,
FilesystemName, PinningConfig, Age

Also improved the error messages in
SubVolumeGroupClient

Signed-off-by: NymanRobin <nyman.robin@gmail.com>
Copy link
Member

@parth-gr parth-gr left a comment

Choose a reason for hiding this comment

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

lgtm

@travisn travisn merged commit 61332ca into rook:master Apr 16, 2024
52 of 53 checks passed
travisn added a commit that referenced this pull request Apr 17, 2024
operator: make CephBlockPoolRadosNamespace and CephFilesystemSubVolumeGroup get outputs more verbose (backport #14049)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants