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

Add StorageCluster.spec.nfs.LogLevel in storagecluster CR #2953

Merged

Conversation

OdedViner
Copy link
Contributor

@OdedViner OdedViner commented Jan 8, 2025

This PR introduces a new parameter, spec.nfs.LogLevel, to the StorageCluster CR.
The LogLevel parameter allows users to configure the log level for NFS, providing greater flexibility and control over logging behavior.

This enhancement aims to improve the user experience by enabling more precise logging settings for debugging and monitoring purposes.

Additionally, a unit test has been added to verify that the StorageCluster CR exports the Rook NFS CR, ensuring proper integration between the OCS operator CR and the Rook operator CR.

@OdedViner OdedViner force-pushed the logging_level_nfs branch 7 times, most recently from 1a2335a to bc4b05b Compare January 8, 2025 16:25
Copy link
Contributor

@BlaineEXE BlaineEXE left a comment

Choose a reason for hiding this comment

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

I'm assuming the ocs-operator team will be able to double check functionality, but everything looks good to me.

The only suggestions I have are to help document, which I think/hope will be helpful for support engineering. These suggestions are also optional if ocs-op maintainers have differing opinions.

controllers/storagecluster/cephnfs_test.go Outdated Show resolved Hide resolved
Comment on lines 478 to 481
// LogLevel set logging level
// +optional
LogLevel string `json:"logLevel,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Ganesha has some strange and poorly documented log levels. I'd recommend listing them here to help users and support engineers.

At the same time, I would recommend not specifying these as an enum on the CRD spec. I believe there may be more log levels accepted by ganesha than this list, and they could be useful. Just the comment will be best IMO.

Suggested change
// LogLevel set logging level
// +optional
LogLevel string `json:"logLevel,omitempty"`
// LogLevel set logging level
// Log levels: NIV_NULL | NIV_FATAL | NIV_MAJ | NIV_CRIT | NIV_WARN | NIV_EVENT | NIV_INFO | NIV_DEBUG | NIV_MID_DEBUG | NIV_FULL_DEBUG | NB_LOG_LEVEL
// +optional
LogLevel string `json:"logLevel,omitempty"`

Copy link
Member

Choose a reason for hiding this comment

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

+1 to having these documented.
It will act as reference for someone trying to set the value in the CR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@Nikhil-Ladha Nikhil-Ladha left a comment

Choose a reason for hiding this comment

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

Please split the commits into multiple commits where
1st commit would be the code change.
2nd commit would be generated changes.

Also, please make sure to add proper commit,PR description. It's always a good practice to have these added wherever you are contributing.

Comment on lines 478 to 481
// LogLevel set logging level
// +optional
LogLevel string `json:"logLevel,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

+1 to having these documented.
It will act as reference for someone trying to set the value in the CR.

controllers/storagecluster/cephnfs.go Outdated Show resolved Hide resolved
controllers/storagecluster/cephnfs_test.go Outdated Show resolved Hide resolved
controllers/storagecluster/cephnfs_test.go Outdated Show resolved Hide resolved
Copy link
Member

@iamniting iamniting left a comment

Choose a reason for hiding this comment

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

pls seperate the code and generated changes.

controllers/storagecluster/cephnfs.go Outdated Show resolved Hide resolved
@agarwal-mudit
Copy link
Member

/cherry-pick release-4.18

@openshift-cherrypick-robot

@agarwal-mudit: once the present PR merges, I will cherry-pick it on top of release-4.18 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.18

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-sigs/prow repository.

@OdedViner OdedViner force-pushed the logging_level_nfs branch 7 times, most recently from 912192e to df333b2 Compare January 9, 2025 13:27
controllers/storagecluster/cephnfs.go Outdated Show resolved Hide resolved
@OdedViner OdedViner force-pushed the logging_level_nfs branch 5 times, most recently from dcae01f to 240cdd4 Compare January 9, 2025 15:15
Copy link
Member

@Nikhil-Ladha Nikhil-Ladha left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 9, 2025
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 9, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 9, 2025
Copy link
Contributor

openshift-ci bot commented Jan 9, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iamniting, Nikhil-Ladha, OdedViner

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 Jan 9, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 941e9cf into red-hat-storage:main Jan 9, 2025
11 checks passed
@openshift-cherrypick-robot

@agarwal-mudit: new pull request created: #2962

In response to this:

/cherry-pick release-4.18

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-sigs/prow 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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants