-
Notifications
You must be signed in to change notification settings - Fork 71
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
improve logging for cip-auditor #183
Comments
Aside: the e2e tests that we run for the auditing mechanism did not pick this up because those tests grep through logs in the explicitly-named log |
So, I've discovered that I can set the loggers to be more specific about the labels that are attached to them. Upon creation of the loggers, we can set more options as described here https://godoc.org/cloud.google.com/go/logging#Client.Logger. Specifically, we can probably set |
@listx do you think we can change this issue to be |
I'm not sure, mainly because the verification requires some jumping around the GCP console which is something not everyone is familiar with. |
got it |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: Closing this issue. In response to this:
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. |
Notes from initial prod deployment of cip-auditor
On 2020-02-25 3:57PM, @listx executed
./deploy.sh k8s-artifacts-prod 5c9a73a90fdfd08adaf3d53ae863144922958911952dfa67cbf9a0d33dedde63
in order to deploy the cip-auditor Cloud Run service to the k8s-artifacts-prod project for the first time.Shortly thereafter, @thockin pushed up a dummy image to us.gcr.io/k8s-artifacts-prod/suspicious/envelope@sha256:ec3ca3ee90e4dafde96c83232b30f17b5e8992ff35479d0661b8f4ff2f21bf74 in order to test the auditor. The goal was to see at least logs of the auditor detecting a bad change to GCR.
However, the default Cloud Run logs failed to show any meaningful messages:
This was very confusing.
About an hour and a half later, it was discovered that cip-auditor did in fact run and process Pub/Sub messages as intended. However, these log messages did not show up in the Cloud Run instance because their Stackdriver
resource.type
was set toproject
and notcloud_run_revision
, which is what the Cloud Run "Logs" tab picks up by default. The auditor currently prints interesting bits to the log namedprojects/k8s-artifacts-prod/logs/cip-audit-log
, and is not shown currently in the Cloud Run dashboard.We can improve this situation by simply making sure that all logs we write to the
projects/k8s-artifacts-prod/logs/cip-audit-log
log are also written to STDOUT for the cip-auditor process.The text was updated successfully, but these errors were encountered: