Alon Bar-Lev has posted comments on this change.

Change subject: tools: Adds notifier config validation prior to service startup
......................................................................


Patch Set 3:

(2 comments)

....................................................
File packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py
Line 204:         stdout, stderr = proc.communicate()
Line 205: 
Line 206:         self.logger.debug('Result(code): %s', proc.returncode)
Line 207:         self.logger.debug('Result(stdout): %s', stdout)
Line 208:         self.logger.debug('Result(stderr): %s', stderr)
why debug? we want to see the errors.

also you cannot expect unicode compatible output you need to perform:

 stdout = stdout.decode('utf-8', 'replace').splitlines()
 stderr = stderr.decode('utf-8', 'replace').splitlines()

 if stdout:
     self.logger.info('validation: %s', stdout)
 if stderr:
     self.logger.info('validation errors: %s', stderr)
Line 209: 
Line 210:         if proc.returncode != 0:
Line 211:             raise RuntimeError(stderr)
Line 212: 


Line 207:         self.logger.debug('Result(stdout): %s', stdout)
Line 208:         self.logger.debug('Result(stderr): %s', stderr)
Line 209: 
Line 210:         if proc.returncode != 0:
Line 211:             raise RuntimeError(stderr)
no need for adding stderr in exception, we should see above in systemd journal 
and syslog, please confirm.
Line 212: 
Line 213: 
Line 214: if __name__ == '__main__':
Line 215:     service.setupLogger()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I11ad77a33697f254e60e1d0b12e343900e5b0b34
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <mper...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Martin Peřina <mper...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: mooli tayer <mta...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to