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.
Suggest for 4.2.1 as this is easy and low risk change.
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.
Logs also missing in: - BlockVolume.validateImagePath - remove symlink, create directory - BlockVolume.validateVolumePath - create symlink
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?
(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.
Move back to post due to fixes that should add to the patch.
This patch isn't included in any tag yet, moving back to MODIFIED
Verified. vdsm-4.20.22 ovirt-engine-4.2.2.6
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.