Beispiel #1
0
 def run_on_all(self, op):
     '''
     In case of cloned resources, it doesn't make sense to run
     (certain) operations on just one node. So, we run them
     everywhere instead.
     For instance, some clones require quorum.
     '''
     return is_cloned(self.rscdef_node) and op in ("start", "stop")
Beispiel #2
0
 def run_on_all(self, op):
     '''
     In case of cloned resources, it doesn't make sense to run
     (certain) operations on just one node. So, we run them
     everywhere instead.
     For instance, some clones require quorum.
     '''
     return is_cloned(self.rscdef_node) and op in ("start", "stop")
Beispiel #3
0
 def set_rscenv(self, op):
     '''
     Setup the environment. Class specific.
     '''
     self.rscenv = {}
     n = self.rscdef_node
     self.timeout = get_op_timeout(n, op, "20s")
     self.rscenv["%stimeout" % self.pfx["meta_attributes"]] = str(self.timeout)
     if op == "monitor":
         self.rscenv["%sinterval" % self.pfx["meta_attributes"]] = "10000"
     if is_cloned(n):
         # some of the meta attributes for clones/ms are used
         # by resource agents
         cn = get_topmost_rsc(n)
         self.nvset2env(get_child_nvset_node(cn))
Beispiel #4
0
 def set_rscenv(self, op):
     '''
     Setup the environment. Class specific.
     '''
     self.rscenv = {}
     n = self.rscdef_node
     self.timeout = get_op_timeout(n, op, "20s")
     self.rscenv["%stimeout" % self.pfx["meta_attributes"]] = str(
         self.timeout)
     if op == "monitor":
         self.rscenv["%sinterval" % self.pfx["meta_attributes"]] = "10000"
     if is_cloned(n):
         # some of the meta attributes for clones/ms are used
         # by resource agents
         cn = get_topmost_rsc(n)
         self.nvset2env(get_child_nvset_node(cn))