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

OCPBUGS-9994: Verbosity levels for operator and operand #111

Merged
merged 3 commits into from Apr 24, 2023

Conversation

swghosh
Copy link
Member

@swghosh swghosh commented Mar 21, 2023

  • New deployment hook for adding --v argument on the basis of operatorSpec.logLevel
  • Update operator log level via --v argument of operator binary

Signed-off-by: Swarup Ghosh swghosh@redhat.com

@openshift-ci-robot openshift-ci-robot added jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Mar 21, 2023
@openshift-ci-robot
Copy link

@swghosh: This pull request references Jira Issue OCPBUGS-9994, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

New deployment hook for adding --v argument on the basis of logLevel in operatorSpec.

Signed-off-by: Swarup Ghosh swghosh@redhat.com

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 openshift-ci bot requested review from sttts and thejasn March 21, 2023 11:07
@swghosh
Copy link
Member Author

swghosh commented Mar 21, 2023

/hold
I'll check out another operator like openshift-apiserver-operator to check if the values for --v is identical for Trace and TraceAll levels.

@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 Mar 21, 2023
@thejasn
Copy link
Contributor

thejasn commented Mar 21, 2023

The bug also mentions operatorLogLevel, are you planning on addressing that in this PR itself?

@swghosh
Copy link
Member Author

swghosh commented Mar 21, 2023

The bug also mentions operatorLogLevel, are you planning on addressing that in this PR itself?

Yes, we can do that too; in a separate commit in the same PR.

@swghosh
Copy link
Member Author

swghosh commented Mar 22, 2023

/remove-hold

I'll check out another operator like openshift-apiserver-operator to check if the values for --v is identical for Trace and TraceAll levels.

Using implementation of OpenShift API server operator resource's logLevel field as reference, the verbosity values corresponding to each logLevel type is same for the one added in this PR.

xref: https://github.com/openshift/library-go/blob/master/pkg/operator/loglevel/util.go#L14-L27

@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 Mar 22, 2023
@swghosh
Copy link
Member Author

swghosh commented Apr 3, 2023

/retest-required

@swghosh swghosh changed the title OCPBUGS-9994: Add logLevel hook for setting --v of operands OCPBUGS-9994: Verbosity levels for operator and operand Apr 3, 2023
@openshift-ci-robot
Copy link

@swghosh: This pull request references Jira Issue OCPBUGS-9994, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

  • New deployment hook for adding --v argument on the basis of operatorSpec.logLevel.
  • Added a func in default_cert_manager_controller to set klog verbosity level at runtime via operatorSpec.operatorLogLevel

Signed-off-by: Swarup Ghosh swghosh@redhat.com

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

@swghosh: This pull request references Jira Issue OCPBUGS-9994, which is invalid:

  • expected the bug to target the "4.14.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

  • New deployment hook for adding --v argument on the basis of operatorSpec.logLevel
  • Added a func in default_cert_manager_controller to set klog verbosity level at runtime via operatorSpec.operatorLogLevel

Signed-off-by: Swarup Ghosh swghosh@redhat.com

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.

@swghosh
Copy link
Member Author

swghosh commented Apr 3, 2023

/test all

@swghosh swghosh force-pushed the ocpbugs-9994 branch 3 times, most recently from f533181 to a1f35ea Compare April 3, 2023 19:06
@swghosh
Copy link
Member Author

swghosh commented Apr 4, 2023

/cc @xingxingxia @TrilokGeer

@thejasn
Copy link
Contributor

thejasn commented Apr 12, 2023

/assign

Copy link
Contributor

@thejasn thejasn left a comment

Choose a reason for hiding this comment

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

Can you add sample logs of before and after for both the operand and operator? Based on this I want to decide if we want to support operatorLogLevel (via the operator spec) at all.

Since the operator already has

pflag.CommandLine.AddGoFlagSet(goflag.CommandLine)
, Is this functional? If yes we should be able to control log level via env variables which can be updated via the subscription.

Assuming the above flow works, I think we can choose not to support the operator logLevel via the cluster scoped resource.

@TrilokGeer
Copy link
Contributor

/jira refresh

1 similar comment
@swghosh
Copy link
Member Author

swghosh commented Apr 19, 2023

/jira refresh

@openshift-ci-robot
Copy link

@swghosh: An error was encountered querying GitHub for users with public email (xxia@redhat.com) for bug OCPBUGS-9994 on the Jira server at https://issues.redhat.com/. No known errors were detected, please see the full error message for details.

Full error message. Post "http://ghproxy/graphql": dial tcp 172.30.229.2:80: connect: connection refused

Please contact an administrator to resolve this issue, then request a bug refresh with /jira refresh.

In response to this:

/jira refresh

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.

@swghosh
Copy link
Member Author

swghosh commented Apr 19, 2023

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Apr 19, 2023
@openshift-ci-robot
Copy link

@swghosh: This pull request references Jira Issue OCPBUGS-9994, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.14.0) matches configured target version for branch (4.14.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @xingxingxia

In response to this:

/jira refresh

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.

@xingxingxia
Copy link
Contributor

This hasn't yet Dev /lgtm label before labeling qe-approved. But anyway, labeling it; would like to do post-merge test since other work (including OCP Auth) items need me :)
/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Apr 23, 2023
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 23, 2023
Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
--v, --vmodule

Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
to ensure operator log level is Normal by default
and would also allow to override the OPERATOR_LOG_LEVEL from subscription object
to enforce a custom log level set by the user

Signed-off-by: Swarup Ghosh <swghosh@redhat.com>
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 24, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 24, 2023

@swghosh: all tests passed!

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.

@swghosh
Copy link
Member Author

swghosh commented Apr 24, 2023

/cc @xenolinux
for docs-approved label
/cc @davemulford
for px-approved label

@xenolinux
Copy link

/label docs-approved

@openshift-ci openshift-ci bot added the docs-approved Signifies that Docs has signed off on this PR label Apr 24, 2023
@thejasn
Copy link
Contributor

thejasn commented Apr 24, 2023

/lgtm

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

openshift-ci bot commented Apr 24, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: swghosh, thejasn

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 Apr 24, 2023
@davemulford
Copy link

/label px-approved

@openshift-ci openshift-ci bot added the px-approved Signifies that Product Support has signed off on this PR label Apr 24, 2023
@openshift-ci openshift-ci bot merged commit 4ad4d5d into openshift:master Apr 24, 2023
7 checks passed
@openshift-ci-robot
Copy link

@swghosh: Jira Issue OCPBUGS-9994: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-9994 has been moved to the MODIFIED state.

In response to this:

  • New deployment hook for adding --v argument on the basis of operatorSpec.logLevel
  • Update operator log level via --v argument of operator binary

Signed-off-by: Swarup Ghosh swghosh@redhat.com

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.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. docs-approved Signifies that Docs has signed off on this PR jira/severity-moderate Referenced Jira bug's severity is moderate for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. 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. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants