Vinzenz Feenstra has posted comments on this change.
Change subject: dump the core of a VM
......................................................................
Patch Set 15: Code-Review-1
(6 comments)
http://gerrit.ovirt.org/#/c/7329/15/vdsm/API.py
File vdsm/API.py:
Line 272: :param postAction: An action to take after the core dump
Line 273: :param bypassCache: Avoid filesystem cache when saving.
Line 274: :param memoryOnly: dump VM memory only (skip disks)
Line 275: """
Line 276: def reportError(key='coreDumpErr', msg=None):
key as a parameter here has no use, it's always coreDumpErr here and msg=None should
not be by default None, as this is also always passed. And if it is None, you're
passing msg as None which is not allowed (IIRC)
Line 277: error = {'status':
Line 278: {'code':
errCode[key]['status']['code'],
Line 279: 'message': msg}}
Line 280: self.log.error(msg)
http://gerrit.ovirt.org/#/c/7329/15/vdsm/vm.py
File vdsm/vm.py:
Line 2984: raise
Line 2985: finally:
Line 2986: self._guestCpuLock.release()
Line 2987:
Line 2988: def isDoingDump(self):
isCoreDumpActive/Alive? The language implications here are a bit ambiguous, if you know
what I am talking about
Line 2989: return self._coredumpThread.isAlive()
Line 2990:
Line 2991: def coreDump(self, to, postAction, bypassCache, memoryOnly):
Line 2992: self._acquireCpuLockWithTimeout()
Line 3004: bypassCache, memoryOnly)
Line 3005: self._coredumpThread.dumpStart()
Line 3006: return {'status': doneCode}
Line 3007: except Exception, e:
Line 3008: self.log.error("Failed to perform core dump. " +
e.message)
("Failed to perform core dump. %s", e.message)
Line 3009: status = self._coredumpThread.getStatus()
Line 3010: return {'status':
Line 3011: {'code':
errCode['coreDumpErr']['status']['code'],
Line 3012: 'message': status['message']}}
http://gerrit.ovirt.org/#/c/7329/15/vdsm_api/vdsmapi-schema.json
File vdsm_api/vdsmapi-schema.json:
Line 5891: # @live: Do not interrupt the running VM
Line 5892: #
Line 5893: # @reset: Reboot the VM after gathering core dump
Line 5894: #
Line 5895: # Since: 4.10.4
bump please
Line 5896: ##
Line 5897: {'enum': 'CoreDumpPostAction', 'data':
['crash', 'live', 'reset']}
Line 5898:
Line 5899: ##
Line 5902: # dump a VM to a designated file
Line 5903: #
Line 5904: # @to: the coreDump file
Line 5905: #
Line 5906: # @postAction: #optional An action to take after the dump has been taken
what's the default action if not specified? I guess this would be the right place to
document this
Line 5907: #
Line 5908: # @bypassCache: #optional Avoid file system cache when saving
Line 5909: #
Line 5910: # @memoryOnly: #optional Dump VM's memory only
Line 5908: # @bypassCache: #optional Avoid file system cache when saving
Line 5909: #
Line 5910: # @memoryOnly: #optional Dump VM's memory only
Line 5911: #
Line 5912: # Since: 4.10.4
same
Line 5913: #
Line 5914: ##
Line 5915: {'command': {'class': 'VM', 'name':
'coreDump'},
Line 5916: 'data': {'to': 'str', 'postAction':
'CoreDumpPostAction',
--
To view, visit
http://gerrit.ovirt.org/7329
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If4aac9e747dc7aa64a6ff5ef256a7a4375aa2bb5
Gerrit-PatchSet: 15
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Better Saggi <bettersaggi(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Jiří Moskovčák <jmoskovc(a)redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Shu Ming <shuming(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes