Dan Kenigsberg has posted comments on this change.

Change subject: vdsm hooks: report hook stderr to Engine if it fails an action
......................................................................


Patch Set 7:

(4 comments)

https://gerrit.ovirt.org/#/c/42592/7/vdsm/API.py
File vdsm/API.py:

Line 352:         try:
Line 353:             v = self._cif.vmContainer[self._UUID]
Line 354:         except KeyError:
Line 355:             return errCode['noVM']
Line 356:         return v.migrateStatus()
unrelated to this patch, I believe fromani works on a fix like that.
Line 357: 
Line 358:     def getStats(self):
Line 359:         """
Line 360:         Obtain statistics of the specified VM


Line 369:         if runHooks:
Line 370:             try:
Line 371:                 hooks.before_get_vm_stats()
Line 372:             except hooks.HookError as e:
Line 373:                 return {'status': 10802, 'statsList': str(e)}
> 10802 - value matching "VDSM command failed" in engine.
using

 vdsm.response.error('unexpected', message)

would be fine.
Line 374: 
Line 375:         stats = v.getStats().copy()
Line 376:         if runHooks:
Line 377:             stats = hooks.after_get_vm_stats([stats])[0]


Line 587:         except hooks.HookError as e:
Line 588:             self.log.debug('Destination VM creation failed due to 
hook' +
Line 589:                            ' error:' + str(e))
Line 590:             # Status code 12 (migration error) will notify the 
migration
Line 591:             # source vds that a hook error occured
> Need to pass information about hook error.
look in lib/vdsm/define.py for the defined error names.
Line 592:             return {'status': {'code': 12, 'message': str(e)}}
Line 593:         self.log.debug('Destination VM creation succeeded')
Line 594:         return {'status': doneCode, 'migrationPort': 0,
Line 595:                 'params': response['vmList']}


https://gerrit.ovirt.org/#/c/42592/7/vdsm/virt/migration.py
File vdsm/virt/migration.py:

Line 327:             # the migration to get cancelled right after the transfer 
started.
Line 328:             destCreateStartTime = time.time()
Line 329: 
Line 330:             try:
Line 331:                 result = 
self._destServer.migrationCreate(self._machineParams)
please rebase - fromani is handling this
Line 332:             except JsonRpcError as e:
Line 333:                 self.log.error('JsonRpcError when calling 
migrationCreate on' +
Line 334:                                ' destination server: ' + str(e))
Line 335:                 # 12 is the error code for migration, here it means 
that


-- 
To view, visit https://gerrit.ovirt.org/42592
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe2d5eb52cf2c8855d9d7d5e0ff1628a6cf1dc51
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Marcin Mirecki <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Feng Yang <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to