diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index a41d42724..84e3c31c3 100755 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -1129,6 +1129,7 @@ site => { " consoleondemand: When set to 'yes', conserver connects and creates the console\n". " output only when the user opens the console. Default is no on\n". " Linux, yes on AIX.\n\n". + " consoleservice: The console service to be used by xCAT. Default is conserver\n\n", " httpport: The port number that the booting/installing nodes should contact the\n". " http server on the MN/SN on. It is your responsibility to configure\n". " the http server to listen on that port - xCAT will not do that.\n\n". diff --git a/xCAT-server/lib/xcat/plugins/confluent.pm b/xCAT-server/lib/xcat/plugins/confluent.pm index 26291a6d9..ae3c2aadd 100644 --- a/xCAT-server/lib/xcat/plugins/confluent.pm +++ b/xCAT-server/lib/xcat/plugins/confluent.pm @@ -97,6 +97,16 @@ sub preprocess_request { return; } + # + # check the site "consoleservice" configuration. + # 2.9.X, if not defined, do not allow makeconfluentcfg run (default is conserver) + # if defined and NOT confluent, prevent this command from running + my $consoleservice=xCAT::TableUtils->get_site_attribute("consoleservice"); + if (!$consoleservice || $consoleservice ne "confluent") { + $callback->({data=>"ERROR: confluent is not configured as the xCAT console service in the site table. \nConfigure consoleservice=confluent and install xCAT-confluent."}); + $request = {}; + return; + } # get site master my $master=xCAT::TableUtils->get_site_Master(); diff --git a/xCAT-server/lib/xcat/plugins/conserver.pm b/xCAT-server/lib/xcat/plugins/conserver.pm index 398f4bf2e..d316231d3 100644 --- a/xCAT-server/lib/xcat/plugins/conserver.pm +++ b/xCAT-server/lib/xcat/plugins/conserver.pm @@ -96,8 +96,18 @@ sub preprocess_request { $request = {}; return; } - - + + # + # check the site "consoleservice" configuration. + # 2.9.X, if not defined, default to conserver + # if defined and confluent, prevent this command from running + my $consoleservice=xCAT::TableUtils->get_site_attribute("consoleservice"); + if ($consoleservice && $consoleservice eq "confluent") { + $callback->({data=>"ERROR: confluent is configured as the xCAT console service in the site table, try makeconfluentcfg"}); + $request = {}; + return; + } + # get site master my $master=xCAT::TableUtils->get_site_Master(); if (!$master) { $master=hostname(); }