Skip to content

Make some logs less noisy#495

Merged
chrissie-c merged 2 commits intoClusterLabs:mainfrom
kgaillot:logs
Jan 31, 2024
Merged

Make some logs less noisy#495
chrissie-c merged 2 commits intoClusterLabs:mainfrom
kgaillot:logs

Conversation

@kgaillot
Copy link
Copy Markdown

When trying to open an IPC connection, log at info level rather than warning or error, because the caller has better context to know whether it's a problem or not. Users get distracted by error logs that don't actually indicate a problem.

Also lower some spammy messages to trace level.

Ken Gaillot added 2 commits January 24, 2024 10:24
... in handle_new_connection(). The caller has better context for whether a
problem merits a warning or error, and the function's return code is
sufficiently descriptive to do so. Some problems may be expected or able to be
worked around.

For example, Pacemaker's crm_mon attempts to contact pacemakerd IPC. On a
Pacemaker Remote node, that IPC will be unavailable, and crm_mon can check the
libqb return code to detect and handle that situation gracefully.
They're rather noisy, with every shm-based IPC connection generating multiple
obscure messages like:

  debug: shm size:1048589; real_size:1052672; rb->word_size:263168

and every disconnect generating the rather unhelpful:

  debug: qb_ipcc_disconnect()

along with multiple messages like:

  debug: Closing ringbuffer: /dev/shm/qb-10986-11014-34-26VRvs/qb-request-cmap-header

All of these seem appropriate to trace level.
@kgaillot
Copy link
Copy Markdown
Author

@chrissie-c , this seems like a good idea to me :) but let me know if there's a reason not to

@kgaillot
Copy link
Copy Markdown
Author

Also, I haven't gotten a chance to test this yet, but it's pretty straightforward

Copy link
Copy Markdown
Contributor

@chrissie-c chrissie-c left a comment

Choose a reason for hiding this comment

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

ACK, that seems sensible to me and tests OK.
Thanks

@chrissie-c chrissie-c merged commit 1070cbc into ClusterLabs:main Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants