Martin Peřina has posted comments on this change. Change subject: fklsnr: Introduce standalone fence_kdump listener ......................................................................
Patch Set 5: (5 comments) http://gerrit.ovirt.org/#/c/27201/5/packaging/services/ovirt-fence-kdump-listener/db.py File packaging/services/ovirt-fence-kdump-listener/db.py: Line 149: config_values, Line 150: ) Line 151: return config_values Line 152: Line 153: def create_fence_kdump_message(self, connection, host, received, status): > oh... you want to survive db restarts... Done Line 154: self.execute( Line 155: connection=connection, Line 156: statement=""" Line 157: INSERT INTO fence_kdump_messages (host, received, status) http://gerrit.ovirt.org/#/c/27201/5/packaging/services/ovirt-fence-kdump-listener/listener.py File packaging/services/ovirt-fence-kdump-listener/listener.py: Line 26: Line 27: # timedelta.total_seconds is included in Python >= 2.7 Line 28: _total_seconds = lambda td: ( Line 29: (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6 Line 30: ) > better: Created function _total_seconds() Line 31: Line 32: _now = lambda: datetime.datetime.now(dateutil.tz.tzutc()) Line 33: Line 34: Line 28: _total_seconds = lambda td: ( Line 29: (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6 Line 30: ) Line 31: Line 32: _now = lambda: datetime.datetime.now(dateutil.tz.tzutc()) > please either put this in function or at utilities module... but avoid putt Done Line 33: Line 34: Line 35: class FenceKdumpListener(base.Base): Line 36: # Host kdump flow states Line 271: Line 272: for record in self._db.get_unfinished_flows(): Line 273: # if record is saved to db, in memory cache status Line 274: # is always 'dumping' Line 275: record['status'] = self.SESSION_STATE_DUMPING > if someone adds nat we may get same ip but different port per server. 1) I've been told that we don't support NAT between engine and hosts 2) I can add another column to db if necessary, but currently on engine side I resolve host DNS name and match it with ip address in fence_kdump_messages table, so port is useless for me now Line 276: sessions[record['host']] = record Line 277: Line 278: return sessions Line 279: http://gerrit.ovirt.org/#/c/27201/5/packaging/services/ovirt-fence-kdump-listener/ovirt-fence-kdump-listener.conf.in File packaging/services/ovirt-fence-kdump-listener/ovirt-fence-kdump-listener.conf.in: Line 2: # This is a default configuration file for oVirt/RHEV-M fence_kdump listener Line 3: # Line 4: TRACE_ENABLE=False Line 5: TRACE_FILE= Line 6: ENGINE_USR="@ENGINE_USR@" > 1) why? 3) No, rerun engine-setup which sets host and port, store them to vdc_options and restarts listener service -- To view, visit http://gerrit.ovirt.org/27201 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieec3bad47bbba860a52a9ff4e2eb7f61277f4e36 Gerrit-PatchSet: 5 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: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Martin Peřina <mper...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org 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