mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-28 15:21:11 +00:00
Print a more user friendly message when running makeconfluentcfg
if the confluent daemon is not running. Bug #4705
This commit is contained in:
@@ -87,7 +87,7 @@ sub ssl_connect {
|
||||
}
|
||||
$self->{handle} = IO::Socket::SSL->new(%sslargs);
|
||||
unless ($self->{handle}) {
|
||||
die "Unable to reach target, $SSL_ERROR/$!";
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ sub new {
|
||||
$self->{handle} = $self->ssl_connect($serverlocation, @_);
|
||||
}
|
||||
unless ($self->{handle}) {
|
||||
die "General failure connecting $!";
|
||||
return undef;
|
||||
}
|
||||
$self->{server} = Confluent::TLV->new($self->{handle});
|
||||
my $banner = $self->{server}->recv();
|
||||
|
@@ -201,6 +201,13 @@ sub makeconfluentcfg {
|
||||
my $svboot=0;
|
||||
if (exists($req->{svboot})) { $svboot=1;}
|
||||
my $confluent = Confluent::Client->new(); # just the local form for now..
|
||||
unless ($confluent) {
|
||||
# unable to get a connection to confluent
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "Unable to open a connection to confluent, verify that confluent is running.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $cb);
|
||||
return;
|
||||
}
|
||||
|
||||
my $isSN=xCAT::Utils->isServiceNode();
|
||||
my @hostinfo=xCAT::NetworkUtils->determinehostname();
|
||||
|
Reference in New Issue
Block a user