Bug 2180110 - cephadm: reduce spam to cephadm.log
Summary: cephadm: reduce spam to cephadm.log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Cephadm
Version: 6.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 6.1
Assignee: Adam King
QA Contact: Mohit Bisht
Akash Raj
URL:
Whiteboard:
Depends On: 2180567
Blocks: 2192813
TreeView+ depends on / blocked
 
Reported: 2023-03-20 18:07 UTC by Adam King
Modified: 2023-08-21 07:26 UTC (History)
4 users (show)

Fixed In Version: ceph-17.2.6-5.el9cp
Doc Type: Enhancement
Doc Text:
.All the Cephadm logs are no longer logged into `cephadm.log` when `--verbose` is not passed Previously, some Cephadm commands, such as `gather-facts`, would spam the log with massive amounts of command output every time they were run. In some cases, it was once per minute. With this release, in Cephadm, all the logs are no longer logged into `cephadm.log` when `--verbose` is not passed. The `cephadm.log` is now easier to read since most of the spam previously written is no longer present.
Clone Of:
Environment:
Last Closed: 2023-06-15 09:16:51 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-6279 0 None None None 2023-03-20 18:08:52 UTC

Description Adam King 2023-03-20 18:07:45 UTC
Description of problem:

cephadm.log is getting filled with a bunch of messages that won't be useful in 99.9% of situations and make it hard to read the log. For example, gather-facts, which runs every minute, logs

2022-07-12 15:07:50,013 7f737ba12b80 DEBUG --------------------------------------------------------------------------------
cephadm ['gather-facts']
2022-07-12 15:07:50,060 7f737ba12b80 DEBUG /bin/podman: 4.0.2
2022-07-12 15:07:50,113 7f737ba12b80 DEBUG sestatus: SELinux status:                 enabled
2022-07-12 15:07:50,113 7f737ba12b80 DEBUG sestatus: SELinuxfs mount:                /sys/fs/selinux
2022-07-12 15:07:50,113 7f737ba12b80 DEBUG sestatus: SELinux root directory:         /etc/selinux
2022-07-12 15:07:50,113 7f737ba12b80 DEBUG sestatus: Loaded policy name:             targeted
2022-07-12 15:07:50,113 7f737ba12b80 DEBUG sestatus: Current mode:                   permissive
2022-07-12 15:07:50,113 7f737ba12b80 DEBUG sestatus: Mode from config file:          permissive
2022-07-12 15:07:50,113 7f737ba12b80 DEBUG sestatus: Policy MLS status:              enabled
2022-07-12 15:07:50,114 7f737ba12b80 DEBUG sestatus: Policy deny_unknown status:     allowed
2022-07-12 15:07:50,114 7f737ba12b80 DEBUG sestatus: Memory protection checking:     actual (secure)
2022-07-12 15:07:50,114 7f737ba12b80 DEBUG sestatus: Max kernel policy version:      33
2022-07-12 15:07:50,117 7f737ba12b80 DEBUG sestatus: SELinux status:                 enabled
2022-07-12 15:07:50,117 7f737ba12b80 DEBUG sestatus: SELinuxfs mount:                /sys/fs/selinux
2022-07-12 15:07:50,117 7f737ba12b80 DEBUG sestatus: SELinux root directory:         /etc/selinux
2022-07-12 15:07:50,117 7f737ba12b80 DEBUG sestatus: Loaded policy name:             targeted
2022-07-12 15:07:50,117 7f737ba12b80 DEBUG sestatus: Current mode:                   permissive
2022-07-12 15:07:50,117 7f737ba12b80 DEBUG sestatus: Mode from config file:          permissive
2022-07-12 15:07:50,117 7f737ba12b80 DEBUG sestatus: Policy MLS status:              enabled
2022-07-12 15:07:50,117 7f737ba12b80 DEBUG sestatus: Policy deny_unknown status:     allowed
2022-07-12 15:07:50,118 7f737ba12b80 DEBUG sestatus: Memory protection checking:     actual (secure)
2022-07-12 15:07:50,118 7f737ba12b80 DEBUG sestatus: Max kernel policy version:      33
2022-07-12 15:07:50,121 7f737ba12b80 DEBUG sestatus: SELinux status:                 enabled
2022-07-12 15:07:50,121 7f737ba12b80 DEBUG sestatus: SELinuxfs mount:                /sys/fs/selinux
2022-07-12 15:07:50,121 7f737ba12b80 DEBUG sestatus: SELinux root directory:         /etc/selinux
2022-07-12 15:07:50,121 7f737ba12b80 DEBUG sestatus: Loaded policy name:             targeted
2022-07-12 15:07:50,121 7f737ba12b80 DEBUG sestatus: Current mode:                   permissive
2022-07-12 15:07:50,122 7f737ba12b80 DEBUG sestatus: Mode from config file:          permissive
2022-07-12 15:07:50,122 7f737ba12b80 DEBUG sestatus: Policy MLS status:              enabled
2022-07-12 15:07:50,122 7f737ba12b80 DEBUG sestatus: Policy deny_unknown status:     allowed
2022-07-12 15:07:50,122 7f737ba12b80 DEBUG sestatus: Memory protection checking:     actual (secure)
2022-07-12 15:07:50,122 7f737ba12b80 DEBUG sestatus: Max kernel policy version:      33
2022-07-12 15:07:50,125 7f737ba12b80 DEBUG sestatus: SELinux status:                 enabled
2022-07-12 15:07:50,125 7f737ba12b80 DEBUG sestatus: SELinuxfs mount:                /sys/fs/selinux
2022-07-12 15:07:50,125 7f737ba12b80 DEBUG sestatus: SELinux root directory:         /etc/selinux
2022-07-12 15:07:50,125 7f737ba12b80 DEBUG sestatus: Loaded policy name:             targeted
2022-07-12 15:07:50,125 7f737ba12b80 DEBUG sestatus: Current mode:                   permissive
2022-07-12 15:07:50,126 7f737ba12b80 DEBUG sestatus: Mode from config file:          permissive
2022-07-12 15:07:50,126 7f737ba12b80 DEBUG sestatus: Policy MLS status:              enabled
2022-07-12 15:07:50,126 7f737ba12b80 DEBUG sestatus: Policy deny_unknown status:     allowed
2022-07-12 15:07:50,126 7f737ba12b80 DEBUG sestatus: Memory protection checking:     actual (secure)
2022-07-12 15:07:50,126 7f737ba12b80 DEBUG sestatus: Max kernel policy version:      33
2022-07-12 15:07:50,129 7f737ba12b80 DEBUG sestatus: SELinux status:                 enabled
2022-07-12 15:07:50,129 7f737ba12b80 DEBUG sestatus: SELinuxfs mount:                /sys/fs/selinux
2022-07-12 15:07:50,129 7f737ba12b80 DEBUG sestatus: SELinux root directory:         /etc/selinux
2022-07-12 15:07:50,129 7f737ba12b80 DEBUG sestatus: Loaded policy name:             targeted
2022-07-12 15:07:50,129 7f737ba12b80 DEBUG sestatus: Current mode:                   permissive
2022-07-12 15:07:50,129 7f737ba12b80 DEBUG sestatus: Mode from config file:          permissive
2022-07-12 15:07:50,129 7f737ba12b80 DEBUG sestatus: Policy MLS status:              enabled
2022-07-12 15:07:50,129 7f737ba12b80 DEBUG sestatus: Policy deny_unknown status:     allowed
2022-07-12 15:07:50,129 7f737ba12b80 DEBUG sestatus: Memory protection checking:     actual (secure)
2022-07-12 15:07:50,129 7f737ba12b80 DEBUG sestatus: Max kernel policy version:      33
2022-07-12 15:07:50,132 7f737ba12b80 DEBUG sestatus: SELinux status:                 enabled
2022-07-12 15:07:50,132 7f737ba12b80 DEBUG sestatus: SELinuxfs mount:                /sys/fs/selinux
2022-07-12 15:07:50,133 7f737ba12b80 DEBUG sestatus: SELinux root directory:         /etc/selinux
2022-07-12 15:07:50,133 7f737ba12b80 DEBUG sestatus: Loaded policy name:             targeted
2022-07-12 15:07:50,133 7f737ba12b80 DEBUG sestatus: Current mode:                   permissive
2022-07-12 15:07:50,133 7f737ba12b80 DEBUG sestatus: Mode from config file:          permissive
2022-07-12 15:07:50,133 7f737ba12b80 DEBUG sestatus: Policy MLS status:              enabled
2022-07-12 15:07:50,133 7f737ba12b80 DEBUG sestatus: Policy deny_unknown status:     allowed
2022-07-12 15:07:50,133 7f737ba12b80 DEBUG sestatus: Memory protection checking:     actual (secure)
2022-07-12 15:07:50,133 7f737ba12b80 DEBUG sestatus: Max kernel policy version:      33

A number of other commands run regularly as part of metadata gathering (e.g. ceph-volume inventory, list-networks, ls) similarly print massive blocks of text into the log, making it hard to read through and making the overall size of the log file quickly become massive.

The default logging should be a little more picky about what it logs so the log is at least usable. We only need to log about our repeated metadata gathering if something interesting happens or an error occurs.

Comment 10 errata-xmlrpc 2023-06-15 09:16:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Red Hat Ceph Storage 6.1 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:3623


Note You need to log in before you can comment on or make changes to this bug.