mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-15 13:32:15 +00:00
CTS: add CpgCfgChgOnNodeRestart
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2783 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
e8b143595c
commit
23b3dc7914
@ -324,6 +324,36 @@ class CpgCfgChgOnNodeIsolate(CpgConfigChangeBase):
|
||||
self.CM.unisolate_node (self.wobbly)
|
||||
return CpgConfigChangeBase.teardown(self, node)
|
||||
|
||||
###################################################################
|
||||
class CpgCfgChgOnNodeRestart(CpgConfigChangeBase):
|
||||
|
||||
def __init__(self, cm):
|
||||
CpgConfigChangeBase.__init__(self,cm)
|
||||
self.name="CpgCfgChgOnNodeRestart"
|
||||
|
||||
def config_valid(self, config):
|
||||
if config.has_key('totem/rrp_mode'):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
def failure_action(self):
|
||||
self.CM.log("isolating node " + self.wobbly)
|
||||
self.CM.isolate_node(self.wobbly)
|
||||
self.CM.log("Restarting corosync on " + self.wobbly)
|
||||
self.CM.rsh(self.wobbly, "killall -9 corosync")
|
||||
self.CM.rsh(self.wobbly, "rm -f /var/run/corosync.pid")
|
||||
self.CM.StartaCM(self.wobbly)
|
||||
|
||||
def __call__(self, node):
|
||||
self.incr("calls")
|
||||
self.failure_action()
|
||||
return self.wait_for_config_change()
|
||||
|
||||
def teardown(self, node):
|
||||
self.CM.unisolate_node (self.wobbly)
|
||||
return CpgConfigChangeBase.teardown(self, node)
|
||||
|
||||
###################################################################
|
||||
class CpgMsgOrderBase(CoroTest):
|
||||
|
||||
@ -961,6 +991,7 @@ GenTestClasses.append(CpgCfgChgOnExecCrash)
|
||||
GenTestClasses.append(CpgCfgChgOnGroupLeave)
|
||||
GenTestClasses.append(CpgCfgChgOnNodeLeave)
|
||||
GenTestClasses.append(CpgCfgChgOnNodeIsolate)
|
||||
GenTestClasses.append(CpgCfgChgOnNodeRestart)
|
||||
GenTestClasses.append(CpgCfgChgOnLowestNodeJoin)
|
||||
GenTestClasses.append(VoteQuorumGoDown)
|
||||
GenTestClasses.append(VoteQuorumGoUp)
|
||||
|
Loading…
Reference in New Issue
Block a user