Bug 1531066 - vdsm: use INFO log level for all operation that change system state
Summary: vdsm: use INFO log level for all operation that change system state
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.20.15
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.2
: 4.20.20
Assignee: Eyal Shenitzky
QA Contact: Evelina Shames
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-04 13:55 UTC by Nir Soffer
Modified: 2018-04-18 12:26 UTC (History)
4 users (show)

Fixed In Version: v4.20.20
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-18 12:26:27 UTC
oVirt Team: Storage
Embargoed:
rule-engine: ovirt-4.2+
ylavi: exception+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1527394 0 high CLOSED [HE] - SHE ha-host's score is unstable and hosted-engine.conf is not equal on both ha-hosts. 2021-02-22 00:41:40 UTC
oVirt gerrit 86750 0 master ABANDONED core: change all system change log message to info level 2018-01-25 12:52:43 UTC
oVirt gerrit 86788 0 master MERGED Storage: Use INFO log level for system state changes 2018-02-11 15:22:28 UTC
oVirt gerrit 86795 0 master MERGED Logging: Add missing log for system state change operations 2018-02-11 14:20:31 UTC
oVirt gerrit 87334 0 master MERGED Logging: Add virt missing log for system state change operations 2018-02-11 14:20:49 UTC
oVirt gerrit 87444 0 master ABANDONED Logging: Add missing log for system state change operations 2018-02-11 14:37:02 UTC
oVirt gerrit 87445 0 ovirt-4.2 MERGED Logging: Add missing log for system state change operations 2018-02-14 12:16:31 UTC
oVirt gerrit 87446 0 ovirt-4.2 MERGED Logging: Add virt missing log for system state change operations 2018-02-12 15:21:26 UTC
oVirt gerrit 87447 0 ovirt-4.2 MERGED Storage: Use INFO log level for system state changes 2018-02-15 15:56:34 UTC
oVirt gerrit 87840 0 master MERGED logging: fix and improve storage log messages 2018-02-20 15:35:23 UTC
oVirt gerrit 87956 0 ovirt-4.2 MERGED logging: fix and improve storage log messages 2018-02-21 14:08:00 UTC

Internal Links: 1527394

Description Nir Soffer 2018-01-04 13:55:42 UTC
Description of problem:

Some storage operations like removing a directory (e.g. fileUtils.cleanupdir)
log the operation only in DEBUG level. This makes debugging issue like missing
directories in /run/vdsm/storage hard (e.g bug 1527394).

In QE setup, it is easy to reproduce with debug logs. In the field, not having
the logs decrease the chance to understand the issue and increase the cost of
supporting the system.

Version-Release number of selected component (if applicable):
4.1 (we moved to INFO logs by default)

How reproducible:
Always

Steps to Reproduce:
1. Run flows that call fileUtils.cleanupdir

Actual results:
Removing directory is not logged.

Expected results:
Removing directory should be logged.

Additional info:
Removing a directory is just one example, we should audit the code and ensure that
any operation changing system state is logged in INFO level.

Comment 1 Nir Soffer 2018-01-04 13:56:43 UTC
Suggest for 4.2.1 as this is easy and low risk change.

Comment 2 Nir Soffer 2018-01-04 16:26:19 UTC
In HSM.__cleanStorageRepository, we have no logs about removed directories and
files. I don't think it should be related to bug 1527394 unless we have code
creating link from /rhev/data-center/ to /run/vdsm/storage instead of the correct
link from /run/vdsm/storage to /rhev/data-center, but we should at least have logs
for the cleanup code.

Comment 3 Nir Soffer 2018-01-04 16:35:53 UTC
Logs also missing in:
- BlockVolume.validateImagePath - remove symlink, create directory
- BlockVolume.validateVolumePath - create symlink

Comment 4 Eyal Shenitzky 2018-01-14 10:30:54 UTC
Hi Nir,

I am not sure what is the bug purpose, is it about refactor the DEBUG log messages to INFO level if the operations change the system state? or, is it about adding missing log messages?

Comment 5 Nir Soffer 2018-01-14 10:39:52 UTC
(In reply to Eyal Shenitzky from comment #4)
> Hi Nir,
> 
> I am not sure what is the bug purpose, is it about refactor the DEBUG log
> messages to INFO level 

This is not a refactoring, refactoring is changing the code without changing
the behavior.

> if the operations change the system state? or, is it
> about adding missing log messages?

Both, we need info log when we add/remove files and directories. The logs we have
should use INFO level, and the log we don't have should be added.

Comment 6 Eyal Shenitzky 2018-02-19 13:03:36 UTC
Move back to post due to fixes that should add to the patch.

Comment 7 Allon Mureinik 2018-02-27 14:19:00 UTC
This patch isn't included in any tag yet, moving back to MODIFIED

Comment 8 Evelina Shames 2018-04-10 12:42:27 UTC
Verified.
vdsm-4.20.22
ovirt-engine-4.2.2.6

Comment 9 Sandro Bonazzola 2018-04-18 12:26:27 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

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


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