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

fix(helm): Make log verbosity configurable #161

Merged
merged 2 commits into from
Oct 19, 2021

Conversation

ianroberts
Copy link
Contributor

@ianroberts ianroberts commented Oct 10, 2021

Why is this PR required? What issue does it fix?:

At present, when installing via the helm charts a number of containers produce overly-verbose logging, in particular the csi-controller logs a "successfully renewed lease" message every five seconds continuously.

What this PR does?:

Various containers are hard-coded in the Helm chart to run with trace-level logging enabled (--v=5), this PR makes these configurable via the values file/--set. To maintain backwards compatibility the defaults in values.yaml remain at --v=5 (whether this should change is a separate discussion...) but they can now be overridden via

  • csiController.logLevel to change all the CSI controller containers to the same level in one go. If this value is not set then we fall back to per-container settings, all of which default to "5"
    • csiController.attacher.logLevel
    • csiController.provisioner.logLevel
    • csiController.resizer.logLevel
  • csiNode.logLevel as above for the CSI node pod, though there is only one container-specific child value in this case:
    • csiNode.driverRegistrar.logLevel for the node pod driver registrar

Does this PR require any upgrade changes?:

No

If the changes in this PR are manually verified, list down the scenarios covered::

Any additional information for your reviewer? :

Checklist:

  • PR Title follows the convention of <type>(<scope>): <subject>.
  • Has the change log section been updated?
  • Commit has unit tests
  • Commit has integration tests
  • (Optional) Does this PR change require updating Helm Chart? If yes, mention the Helm Chart PR #
  • (Optional) Are upgrade changes included in this PR? If not, mention the issue/PR to track:
  • (Optional) If documentation changes are required, which issue https://github.com/openebs/website is used to track them:

Make log verbosity level configurable via chart values, rather than hard-coding --v=5 (the most verbose level, intended for trace-level logging).  For backwards compatibility the defaults are still set to "5" everywhere, but this can now be overridden via csiController.{attacher|provisioner|resizer}.logLevel for the controller (or csiController.logLevel to set all three at once) and csiNode.driverRegistrar.logLevel for the CSI node.

Signed-off-by: Ian Roberts <i.roberts@dcs.shef.ac.uk>
@ianroberts
Copy link
Contributor Author

Bumped chart version to fix lint failure

Copy link
Contributor

@shubham14bajpai shubham14bajpai left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@prateekpandey14 prateekpandey14 left a comment

Choose a reason for hiding this comment

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

good one @ianroberts , can you pls do the similar changes in cstor-operator helm chart as well

Co-authored-by: Prateek Pandey <prateekpandey14@gmail.com>
@ianroberts
Copy link
Contributor Author

good one @ianroberts , can you pls do the similar changes in cstor-operator helm chart as well

openebs-archive/cstor-operators#397

@prateekpandey14 prateekpandey14 merged commit 021531a into openebs-archive:develop Oct 19, 2021
@ianroberts ianroberts deleted the log-level branch October 27, 2021 09:38
ianroberts added a commit to ianroberts/jiva-operator that referenced this pull request Oct 27, 2021
This is a modification to openebs-archive#161 to reverse the order of the overriding between csiController.logLevel and csiController.<container>.logLevel following discussions on openebs-archive/cstor-operators#397.  Now csiController.logLevel sets a default at the pod level, and csiController.*.logLevel overrides that default for the relevant pod.

Signed-off-by: Ian Roberts <i.roberts@dcs.shef.ac.uk>
mittachaitu pushed a commit that referenced this pull request Nov 25, 2021
This is a modification to #161 to reverse the order of the overriding between csiController.logLevel and csiController.<container>.logLevel following discussions on openebs-archive/cstor-operators#397.  Now csiController.logLevel sets a default at the pod level, and csiController.*.logLevel overrides that default for the relevant pod.

Signed-off-by: Ian Roberts <i.roberts@dcs.shef.ac.uk>
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.

3 participants