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

Debug level agent logs are generated on upgrading agent to 8.16.0 BC3 when info logging level is selected. #5924

Open
amolnater-qasource opened this issue Nov 4, 2024 · 6 comments
Labels
bug Something isn't working impact:medium Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Comments

@amolnater-qasource
Copy link

Kibana Build details:

VERSION: 8.16.0 BC3
BUILD: 79556
COMMIT: f02d1303b5230c357ac7e4c49c8adadd5f66af38

Preconditions:

  1. 8.16.0-BC3 Kibana cloud environment should be available.
  2. Lower version say 7.17.25 or 8.15.3 agent should be installed.

Steps to reproduce:

  1. Navigate to Fleet>Agents tab.
  2. Observe info logging level is selected.
  3. Upgrade agent to latest 8.16.0 BC3.
  4. Observe debug level log is generated on successful upgrade:
    [elastic_agent][debug] received state: HEALTHY:Running
  5. Observe same logs are generated multiple times.

Expected Result:
Debug level agent logs should not be generated on upgrading linux agent to 8.16.0 BC3 when info logging level is selected.

Screenshot:
Image

Agent Logs:
elastic-agent-diagnostics-2024-11-04T05-16-32Z-00.zip

@amolnater-qasource amolnater-qasource added bug Something isn't working impact:medium Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team labels Nov 4, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@amolnater-qasource
Copy link
Author

@muskangulati-qasource Please review.

@muskangulati-qasource
Copy link

Secondary review is Done for this ticket!

@pierrehilbert
Copy link
Contributor

You mentioned on Linux, does it mean that this is not happening with other OS?
Is it also happening when upgrading to 8.15.4?

@amolnater-qasource
Copy link
Author

Hi @pierrehilbert

Thank you for looking into this issue.

We had run the tests on Linux so reported issue on the same.

Further we have revalidated this issue on 8.15.4 while upgrading 8.15.3 agent and found it reproducible at our end.

  • Debug logs are populated more frequently on upgrading from 8.15.3>8.15.4
  • Issue is reproducible on all OS's.

Agent logs:
elastic-agent-diagnostics-2024-11-05T08-34-51Z-00.zip
elastic-agent-diagnostics-2024-11-05T10-05-59Z-00.zip

Please let us know if anything else is required from our end.

Thanks!

@amolnater-qasource amolnater-qasource changed the title Debug level agent logs are generated on upgrading linux agent to 8.16.0 BC3 when info logging level is selected. Debug level agent logs are generated on upgrading agent to 8.16.0 BC3 when info logging level is selected. Nov 5, 2024
@pchila
Copy link
Member

pchila commented Nov 5, 2024

@pierrehilbert @amolnater-qasource From a quick look in the code, those debug logs are generated by the watcher that runs for the grace period after the upgrade, and from what I can see this is defaulted to debug here called from newWatchCommand...

It seems like that there's not log level settings coming from config so watcher keeps logging at debug level...
I checked the actual elastic-agent log files and there's no debug log in there so this seems to be limited only to the elastic-agent watcher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working impact:medium Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

No branches or pull requests

5 participants