Dan Kenigsberg has posted comments on this change.
Change subject: catch libvirt timeout and return an error on setVmTicket
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(4 inline comments)
....................................................
File vdsm/define.py
Line 130: 'recovery': {'status':
Line 131: {'code': 99,
Line 132: 'message':
Line 133: 'Recovering from crash or Initializing'}},
Line 134: 'internalVdsmTimeout': {'status':
I'd prefer a shorter name, like 'timeout'
Line 135: {'code': 101,
Line 136: 'message': 'Internal VDSM
timeout'}
Line 137: }
Line 138: }
Line 131: {'code': 99,
Line 132: 'message':
Line 133: 'Recovering from crash or Initializing'}},
Line 134: 'internalVdsmTimeout': {'status':
Line 135: {'code': 101,
how about using code 57 first?
Line 136: 'message': 'Internal VDSM
timeout'}
Line 137: }
Line 138: }
Line 139: doneCode = {'code': 0, 'message': 'Done'}
....................................................
File vdsm/libvirtvm.py
Line 2456: graphics.setAttribute('passwdValidTo', validto)
Line 2457: if graphics.getAttribute('type') == 'spice':
Line 2458: graphics.setAttribute('connected', connAct)
Line 2459: hooks.before_vm_set_ticket(self._lastXMLDesc, self.conf,
params)
Line 2460: self._dom.updateDeviceFlags(graphics.toxml(), 0)
try-except should wrap the smallest code possible. in this case, it is only the
updateDeviceFlags command.
Line 2461: hooks.after_vm_set_ticket(self._lastXMLDesc, self.conf,
params)
Line 2462: except TimeoutError as tmo:
Line 2463: err = errCode['internalVdsmTimeout']
Line 2464: err['exception'] = tmo
Line 2460: self._dom.updateDeviceFlags(graphics.toxml(), 0)
Line 2461: hooks.after_vm_set_ticket(self._lastXMLDesc, self.conf,
params)
Line 2462: except TimeoutError as tmo:
Line 2463: err = errCode['internalVdsmTimeout']
Line 2464: err['exception'] = tmo
This requires a change to vdsm_api/vdsmapi-schema.json, and I still think that
a change of this character merits a separate patch.
Line 2465: return err
Line 2466: return {'status': doneCode}
Line 2467:
Line 2468: def _reviveTicket(self, newlife):
--
To view, visit http://gerrit.ovirt.org/10285
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb48a1baff1e059f48f71f600f4bf5d9f40a7d11
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Peter V. Saveliev <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Shu Ming <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches