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

Configurable Log Level for Agones Controller #1220

Merged
merged 1 commit into from
Dec 16, 2019

Conversation

aLekSer
Copy link
Collaborator

@aLekSer aLekSer commented Dec 9, 2019

Add log level parameter to Helm.

Part of #1218.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: d8e619de-e315-48a4-b17b-f98a2883dcd4

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 99534370-57d0-400b-9051-ff1ed55707b4

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@markmandel markmandel added feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) area/operations Installation, updating, metrics etc kind/feature New features for Agones labels Dec 9, 2019
@@ -103,6 +104,16 @@ func main() {
setupLogging(ctlConf.LogDir, ctlConf.LogSizeLimitMB)
}

logger.WithField("logLevel", ctlConf.LogLevel).Info("Setting LogLevel configuration")
Copy link
Collaborator

Choose a reason for hiding this comment

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

This all looks really good 👍

Copy link
Collaborator Author

@aLekSer aLekSer Dec 10, 2019

Choose a reason for hiding this comment

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

Thanks, we can split that up into two parts. I just scanned through the logging, when nothing happens, no events for new fleets, gameservers, but some messages like syncing, enqueuing appears always.
Need to add log example to the ticket.

@@ -115,7 +115,7 @@ func (c *Controller) Run(workers int, stop <-chan struct{}) error {
return err
}

c.baseLogger.Info("Wait for cache sync")
c.baseLogger.Debug("Wait for cache sync")
Copy link
Collaborator

@markmandel markmandel Dec 9, 2019

Choose a reason for hiding this comment

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

I'm wondering if we want to move the info=>debug logging items to a separate PR?

I'm just wondering if we want to come up with some rules of thumb on what should be info and what should be debug? @pooneh-m @roberthbailey what do you think? I've no idea if there is prior art here?

Just thinking long term, and also for consistency?

Copy link
Member

Choose a reason for hiding this comment

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

Rules of thumb sound good, but we should discuss them in an issue (so they aren't lost in this PR) and document them somewhere.

I've created #1223.

Copy link
Contributor

@pooneh-m pooneh-m Dec 10, 2019

Choose a reason for hiding this comment

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

https://reflectoring.io/logging-levels/ has some suggestions. :) I don't see an easy way of describing logging level other than use your judgement and get a code review for a second opinion. My judgement is if I delete a log would it reduce my confidence that the system is doing what is expected, if so make it Info, otherwise Debug.

@markmandel markmandel removed the feature-freeze-do-not-merge Only eligible to be merged once we are out of feature freeze (next full release) label Dec 12, 2019
@markmandel
Copy link
Collaborator

If we want to push this PR through, happy to take the logLevel configuration options (and fix the linting issues).

If we remove the logging level changes, I can re-review, and likely approve.

@markmandel
Copy link
Collaborator

Couple of other thoughts:

  1. In this PR, should we edit the make install commands to install at the debug/trace logging level? Seems like we would want this as we are developing?
  2. If you set the logging level for the controller, should that also be the default log level for all gameservers as well?

markmandel added a commit to markmandel/agones that referenced this pull request Dec 13, 2019
Conflicts when attempting to update Kubernetes resources is expected and
will happen frequently in Agones.

Currently they are reported as errors, and (a) produce a lot of noise,
and (b) are reported as errors, which can often be seen as potential
issues by end users, as well as red-herring reasons for actual issues.

We may want to wait until googleforgames#1220 is complete before merging.

Will help with issues also raised in googleforgames#1218.
markmandel added a commit to markmandel/agones that referenced this pull request Dec 13, 2019
Conflicts when attempting to update Kubernetes resources is expected and
will happen frequently in Agones.

Currently they are reported as errors, and (a) produce a lot of noise,
and (b) are reported as errors, which can often be seen as potential
issues by end users, as well as red-herring reasons for actual issues.

We may want to wait until googleforgames#1220 is complete before merging.

Will help with issues also raised in googleforgames#1218.
markmandel added a commit to markmandel/agones that referenced this pull request Dec 13, 2019
Conflicts when attempting to update Kubernetes resources is expected and
will happen frequently in Agones.

Currently they are reported as errors, and (a) produce a lot of noise,
and (b) are reported as errors, which can often be seen as potential
issues by end users, as well as red-herring reasons for actual issues.

We may want to wait until googleforgames#1220 is complete before merging.

Will help with issues also raised in googleforgames#1218.
markmandel added a commit that referenced this pull request Dec 13, 2019
Conflicts when attempting to update Kubernetes resources is expected and
will happen frequently in Agones.

Currently they are reported as errors, and (a) produce a lot of noise,
and (b) are reported as errors, which can often be seen as potential
issues by end users, as well as red-herring reasons for actual issues.

We may want to wait until #1220 is complete before merging.

Will help with issues also raised in #1218.
@aLekSer
Copy link
Collaborator Author

aLekSer commented Dec 16, 2019

  1. In this PR, should we edit the make install commands to install at the debug/trace logging level? Seems like we would want this as we are developing?

Yes, I will add this into install make target.

  1. If you set the logging level for the controller, should that also be the default log level for all gameservers as well?

This is a bit more tricky one, I see at as a different PR.

@aLekSer
Copy link
Collaborator Author

aLekSer commented Dec 16, 2019

Moving out log level changes into a separate branch.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 6116020e-a5f2-4bc2-84ae-739bc827feb8

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

Add log level parameter to Helm. Use debug as default level for the
`make install` target.
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 79f29941-7cee-4fe3-998e-8ef3c33e74e1

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1220/head:pr_1220 && git checkout pr_1220
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.3.0-155209f

@aLekSer aLekSer marked this pull request as ready for review December 16, 2019 13:02
@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: dd3be0a4-2c4f-4b3f-adc2-01780a040ba9

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@markmandel
Copy link
Collaborator

Retrying. Looks like a flaky Multi-allocator e2e test.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 4977e6e0-b9cc-4b1b-89ae-a736858c0586

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/1220/head:pr_1220 && git checkout pr_1220
  • helm install ./install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.3.0-a7e199b

Copy link
Collaborator

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

Love it!

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aLekSer, markmandel

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@markmandel markmandel merged commit 05b58df into googleforgames:master Dec 16, 2019
@markmandel markmandel added this to the 1.3.0 milestone Dec 16, 2019
@aLekSer aLekSer deleted the feature/loglevel branch December 17, 2019 09:24
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
Conflicts when attempting to update Kubernetes resources is expected and
will happen frequently in Agones.

Currently they are reported as errors, and (a) produce a lot of noise,
and (b) are reported as errors, which can often be seen as potential
issues by end users, as well as red-herring reasons for actual issues.

We may want to wait until googleforgames#1220 is complete before merging.

Will help with issues also raised in googleforgames#1218.
ilkercelikyilmaz pushed a commit to ilkercelikyilmaz/agones that referenced this pull request Oct 23, 2020
Add log level parameter to Helm. Use debug as default level for the
`make install` target.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/operations Installation, updating, metrics etc kind/feature New features for Agones lgtm size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants