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

[Core]: Logs are getting duplicated #62

Closed
anurag-rajawat opened this issue Feb 14, 2024 · 0 comments · Fixed by #56
Closed

[Core]: Logs are getting duplicated #62

anurag-rajawat opened this issue Feb 14, 2024 · 0 comments · Fixed by #56
Assignees
Labels
bug Something isn't working

Comments

@anurag-rajawat
Copy link
Collaborator

Description

Steps to reproduce

  1. Run nimbus
make run
  1. Apply a sample SI + SIB
kubectl apply -f examples/namespaced/pkg-mgr-exec-si-sib.yaml
  1. See the logs
2024-02-14T22:11:14+05:30       INFO    setup   Starting manager
2024-02-14T22:11:14+05:30       INFO    starting server {"kind": "health probe", "addr": "[::]:8081"}
2024-02-14T22:11:14+05:30       INFO    controller-runtime.metrics      Starting metrics server
2024-02-14T22:11:14+05:30       INFO    controller-runtime.metrics      Serving metrics server  {"bindAddress": ":8080", "secure": false}
2024-02-14T22:11:14+05:30       INFO    Starting EventSource    {"controller": "clustersecurityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "ClusterSecurityIntentBinding", "source": "kind source: *v1.ClusterSecurityIntentBinding"}
2024-02-14T22:11:14+05:30       INFO    Starting EventSource    {"controller": "securityintent", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntent", "source": "kind source: *v1.SecurityIntent"}
2024-02-14T22:11:14+05:30       INFO    Starting Controller     {"controller": "securityintent", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntent"}
2024-02-14T22:11:14+05:30       INFO    Starting EventSource    {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "source": "kind source: *v1.SecurityIntentBinding"}
2024-02-14T22:11:14+05:30       INFO    Starting EventSource    {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "source": "kind source: *v1.NimbusPolicy"}
2024-02-14T22:11:14+05:30       INFO    Starting Controller     {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding"}
2024-02-14T22:11:14+05:30       INFO    Starting EventSource    {"controller": "clustersecurityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "ClusterSecurityIntentBinding", "source": "kind source: *v1.ClusterNimbusPolicy"}
2024-02-14T22:11:14+05:30       INFO    Starting Controller     {"controller": "clustersecurityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "ClusterSecurityIntentBinding"}
2024-02-14T22:11:14+05:30       INFO    Starting workers        {"controller": "securityintent", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntent", "worker count": 1}
2024-02-14T22:11:14+05:30       INFO    Starting workers        {"controller": "clustersecurityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "ClusterSecurityIntentBinding", "worker count": 1}
2024-02-14T22:11:14+05:30       INFO    Starting workers        {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "worker count": 1}
2024-02-14T22:11:15+05:30       INFO    SecurityIntent found    {"controller": "securityintent", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntent", "SecurityIntent": {"name":"pkg-mgr-execution"}, "namespace": "", "name": "pkg-mgr-execution", "reconcileID": "e5c1170e-db26-4e1e-a828-4f0acbf5c29f", "SecurityIntent.Name": "pkg-mgr-execution"}
2024-02-14T22:11:15+05:30       INFO    SecurityIntentBinding found     {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "a5644e7c-d8b6-45cb-9b85-1b05f1f2eb23", "SecurityIntentBinding.Name": "pkg-mgr-execution-binding", "SecurityIntentBinding.Namespace": "default"}
2024-02-14T22:11:15+05:30       INFO    SecurityIntent and SecurityIntentBinding matching started       {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "9091fe05-4b4f-49c1-94e9-d5e720315ae4"}
2024-02-14T22:11:15+05:30       INFO    Matching completed      {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "9091fe05-4b4f-49c1-94e9-d5e720315ae4", "Matched SecurityIntents": ["pkg-mgr-execution"], "Matched SecurityIntentsBindings": ["pkg-mgr-execution-binding"]}
2024-02-14T22:11:15+05:30       INFO    Building NimbusPolicy   {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "9091fe05-4b4f-49c1-94e9-d5e720315ae4"}
2024-02-14T22:11:15+05:30       INFO    NimbusPolicy built successfully {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "9091fe05-4b4f-49c1-94e9-d5e720315ae4", "Policy": {"namespace": "default", "name": "pkg-mgr-execution-binding"}}
2024-02-14T22:11:15+05:30       INFO    NimbusPolicy created    {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "9091fe05-4b4f-49c1-94e9-d5e720315ae4", "NimbusPolicy.Name": "pkg-mgr-execution-binding", "NimbusPolicy.Namespace": "default"}
2024-02-14T22:11:15+05:30       INFO    NimbusPolicy created    {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "9091fe05-4b4f-49c1-94e9-d5e720315ae4", "NimbusPolicy.Name": "pkg-mgr-execution-binding", "NimbusPolicy.Namespace": "default"}
2024-02-14T22:11:15+05:30       INFO    SecurityIntent and SecurityIntentBinding matching started       {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "a2411ff1-9788-4150-901d-bc12e45414d3"}
2024-02-14T22:11:15+05:30       INFO    Matching completed      {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "a2411ff1-9788-4150-901d-bc12e45414d3", "Matched SecurityIntents": ["pkg-mgr-execution"], "Matched SecurityIntentsBindings": ["pkg-mgr-execution-binding"]}
2024-02-14T22:11:15+05:30       INFO    Building NimbusPolicy   {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "a2411ff1-9788-4150-901d-bc12e45414d3"}
2024-02-14T22:11:15+05:30       INFO    NimbusPolicy built successfully {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "a2411ff1-9788-4150-901d-bc12e45414d3", "Policy": {"namespace": "default", "name": "pkg-mgr-execution-binding"}}
2024-02-14T22:11:15+05:30       INFO    NimbusPolicy created    {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "a2411ff1-9788-4150-901d-bc12e45414d3", "NimbusPolicy.Name": "pkg-mgr-execution-binding", "NimbusPolicy.Namespace": "default"}
2024-02-14T22:11:15+05:30       INFO    SecurityIntent and SecurityIntentBinding matching started       {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "925c98ce-5c1e-46b3-9e4d-adb41fbed826"}
2024-02-14T22:11:15+05:30       INFO    Matching completed      {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "925c98ce-5c1e-46b3-9e4d-adb41fbed826", "Matched SecurityIntents": ["pkg-mgr-execution"], "Matched SecurityIntentsBindings": ["pkg-mgr-execution-binding"]}
2024-02-14T22:11:15+05:30       INFO    Building NimbusPolicy   {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "925c98ce-5c1e-46b3-9e4d-adb41fbed826"}
2024-02-14T22:11:15+05:30       INFO    NimbusPolicy built successfully {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "925c98ce-5c1e-46b3-9e4d-adb41fbed826", "Policy": {"namespace": "default", "name": "pkg-mgr-execution-binding"}}
2024-02-14T22:11:15+05:30       INFO    NimbusPolicy created    {"controller": "securityintentbinding", "controllerGroup": "intent.security.nimbus.com", "controllerKind": "SecurityIntentBinding", "SecurityIntentBinding": {"name":"pkg-mgr-execution-binding","namespace":"default"}, "namespace": "default", "name": "pkg-mgr-execution-binding", "reconcileID": "925c98ce-5c1e-46b3-9e4d-adb41fbed826", "NimbusPolicy.Name": "pkg-mgr-execution-binding", "NimbusPolicy.Namespace": "default"}

As we can see in above logs that we're getting duplicated entries for NimbusPolicy created and then SecurityIntent and SecurityIntentBinding matching started and the same chain logs are getting duplicated.

Expected behaviour

Nimbus should not log duplicate entries.

@anurag-rajawat anurag-rajawat added the bug Something isn't working label Feb 14, 2024
@anurag-rajawat anurag-rajawat moved this to 🏗 In progress in NIMBUS Feb 14, 2024
@anurag-rajawat anurag-rajawat moved this from 🏗 In progress to 👀 In review in NIMBUS Feb 16, 2024
@anurag-rajawat anurag-rajawat moved this from 👀 In review to 🏗 In progress in NIMBUS Feb 16, 2024
@nandhued nandhued linked a pull request Feb 19, 2024 that will close this issue
7 tasks
@nandhued nandhued moved this from 🏗 In progress to 👀 In review in NIMBUS Feb 19, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in NIMBUS Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants