marsadm: warn on invalid peer names

This commit is contained in:
Thomas Schoebel-Theuer 2022-01-19 06:53:26 +01:00
parent a63998909b
commit 5dde37ab1e

View File

@ -4251,6 +4251,13 @@ sub lowlevel_ls_host_ips {
for my $path (lamport_glob("$mars/ips/ip-*")) {
$path =~ m:/ip-(.*):;
my $peer = $1;
if ($peer =~ $match_reserved_id) {
lwarn "IMPORTANT: for whatever reason, you have configured a syntactically invalid peer name '$peer' in /mars/ips/ .\n";
lwarn "IMPORTANT: 'none' or '(none)' is a reserved name with a special meaning.\n";
lwarn "IMPORTANT: please fix this by hand. I cannot know how this has happened, and the reasons.\n";
lwarn "IMPORTANT: please search mars-user-manual.pdf for cluster-wide deletions, and consult \"marsadm --help\" for commands like \"marsadm delete-file\" and sibligs.\n";
lwarn "IMPORTANT: I am now continuing at YOUR risk, but expect some SERIOUS PROBLEMS.\n";
}
my $ip = get_link($path, 1);
lprint "$peer $ip\n";
}
@ -10050,6 +10057,10 @@ marsadm [<global_options>] view[-<macroname>] [<resource_names> | all ]
--macro=<text>
Handy for testing short macro evaluations at the command line.
<hostname> =
[a-z][-a-z0-9]*
with the exception of reserved names: $reserved_names
<command> =
";
my $item_count = 0;