Revision 93f2399e
b/lib/cli.py | ||
---|---|---|
92 | 92 |
"DEFAULT_IALLOCATOR_OPT", |
93 | 93 |
"IDENTIFY_DEFAULTS_OPT", |
94 | 94 |
"IGNORE_CONSIST_OPT", |
95 |
"IGNORE_ERRORS_OPT", |
|
95 | 96 |
"IGNORE_FAILURES_OPT", |
96 | 97 |
"IGNORE_OFFLINE_OPT", |
97 | 98 |
"IGNORE_REMOVE_FAILURES_OPT", |
... | ... | |
1262 | 1263 |
default=None, action="append", |
1263 | 1264 |
completion_suggest=OPT_COMPL_ONE_NODEGROUP) |
1264 | 1265 |
|
1266 |
IGNORE_ERRORS_OPT = cli_option("-I", "--ignore-errors", default=[], |
|
1267 |
action="append", dest="ignore_errors", |
|
1268 |
choices=list(constants.CV_ALL_ECODES_STRINGS), |
|
1269 |
help="Error code to be ignored") |
|
1270 |
|
|
1265 | 1271 |
|
1266 | 1272 |
#: Options provided by all commands |
1267 | 1273 |
COMMON_OPTS = [DEBUG_OPT] |
b/lib/client/gnt_cluster.py | ||
---|---|---|
502 | 502 |
error_codes=opts.error_codes, |
503 | 503 |
debug_simulate_errors=opts.simulate_errors, |
504 | 504 |
skip_checks=skip_checks, |
505 |
ignore_errors=opts.ignore_errors, |
|
505 | 506 |
group_name=opts.nodegroup) |
506 | 507 |
result = SubmitOpCode(op, cl=cl, opts=opts) |
507 | 508 |
|
... | ... | |
1380 | 1381 |
"verify": ( |
1381 | 1382 |
VerifyCluster, ARGS_NONE, |
1382 | 1383 |
[VERBOSE_OPT, DEBUG_SIMERR_OPT, ERROR_CODES_OPT, NONPLUS1_OPT, |
1383 |
DRY_RUN_OPT, PRIORITY_OPT, NODEGROUP_OPT], |
|
1384 |
DRY_RUN_OPT, PRIORITY_OPT, NODEGROUP_OPT, IGNORE_ERRORS_OPT],
|
|
1384 | 1385 |
"", "Does a check on the cluster configuration"), |
1385 | 1386 |
"verify-disks": ( |
1386 | 1387 |
VerifyDisks, ARGS_NONE, [PRIORITY_OPT], |
b/lib/cmdlib.py | ||
---|---|---|
1496 | 1496 |
groups = self.cfg.GetNodeGroupList() |
1497 | 1497 |
|
1498 | 1498 |
# Verify global configuration |
1499 |
jobs.append([opcodes.OpClusterVerifyConfig()]) |
|
1499 |
jobs.append([ |
|
1500 |
opcodes.OpClusterVerifyConfig(ignore_errors=self.op.ignore_errors) |
|
1501 |
]) |
|
1500 | 1502 |
|
1501 | 1503 |
# Always depend on global verification |
1502 | 1504 |
depends_fn = lambda: [(-len(jobs), [])] |
1503 | 1505 |
|
1504 | 1506 |
jobs.extend([opcodes.OpClusterVerifyGroup(group_name=group, |
1505 |
depends=depends_fn())] |
|
1507 |
ignore_errors=self.op.ignore_errors, |
|
1508 |
depends=depends_fn())] |
|
1506 | 1509 |
for group in groups) |
1507 | 1510 |
|
1508 | 1511 |
# Fix up all parameters |
b/lib/opcodes.py | ||
---|---|---|
137 | 137 |
_PSkipChecks = ("skip_checks", ht.EmptyList, |
138 | 138 |
ht.TListOf(ht.TElemOf(constants.VERIFY_OPTIONAL_CHECKS)), |
139 | 139 |
"Which checks to skip") |
140 |
_PIgnoreErrors = ("ignore_errors", ht.EmptyList, |
|
141 |
ht.TListOf(ht.TElemOf(constants.CV_ALL_ECODES_STRINGS)), |
|
142 |
"List of error codes that should be treated as warnings") |
|
140 | 143 |
|
141 | 144 |
#: OP_ID conversion regular expression |
142 | 145 |
_OPID_RE = re.compile("([a-z])([A-Z])") |
... | ... | |
613 | 616 |
_PDebugSimulateErrors, |
614 | 617 |
_PErrorCodes, |
615 | 618 |
_PSkipChecks, |
619 |
_PIgnoreErrors, |
|
616 | 620 |
_PVerbose, |
617 | 621 |
("group_name", None, ht.TMaybeString, "Group to verify") |
618 | 622 |
] |
... | ... | |
626 | 630 |
OP_PARAMS = [ |
627 | 631 |
_PDebugSimulateErrors, |
628 | 632 |
_PErrorCodes, |
633 |
_PIgnoreErrors, |
|
629 | 634 |
_PVerbose, |
630 | 635 |
] |
631 | 636 |
OP_RESULT = ht.TBool |
... | ... | |
647 | 652 |
_PDebugSimulateErrors, |
648 | 653 |
_PErrorCodes, |
649 | 654 |
_PSkipChecks, |
655 |
_PIgnoreErrors, |
|
650 | 656 |
_PVerbose, |
651 | 657 |
] |
652 | 658 |
OP_RESULT = ht.TBool |
Also available in: Unified diff