Change in vdsm[master]: change startup process for vdsm and supervdsm

lvroyce at linux.vnet.ibm.com lvroyce at linux.vnet.ibm.com
Fri Jan 4 07:56:08 UTC 2013


Royce Lv has posted comments on this change.

Change subject: change startup process for vdsm and supervdsm
......................................................................


Patch Set 11: (4 inline comments)

....................................................
File vdsm/supervdsm.py
Line 53:         try:
Line 54:             return callMethod()
Line 55:         except(IOError, socket.error, AuthenticationError):
Line 56:             os.kill(os.getpid(), signal.SIGTERM)
Line 57:             raise
I'll rebase on yours
Line 58: 
Line 59: 
Line 60: class SuperVdsmProxy(object):
Line 61:     """


Line 67:         try:
Line 68:             misc.retry(self._connect, Exception, timeout=60)
Line 69:         except Exception:
Line 70:             self._log.debug("error raised when connecting to super vdsm")
Line 71:             os.unlink(ADDRESS)
Done
Line 72:             os.kill(os.getpid(), signal.SIGTERM)
Line 73:         self._log.debug("Connected to Super Vdsm")
Line 74: 
Line 75:     def open(self, *args, **kwargs):


....................................................
File vdsm/vdsm
Line 142: 
Line 143:     # When key is None, connections are restricted to child processes
Line 144:     manager = _SuperVdsmManager(ADDRESS, None)
Line 145:     vdsmPid = os.getpid()
Line 146:     svdsmProc = Process(target=restartSvdsm, args=(manager, vdsmPid, ))
<ref:python doc>:Manager() controls a server process which holds Python objects and
 allows other processes to manipulate them using proxies.

 According to me, Our supervdsm process is more than just callable objects:
 supervdsm process = main thread(for thread join and zombie join)+heart beat for 
vdsm+manager.

Correct me if I misunderstand you.:)
Line 147:     try:
Line 148:         svdsmProc.start()
Line 149:         waitThread = threading.Thread(target=__waitSvdsm,
Line 150:                                       args=[svdsmProc])


Line 145:     vdsmPid = os.getpid()
Line 146:     svdsmProc = Process(target=restartSvdsm, args=(manager, vdsmPid, ))
Line 147:     try:
Line 148:         svdsmProc.start()
Line 149:         waitThread = threading.Thread(target=__waitSvdsm,
1. if svdsm stops what should vdsm do?
maybe I can try to let vdsm run until it discovered svdsm died when call svdsm proxy.
since vdsm does not has privilege to restart svdsm, it just leave us one choice to restart vdsm and svdsm all over. Or else we will need a daemon dedicate for 'vdsm' and 'svdsm' respectively stop and start , this logic is more complex, that is what I do in *patch set 1*, see Danken's opinion about that.
Line 150:                                       args=[svdsmProc])
Line 151:         waitThread.setDaemon(True)
Line 152:         waitThread.start()
Line 153:         startVdsm(logger)


--
To view, visit http://gerrit.ovirt.org/4145
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I69aae6b0b9529c80291d90c6ad14ff82b21aea53
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Adam Litke <agl at us.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Royce Lv <lvroyce at linux.vnet.ibm.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>
Gerrit-Reviewer: Wenyi Gao <wenyi at linux.vnet.ibm.com>
Gerrit-Reviewer: Xu He Jie <xuhj at linux.vnet.ibm.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list