Change in vdsm[master]: Check if log file exist on startup

ybronhei at redhat.com ybronhei at redhat.com
Tue Dec 18 12:16:10 UTC 2012


Yaniv Bronhaim has uploaded a new change for review.

Change subject: Check if log file exist on startup
......................................................................

Check if log file exist on startup

If file isn't exist we need to continue. Otherwise, os.access returns
false and we report permission error.

Change-Id: I300adc5ac3d9b12fee49023a54e5ffb4dee98da1
Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
---
M vdsm/vdsm
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/10194/1

diff --git a/vdsm/vdsm b/vdsm/vdsm
index ec291b7..fa149a4 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -114,6 +114,9 @@
 
 def __assertLogPermission():
     logfile = constants.P_VDSM_LOG + "/vdsm.log"
+    if not os.path.exists(logfile):
+        return
+
     if not os.access(logfile, os.W_OK):
         syslog.syslog("error in accessing vdsm log file")
         sys.exit(1)


--
To view, visit http://gerrit.ovirt.org/10194
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I300adc5ac3d9b12fee49023a54e5ffb4dee98da1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei at redhat.com>


More information about the vdsm-patches mailing list