Change in vdsm[master]: fileUtils: Convert unhelpful warnings to debug messages

nsoffer at redhat.com nsoffer at redhat.com
Tue Mar 22 20:01:24 UTC 2016


Nir Soffer has submitted this change and it was merged.

Change subject: fileUtils: Convert unhelpful warnings to debug messages
......................................................................


fileUtils: Convert unhelpful warnings to debug messages

When a directory exists, fileUtils.createdir() logs a warning, although
it has no context to tell if the existing directory is expected in the
normal flow, or an unexpected error condition.

This warning causes users to worry about non-existing issues and feel
less confident about the product. It also makes developer life harder,
since searching for warnings results in many unrelated messages.

This patch changes the warning to debug message, which may be helpful
for debugging.  Code that wants to warn about existing directories
should not call fileUtils.createdir() but the underlying os.makedirs()
and handle the EEXIST error.

Change-Id: I7800b860eb81334b63abefcca9a21a552331458f
Bug-Url: https://bugzilla.redhat.com/1129587
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/36764
Reviewed-by: Allon Mureinik <amureini at redhat.com>
Reviewed-by: Freddy Rolland <frolland at redhat.com>
Reviewed-by: Adam Litke <alitke at redhat.com>
Continuous-Integration: Jenkins CI
---
M vdsm/storage/fileUtils.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Nir Soffer: Verified
  Adam Litke: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Allon Mureinik: Looks good to me, but someone else must approve
  Freddy Rolland: Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/36764
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7800b860eb81334b63abefcca9a21a552331458f
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the vdsm-patches mailing list