Revision fe8d2553
b/lib/cmdlib.py | ||
---|---|---|
4849 | 4849 |
def BuildHooksEnv(self): |
4850 | 4850 |
"""Build hooks env. |
4851 | 4851 |
|
4852 |
This doesn't run on the target node in the pre phase as a failed |
|
4853 |
node would then be impossible to remove. |
|
4854 |
|
|
4855 | 4852 |
""" |
4856 | 4853 |
return { |
4857 | 4854 |
"OP_TARGET": self.op.node_name, |
... | ... | |
4861 | 4858 |
def BuildHooksNodes(self): |
4862 | 4859 |
"""Build hooks nodes. |
4863 | 4860 |
|
4861 |
This doesn't run on the target node in the pre phase as a failed |
|
4862 |
node would then be impossible to remove. |
|
4863 |
|
|
4864 | 4864 |
""" |
4865 | 4865 |
all_nodes = self.cfg.GetNodeList() |
4866 | 4866 |
try: |
4867 | 4867 |
all_nodes.remove(self.op.node_name) |
4868 | 4868 |
except ValueError: |
4869 |
logging.warning("Node '%s', which is about to be removed, was not found" |
|
4870 |
" in the list of all nodes", self.op.node_name) |
|
4869 |
pass |
|
4871 | 4870 |
return (all_nodes, all_nodes) |
4872 | 4871 |
|
4873 | 4872 |
def CheckPrereq(self): |
Also available in: Unified diff