Skip to content

Inconsistent logs formats #295

@ikavgo

Description

@ikavgo

Describe the bug

I was debugging my kubernetes installation the other day. I wanted to correlate a resource status that waited on queue with topology operator logs. I noticed that topology operator emits logs in at least two different formats which makes it harder to comprehend and process automatically.

To Reproduce

Just use topology operator I guess.

Expected behavior
All log entries follow the same format.

Screenshots

Screenshot_2022-02-02_09-47-43

Version and environment information

  • Messaging Topology Operator: rabbitmqoperator/messaging-topology-operator:1.2.1
  • RabbitMQ: 🤷‍♂️
  • RabbitMQ Cluster Operator: rabbitmqoperator/cluster-operator:1.10.0
  • Kubernetes: 1.21.2
  • Local kind cluster

Additional context

Text examples:

{"level":"info","ts":1643717737.1284227,"logger":"controller-runtime.manager.controller.policy","msg":"RabbitmqCluster is already gone: cannot find its connection secret","reconciler group":"rabbitmq.com","reconciler kind":"Policy","name":"t.test-gykmeuum.t1-ojnfglwq.bfec80f8648192b525493efd156b5a8ecd6","namespace":"test-gykmeuum","policy":"t.test-gykmeuum.t1-ojnfglwq.bfec80f8648192b525493efd156b5a8ecd6"}
E0201 12:15:37.133237       1 event.go:264] Server rejected event '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"t.test-gykmeuum.t1-ojnfglwq.bfec80f8648192b525493efd156b5a8ecd6.16cfa892b88dc812", GenerateName:"", Namespace:"test-gykmeuum", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), DeletionTimestamp:<nil>, DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"Policy", Namespace:"test-gykmeuum", Name:"t.test-gykmeuum.t1-ojnfglwq.bfec80f8648192b525493efd156b5a8ecd6", UID:"7c133096-4b03-456c-bb02-5ef8f87fec32", APIVersion:"rabbitmq.com/v1beta1", ResourceVersion:"67248", FieldPath:""}, Reason:"SuccessfulDelete", Message:"successfully deleted policy", Source:v1.EventSource{Component:"policy-controller", Host:""}, FirstTimestamp:time.Date(2022, time.February, 1, 12, 15, 37, 128511506, time.Local), LastTimestamp:time.Date(2022, time.February, 1, 12, 15, 37, 128511506, time.Local), Count:1, Type:"Normal", EventTime:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'events "t.test-gykmeuum.t1-ojnfglwq.bfec80f8648192b525493efd156b5a8ecd6.16cfa892b88dc812" is forbidden: unable to create new content in namespace test-gykmeuum because it is being terminated' (will not retry!)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions