logging-config should allow the manipulation of a single machine agent

Bug #1711355 reported by Felipe Reyes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Medium
Unassigned

Bug Description

Some environments, due to performance reasons or internal policies, the logging level is set to WARNING, so during troubleshooting it may be necessary to increase the level for a single machine/unit agent. This can be done for unit agents using the following configuration:

juju model-config logging-config="<root>=WARNING;unit=INFO;unit.percona-cluster/0=DEBUG"

But there is no method to set level for a machine agent.

Example of a machine log

$ juju debug-log --replay -i machine-0 | tail -n 4
machine-0: 09:01:56 DEBUG juju.worker.dependency "mgo-txn-resumer" manifold worker stopped: dependency not available
machine-0: 09:01:56 DEBUG juju.worker.dependency "tools-version-checker" manifold worker stopped: dependency not available
machine-0: 09:01:56 DEBUG juju.worker.dependency "serving-info-setter" manifold worker stopped: resource permanently unavailable
machine-0: 09:01:56 DEBUG juju.worker.logger reconfiguring logging from "<root>=DEBUG" to "<root>=WARNING;unit=DEBUG;unit.percona-cluster/0=INFO"

As you can see the machine-0 logs are not prefixed.

Felipe Reyes (freyes)
summary: - logging-config should allow to manipulation of a single machine agent
+ logging-config should allow the manipulation of a single machine agent
Revision history for this message
Tim Penhey (thumper) wrote :

There is a way to set this for a single agent as of 2.2.0, but requires editing the agent.conf file for any agent, and setting the LOGGING_OVERRIDE key in the values map, and restarting the agent.

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Felipe Reyes (freyes) wrote : Re: [Bug 1711355] Re: logging-config should allow the manipulation of a single machine agent

On Fri, Aug 18, 2017 at 02:48:18AM -0000, Tim Penhey wrote:
> There is a way to set this for a single agent as of 2.2.0, but requires
> editing the agent.conf file for any agent, and setting the
> LOGGING_OVERRIDE key in the values map, and restarting the agent.

Is this how the agent.conf should look like?:

[...]
values:
  AGENT_SERVICE_NAME: jujud-machine-0
  CONTAINER_TYPE: ""
  LOGGING_OVERRIDE: <root>=DEBUG
  PROVIDER_TYPE: lxd
mongoversion: "0.0"

If I set it as above in a model where logging-config is:
$ juju model-config logging-config
<root>=INFO;unit=INFO;

On restart I get this:

machine-0: 10:21:05 DEBUG juju.worker.logger initial log config: "<root>=DEBUG"
machine-0: 10:21:05 DEBUG juju.worker.dependency "logging-config-updater" manifold worker started
[...]
machine-0: 10:21:05 DEBUG juju.network addresses after filtering: [local-machine:127.0.0.1 local-cloud:192.168.10.27 local-machine:::1]
machine-0: 10:21:05 INFO juju.worker.machiner setting addresses for "machine-0" to [local-machine:127.0.0.1 local-cloud:192.168.10.27 local-machine:::1]
machine-0: 10:21:05 DEBUG juju.worker.logger reconfiguring logging from "<root>=DEBUG" to "<root>=INFO;unit=INFO;"
machine-0: 10:21:05 INFO juju.tools.lxdclient using LXD API version "1.0"

And no DEBUG level is printed.

Revision history for this message
Tim Penhey (thumper) wrote :

Ah... yes that does look right.

Which agent.conf did you change, and what version of juju are you running?

Revision history for this message
Felipe Reyes (freyes) wrote :

On Tue, Aug 22, 2017 at 02:31:08AM -0000, Tim Penhey wrote:
> Ah... yes that does look right.
>
> Which agent.conf did you change, and what version of juju are you
> running?

juju 2.2.0

and the file is /var/lib/juju/agents/machine-0/agent.conf , this machine-0 is
NOT the controller, it's machine-0 from a managed model.

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 5 years, so we're marking it Expired. If you believe this is incorrect, please update the status.

Changed in juju:
status: Triaged → Expired
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.