From cadf5c60e1aabfa8c06706a98546617660b2ec62 Mon Sep 17 00:00:00 2001 From: chenglch Date: Wed, 29 Nov 2017 17:18:39 +0800 Subject: [PATCH] Listen on 0.0.0.0 instead of the hostname This patch modify the configuration of `makegocons` and `rcons` for goconserver. `cat /etc/goconserver/server.conf` ``` global: host: 0.0.0.0 ssl_key_file: /etc/xcat/cert/server-key.pem ssl_cert_file: /etc/xcat/cert/server-cert.pem ssl_ca_cert_file: /etc/xcat/cert/ca.pem logfile: /var/log/goconserver/server.log api: port: 12429 console: port: 12430 ``` --- xCAT-client/bin/rcons | 3 ++- xCAT-server/lib/xcat/plugins/goconserver.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-client/bin/rcons b/xCAT-client/bin/rcons index 63c9bbe63..4a2dc090b 100755 --- a/xCAT-client/bin/rcons +++ b/xCAT-client/bin/rcons @@ -149,7 +149,8 @@ elif [ $USE_GOCONSERVER == "1" ]; then CONGO_SSL_CERT=$HOME/.xcat/client-cred.pem \ CONGO_SSL_CA_CERT=$HOME/.xcat/ca.pem \ CONGO_PORT=12430 \ - CONGO_SERVER_HOST=$CONSERVER" + CONGO_SERVER_HOST=$CONSERVER \ + CONGO_URL=https://$CONSERVER:12429" if [ "$CONSERVER" == `hostname` ]; then exec env $CONGO_ENV /usr/bin/congo console $1 diff --git a/xCAT-server/lib/xcat/plugins/goconserver.pm b/xCAT-server/lib/xcat/plugins/goconserver.pm index 7dd9aac01..36c882516 100644 --- a/xCAT-server/lib/xcat/plugins/goconserver.pm +++ b/xCAT-server/lib/xcat/plugins/goconserver.pm @@ -324,7 +324,7 @@ sub start_goconserver { xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) { my $config= "global:\n". - " host: $host\n". + " host: 0.0.0.0\n". " ssl_key_file: /etc/xcat/cert/server-key.pem\n". " ssl_cert_file: /etc/xcat/cert/server-cert.pem\n". " ssl_ca_cert_file: /etc/xcat/cert/ca.pem\n".