Bug 1867717

Summary: Every time ceph-volume command gets executed the debug output gets registered here: /var/log/ceph/ceph-volume.log
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Raul Mahiques <rmahique>
Component: Ceph-VolumeAssignee: Andrew Schoen <aschoen>
Status: CLOSED ERRATA QA Contact: Ameena Suhani S H <amsyedha>
Severity: medium Docs Contact: Karen Norteman <knortema>
Priority: medium    
Version: 4.1CC: agunn, aschoen, ceph-eng-bugs, ceph-qe-bugs, dparkes, gmeno, jansingh, kdreyer, knortema, mmanjuna, mmuench, tserlin, vereddy
Target Milestone: ---   
Target Release: 4.2z1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-14.2.11-98.el8cp, ceph-14.2.11-98.el7cp Doc Type: Bug Fix
Doc Text:
.Executing the `ceph-volume` command sent debugging output to `/var/log/ceph/ceph-volume.log` Previously, executing the `ceph-volume` command always sent debugging-level output to `/var/log/ceph/ceph-volume.log` regardless of the level set in the `--log-level` option. With this release, executing the `ceph-volume` command sends output at the level that the `--log-level` option specifies.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-28 20:12:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1890121    

Description Raul Mahiques 2020-08-10 15:20:30 UTC
Description of problem:
Every time ceph-volume command gets executed the debug output gets registered here: /var/log/ceph/ceph-volume.log
This output doesn't stop even if we set CEPH_VOLUME_DEBUG variable to 0.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. ls -l /var/log/ceph/ceph-volume.log
2. CEPH_VOLUME_DEBUG=0 ceph-volume --cluster ceph lvm list >/dev/null ; ls -l /var/log/ceph/ceph-volume.log ; tail /var/log/ceph/ceph-volume.log
3. Notice the size increase and a debug version of the command output gets registered into the log file

Actual results:
a debug version of the command output gets registered into the log file, despite having set DEBUG to 0

Expected results:
a debug version of the command output doesn't get registered into the log file, when we set CEPH_VOLUME_DEBUG=0, only the command that has been executed or even not that.

Additional info:

Comment 1 RHEL Program Management 2020-08-10 15:20:37 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 2 Raul Mahiques 2020-08-10 15:24:20 UTC
Here we can see where CEPH_VOLUME_DEBUG environment variable is referred:

https://github.com/ceph/ceph/search?q=CEPH_VOLUME_DEBUG&unscoped_q=CEPH_VOLUME_DEBUG

Effectively in the code is only mentioned here: ( except for the src/ceph-volume/ceph_volume/tests/test_decorators.py where it is only enabled )
 src/ceph-volume/ceph_volume/decorators.py
                logger.exception('exception caught by decorator')
                if os.environ.get('CEPH_VOLUME_DEBUG'):
                    raise

Comment 9 Yaniv Kaul 2021-01-07 11:04:48 UTC
Is this already in 4.2z1?

Comment 17 errata-xmlrpc 2021-04-28 20:12:31 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 (Important: Red Hat Ceph Storage security, bug fix, and enhancement 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-2021:1452