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 <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: mooli tayer <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches