Hide Forgot
Description of problem: - After changing the logging level in the agent.conf file, still, the goferd service captures the INFO messages to the logs. Version-Release number of selected component (if applicable): - Red Hat Satellite v 6.2.4 - gofer-2.7.6-1.el7sat.noarch How reproducible: - Always Steps to Reproduce: -> Register a client to Satellite 6.2 server and install the katello-agent on it. -> Edit the "/etc/gofer/agent.conf" file and change the logging level to "error". -> Restart the goferd service. Actual results: - Goferd service is still capturing the INFO logs. Expected results: - Goferd service should only log the ERROR messages. Additional info: ------ # grep ^gofer /etc/gofer/agent.conf gofer.agent=error gofer.messaging=error ------ ==> /var/log/messages <== Dec 2 12:15:57 client ?<30>goferd: [INFO][worker-0] root:490 - connecting to satellite.example.com:5647... Dec 2 12:15:57 client ?<30>goferd: [INFO][worker-0] root:512 - connected to satellite.example.com:5647
Hi, As a workaround, we can comment out the logging level code in the logutil.py file. ------ # cat /usr/lib/python2.7/site-packages/gofer/agent/logutil.py <snipped> handler.setFormatter(FORMATTER) root = getLogger() #root.setLevel(INFO) ## Comment out this line root.handlers.append(handler) </snipped> ------ and then restart the goferd service. Regards, Deepannagaraj N.
The [logging] section configures the python logging and needs to be expressed using python package names. Suggest: [logging] + gofer=error + pulp=error + katello=error # gofer.agent=debug # gofer.messaging=debug
Can you please explain why this is considered not a bug? This looks like hardcoding: #root.setLevel(INFO) ## Comment out this line And better defaults on agent.conf should be deployed for the sake of minimizing syslog spam otherwise actionable items get missed.
Hi, as by solution linked, i totally agree with RichieM. Please reopen the bug and provide a decent explanation.
Hi RichieM and Daniele, I have updated the article with the actual solution. Could you please try that? Let us know the results. Regards, Deepannagaraj N.
Is this portion still required: edit /usr/lib/python2.7/site-packages/gofer/agent/logutil.py #root.setLevel(INFO) ## Comment out this line
Hi RichieM, I hope that is not needed anymore. You may uncomment that line and restart the goferd to take effects. Deepannagaraj N.
Removing the needinfo based upon the updates provided by Deepannagaraj. At this time, the config file that is being changed via the article comes from a package that is controlled by gofer. As a result, changing the default as not as simple as it may seem. That said, it could be changed post install and managed via puppet or the configuration management solution of choice.
Hello Brad, Yeah, I have tried the latest version (katello-agent and gofer packages also latest). But it didn't work. Seems it is a regression. Deepannagaraj N.
Hi Jeff, It seems that the alternative outlined in comment 3 is no longer working on 6.2.12. Do you know of any changes that may have caused that behavior to regress?