Skip to content

Conversation

@zherman0
Copy link
Member

@zherman0 zherman0 commented Jun 28, 2019

This changes the capnslog values to accepted klog log level values. I have just converted them as best I can but we might want to re-evaluate what each maps to.

CONSOLE-1523

@openshift-ci-robot openshift-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 28, 2019
@zherman0
Copy link
Member Author

/assign @jhadvig

@zherman0
Copy link
Member Author

/hold
hold until Console openshift/console#1862 merges

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 28, 2019
@zherman0
Copy link
Member Author

/retest

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 1, 2019
@benjaminapetersen
Copy link
Contributor

@zherman0 this one has sat for a bit, finally getting the open PRs list down enough to take a look. Is there a matching console PR? I assume both need to change at more or less the same time. Or does the console have some logic to ensure we don't get in a bad state due to flag mismatch?

@benjaminapetersen
Copy link
Contributor

Button click misfire :)

@zherman0
Copy link
Member Author

@benjaminapetersen @spadgett - There is a a corresponding console PR: openshift/console#1862
Currently, the changes I made required importing api machinery (I think) which makes it a XXL change and Sam was not sure he wanted all that extra weight, so we put it in hold.
There might be a way to re-write the klog stuff on the console side to not use the specific library but I am not sure we want to do that. Any thoughts if we should close these for now?

@benjaminapetersen
Copy link
Contributor

@zherman0 so the klog go.mod file is small:

module k8s.io/klog/v2

go 1.12

require github.com/go-logr/logr v0.1.0

Curious, do you need the kubernetes component base?

I'm guessing thats why the PR blew up.

@benjaminapetersen
Copy link
Contributor

So as a control, if I run console-operator as ManagementState: Unmanaged, so that I can pass either TRACE or -v=4 (either alternative to the log level flag) I will see a CrashLoopBackoff:

Screen Shot 2019-12-02 at 12 17 08 PM

The e2e tests pass here likely because we don't actually check that pods are all happy.

Copy link
Contributor

@benjaminapetersen benjaminapetersen left a comment

Choose a reason for hiding this comment

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

Hasn't quite got the correct flags yet.

@zherman0
Copy link
Member Author

zherman0 commented Dec 5, 2019

Copy link
Contributor

@benjaminapetersen benjaminapetersen left a comment

Choose a reason for hiding this comment

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

Need the correct flag here.

switch logLevel {
case operatorv1.Normal:
flag = "--log-level=*=NOTICE"
flag = "--log-level=2"
Copy link
Contributor

Choose a reason for hiding this comment

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

These are still

--log-level=2

But we need to update to

-v=2

Wrong flag.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am leaving this like this for now since console can handle the old values. We will get console portion merged first and then update this. I will update the code but I want to make sure this does not get merged.

Copy link
Contributor

@benjaminapetersen benjaminapetersen Dec 9, 2019

Choose a reason for hiding this comment

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

This PR won't merge until the -v flag is updated, so you should be safe. Definitely free to do whatever locally, but I would prob push the correct code up for the open PR.

flag := ""
// Since the console-operator logging has different logging levels then the capnslog,
// that we use for console server(bridge) we need to map them to each other
// console server(bridge) expects flag log-level
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment can go away, it will no longer expect log-level after these merge.

@zherman0
Copy link
Member Author

/retest

@jhadvig
Copy link
Member

jhadvig commented May 11, 2020

/retest

@jhadvig
Copy link
Member

jhadvig commented May 12, 2020

/test e2e-aws-operator

@openshift-ci-robot
Copy link
Contributor

@zherman0: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-upgrade 8646869 link /test e2e-aws-upgrade
ci/prow/e2e-aws-operator 613da74 link /test e2e-aws-operator
ci/prow/e2e-upgrade 613da74 link /test e2e-upgrade

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.

Copy link
Member

@jhadvig jhadvig left a comment

Choose a reason for hiding this comment

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

Aligning to the values that we are using in the Console's Switch to klog PR

case operatorv1.Trace:
flag = "-v=4"
case operatorv1.TraceAll:
flag = "-v=5"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
flag = "-v=5"
flag = "-v=10"

flag = "--log-level=*=DEBUG"
case operatorv1.Trace, operatorv1.TraceAll:
flag = "--log-level=*=TRACE"
flag = "-v=3"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
flag = "-v=3"
flag = "-v=4"

flag = "--log-level=*=TRACE"
flag = "-v=3"
case operatorv1.Trace:
flag = "-v=4"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
flag = "-v=4"
flag = "-v=6"

@jhadvig
Copy link
Member

jhadvig commented Oct 20, 2020

/retest

@spadgett spadgett changed the title Change log level values to use klog types CONSOLE-1523: Change log level values to use klog types Oct 20, 2020
@spadgett
Copy link
Member

/assign @yapei @ahardin-rh @sferich888
for QE / docs / CEE approval

This is ready to test. @jhadvig @zherman0 I assume this should be tested with openshift/console#1862 together using cluster-bot?

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 20, 2020
@jhadvig
Copy link
Member

jhadvig commented Oct 20, 2020

@spadgett was successfully able to launch a cluster using cluster with combination of both PRs.
launch openshift/console-operator#250,openshift/console#1862

Checked if the --v=2 flag was present in the console deployment
Screenshot 2020-10-20 at 17 56 20

Also check the console pod if it's running:
Screenshot 2020-10-20 at 17 57 43

@yapei
Copy link
Contributor

yapei commented Oct 21, 2020

/label qe-approved

@openshift-ci-robot
Copy link
Contributor

@yapei: The label(s) qe-approved cannot be applied, because the repository doesn't have them

Details

In response to this:

/label qe-approved

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.

@yapei
Copy link
Contributor

yapei commented Oct 21, 2020

Launched cluster launch openshift/console-operator#250,openshift/console#1862 and tested following the steps in test case. The changes look good to me

@yapei
Copy link
Contributor

yapei commented Oct 21, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 21, 2020
@sferich888
Copy link

@ahardin-rh do we have a corresponding docs PR to link this to? That shows users how to manipulate this?
I don't seen any docs related work trackers linked from https://issues.redhat.com/browse/CONSOLE-1523 and I want to make sure we don't miss documenting a that this change (possibly in release notes) and how it can be manipulated.

@openshift-merge-robot
Copy link
Contributor

openshift-merge-robot commented Oct 23, 2020

@zherman0: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-upgrade cbfb761 link /test e2e-upgrade

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.

@jhadvig
Copy link
Member

jhadvig commented Oct 27, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 27, 2020
@jhadvig
Copy link
Member

jhadvig commented Oct 27, 2020

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, spadgett, yapei, zherman0

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

@jhadvig
Copy link
Member

jhadvig commented Oct 27, 2020

@ahardin-rh could you please respond to #250 (comment) . Thanks ! :)

@openshift-merge-robot openshift-merge-robot merged commit 54699a7 into openshift:master Oct 27, 2020
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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants