Revision 35e994e9
b/doc/hooks.rst | ||
---|---|---|
304 | 304 |
cluster verification procedure. |
305 | 305 |
|
306 | 306 |
:directory: cluster-verify |
307 |
:env. vars: CLUSTER, MASTER |
|
307 |
:env. vars: CLUSTER, MASTER, CLUSTER_TAGS, NODE_TAGS_<name>
|
|
308 | 308 |
:pre-execution: none |
309 | 309 |
:post-execution: all nodes |
310 | 310 |
|
... | ... | |
478 | 478 |
the filesystem would need a check (journal replay or full fsck) in |
479 | 479 |
order to guarantee consistency. |
480 | 480 |
|
481 |
CLUSTER_TAGS |
|
482 |
The list of cluster tags, space separated. |
|
483 |
|
|
484 |
NODE_TAGS_<name> |
|
485 |
The list of tags for node *<name>*, space separated. |
|
486 |
|
|
481 | 487 |
Examples |
482 | 488 |
-------- |
483 | 489 |
|
b/lib/cmdlib.py | ||
---|---|---|
782 | 782 |
else: |
783 | 783 |
for minor, (iname, must_exist) in drbd_map.items(): |
784 | 784 |
if minor not in used_minors and must_exist: |
785 |
feedback_fn(" - ERROR: drbd minor %d of instance %s is not active" %
|
|
786 |
(minor, iname)) |
|
785 |
feedback_fn(" - ERROR: drbd minor %d of instance %s is"
|
|
786 |
" not active" % (minor, iname))
|
|
787 | 787 |
bad = True |
788 | 788 |
for minor in used_minors: |
789 | 789 |
if minor not in drbd_map: |
790 |
feedback_fn(" - ERROR: unallocated drbd minor %d is in use" % minor) |
|
790 |
feedback_fn(" - ERROR: unallocated drbd minor %d is in use" % |
|
791 |
minor) |
|
791 | 792 |
bad = True |
792 | 793 |
|
793 | 794 |
return bad |
... | ... | |
915 | 916 |
|
916 | 917 |
""" |
917 | 918 |
all_nodes = self.cfg.GetNodeList() |
918 |
# TODO: populate the environment with useful information for verify hooks |
|
919 |
env = {} |
|
919 |
env = { |
|
920 |
"CLUSTER_TAGS": " ".join(self.cfg.GetClusterInfo().GetTags()) |
|
921 |
} |
|
922 |
for node in self.cfg.GetAllNodesInfo().values(): |
|
923 |
env["NODE_TAGS_%s" % node.name] = " ".join(node.GetTags()) |
|
924 |
|
|
920 | 925 |
return env, [], all_nodes |
921 | 926 |
|
922 | 927 |
def Exec(self, feedback_fn): |
Also available in: Unified diff