2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 01:26:38 +00:00

Fix issue that site.master is not set

This commit is contained in:
ertaozh 2019-03-12 05:35:35 -04:00
parent 08fa85804d
commit d6b418bfb0
2 changed files with 8 additions and 0 deletions

View File

@ -555,6 +555,10 @@ sub get_ServiceNode
{
push @{ $snhash{$master} }, $node;
}
else
{
xCAT::MsgUtils->message('SW', "Unknown master for node: $node, neither noderes.servicenode nor site.master is set\n");
}
}
}

View File

@ -2283,6 +2283,10 @@ sub dispatch_request {
$SIG{CHLD} = 'DEFAULT';
xCAT::MsgUtils->trace(0, "D", "xcatd: handle request '$req->{command}->[0]' by plugin '$modname''s preprocess_request");
$reqs = ${ "xCAT_plugin::" . $modname . "::" }{preprocess_request}->($req, $dispatch_cb, \&do_request);
if (not(scalar @$reqs) and not(defined xCAT::TableUtils->get_site_attribute('master'))) {
$dispatch_cb->({ error => ['No site.master set, please check'], errorcode => [1] });
return;
}
} else { # otherwise, pass it in without hierarchy support
$reqs = [$req];
}