-
Notifications
You must be signed in to change notification settings - Fork 79
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
Switch to structured logging #360
Switch to structured logging #360
Conversation
Hi @pinikomarov. Thanks for your PR. I'm waiting for a openstack-k8s-operators member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
Build failed (check pipeline). For information on how to proceed, see https://review.rdoproject.org/zuul/buildset/ce7e0b7e00054ef4ad9ebf6dea35a88f ❌ openstack-operator-content-provider FAILURE in 12m 22s |
Build failed (check pipeline). For information on how to proceed, see https://review.rdoproject.org/zuul/buildset/61cf3b954f6f49a2b3f1445103c62749 ❌ openstack-operator-content-provider FAILURE in 5m 38s |
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
524e7a7
to
95a9728
Compare
Build failed (check pipeline). For information on how to proceed, see https://review.rdoproject.org/zuul/buildset/1a8775bb9d5d487b91c2cb956c376f6a ❌ openstack-operator-content-provider RETRY_LIMIT in 2m 47s |
Hi @gibizer, can you take a look ? I'm running this on titan88 using install yamls with the patch I'm getting :
any ideas why this would break ? |
OH nevermind , K I got it -: import cycle not allowed: import stack: [github.com/openstack-k8s-operators/openstack-operator github.com/openstack-k8s-operators/openstack-operator/controllers/core github.com/openstack-k8s-operators/openstack-operator/pkg/openstack github.com/openstack-k8s-operators/openstack-operator/controllers/core] so it's denying import of the for the owned resources I guessing .. |
Build failed (check pipeline). For information on how to proceed, see https://review.rdoproject.org/zuul/buildset/b157b69d3d6340ef9dc46ea6ac659d00 ❌ openstack-operator-content-provider FAILURE in 6m 18s |
8a9a6e7
to
97f7532
Compare
Build failed (check pipeline). For information on how to proceed, see https://review.rdoproject.org/zuul/buildset/e95938ec99334f7893d329c4fd026f6d ✔️ openstack-operator-content-provider SUCCESS in 1h 09m 33s |
It seems openstack-operator uses a different log format compared to keystone-operator.
openstack-operator:
I guess the difference is in the logger setup: Lines 111 to 122 in 5066704
The dev mode difference is added in 6435a06 But that commit does not have much reasoning why we are disabled dev mode by default. Maybe @fao89 or @abays knows more. |
I didn't have a special reason for setting it to |
97f7532
to
54e05d1
Compare
/ok-to-test |
Build failed (check pipeline). For information on how to proceed, see https://review.rdoproject.org/zuul/buildset/fbb087b896f348a1b40c9c894fa3a4e5 ✔️ openstack-operator-content-provider SUCCESS in 15m 34s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two small requests inline.
OK. So this is something we might want to decided together and sync in each operator. I don't know the actual implication of the devMode logger versus the non devMode one. Other then that actually log line format it emits. The devMode one is easier for humans to parse, but maybe the devMode:false one is better from machine processing? |
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
dd6d771
to
9956edb
Compare
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
9956edb
to
4ba5c0d
Compare
/retest |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/5de099c338a84439a2f84a968d2688c7 ❌ openstack-k8s-operators-content-provider FAILURE in 6m 45s |
be582bf
to
d7055b4
Compare
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/650e8097373440eaa70edf973e4b8b16 ❌ openstack-k8s-operators-content-provider FAILURE in 6m 44s |
/retest |
d7055b4
to
46df8c0
Compare
/retest |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/d8327199bdde4d67b09eaaf22762ea31 ✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 33m 29s |
recheck |
1 similar comment
recheck |
Build failed (check pipeline). Post https://review.rdoproject.org/zuul/buildset/382d78a88bfa463bb78e9080196f6753 ✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 00m 04s |
This automatically adds additional Log fields like reconcile_id etc.. from the controller context. Follow up from: openstack-k8s-operators/keystone-operator#220 Epic : [OSP-22582](https://issues.redhat.com/browse/OSP-22582) Switch Operators to structured logging before : ```bash {"level":"info","ts":"2023-07-04T10:11:14.655+0300","logger":"controllers.OpenStackControlPlane","msg":"Reconciling Glance","Glance.Namespace":"openstack","Glance.Name":"glance"} ``` after: ```bash 2023-07-04T16:37:17.388+0300 INFO Controllers.OpenstackControlPlane Reconciling Cinder {"controller": "openstackcontrolplane", "controllerGroup": "core.openstack.org", "controllerKind": "OpenStackControlPlane", "OpenStackControlPlane": {"name":"openstack-network-isolation","namespace":"openstack"}, "namespace": "openstack", "name": "openstack-network-isolation", "reconcileID": "4801c762-5a50-4773-849c-c8b19f59841d", "Cinder.Namespace": "openstack", "Cinder.Name": "cinder"} ``` Full logs with before and after log messages for the multiple resources called by this operator: Full Before : http://pastebin.test.redhat.com/1104088 Full After: http://pastebin.test.redhat.com/1104132 set log dev true for console output fix non needed fmt import update logging usage update logging naming update main.go logging update logging fixup
46df8c0
to
2eec08d
Compare
@gibizer Have your requested changes been satisfied here? |
Yes, this looks OK to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pinikomarov, stuggi 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 |
@pinikomarov: The following test failed, say
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. |
/retest-required |
96a56b8
into
openstack-k8s-operators:main
This automatically adds additional Log fields like reconcile_id etc.. from the controller context.
Follow up from: openstack-k8s-operators/keystone-operator#220
Epic : OSP-22582 Switch Operators to structured logging
before :
after:
set log dev true for console output