Alon Bar-Lev has posted comments on this change.

Change subject: fklsnr: Introduce standalone fence_kdump listener
......................................................................


Patch Set 6:

(4 comments)

http://gerrit.ovirt.org/#/c/27201/6/packaging/services/ovirt-fence-kdump-listener/listener.py
File packaging/services/ovirt-fence-kdump-listener/listener.py:

Line 169:                 status=entry['status'],
Line 170:             )
Line 171: 
Line 172:             # record successfully saved in db, update in memory cache
Line 173:             entry['received'] = received
> If I updated memory first and database error occurred during update, I woul
no... you do not rollback anything, reality does not stop because database is 
down.

you need to keep tracking sessions, and update the database when it is up, this 
is the only valid path if you want to handle database down.
Line 174:             if entry['status'] == self.SESSION_STATE_INITIAL:
Line 175:                 self.logger.info(
Line 176:                     _(
Line 177:                         "Host '{vds_id}' with address '{address}' 
started "


Line 181:                         address=entry['address'][0],
Line 182:                     )
Line 183:                 )
Line 184:                 entry['status'] = self.SESSION_STATE_DUMPING
Line 185:                 self._sessions[entry['address'][0]] = entry
> This is entry with initial status, it's not contained in sessions, I will s
1. please use (address, port) always, per what we discussed.

2. see above, you need to keep track of sessions no matter what.
Line 186: 
Line 187:             elif entry['status'] == self.SESSION_STATE_DUMPING:
Line 188:                 self.logger.debug(
Line 189:                     'dumping %s',


Line 220:                         status=new_state,
Line 221:                     )
Line 222: 
Line 223:                     # record successfully saved in db, update in 
memory cache
Line 224:                     session['status'] = new_state
> Expired sessions are not kept, they are removed using code on lines 249-254
either shutdown service, or have a limited queue of dao updates to be pushed 
whenever database is up.

you should probably need to wait until database is up when starting up as well.

not sure this entire database recovery is worth the effort... but if you want 
to support this you should do this well.
Line 225:                     session['received'] = received
Line 226:                     self.logger.info(
Line 227:                         _(
Line 228:                             "Host '{vds_id}' with address '{address}' 
"


Line 281:             # is always 'dumping'
Line 282:             record['status'] = self.SESSION_STATE_DUMPING
Line 283:             # address is stored as string, convert back to tuple
Line 284:             record['address'] = tuple(record['address'])
Line 285:             self._sessions[record['address'][0]] = record
> I don't understand. Do you mean why session needs to be loaded from db or s
the tracking should be based on (address, port) and initialized in similar 
manner of the code hank that deals with new session.
Line 286: 
Line 287: 


-- 
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: 6
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

Reply via email to