From 229432618f253f0a37ddff9e3a6c6660394409e6 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Mon, 20 Aug 2018 05:36:04 -0400 Subject: [PATCH] Add message to deprecated makeconservercf --- .../advanced/goconserver/quickstart.rst | 20 +++-- .../references/man8/makeconservercf.8.rst | 84 +++++++++---------- xCAT-client/pods/man8/makegocons.8.pod | 2 + xCAT-server/lib/xcat/plugins/conserver.pm | 3 + 4 files changed, 60 insertions(+), 49 deletions(-) diff --git a/docs/source/advanced/goconserver/quickstart.rst b/docs/source/advanced/goconserver/quickstart.rst index 53a293ce8..e53aa0ed6 100644 --- a/docs/source/advanced/goconserver/quickstart.rst +++ b/docs/source/advanced/goconserver/quickstart.rst @@ -1,20 +1,26 @@ Quickstart ========== -To enable ``goconserver``, execute the following steps: +To enable ``goconserver`` -#. Install the ``goconserver`` RPM: :: +#. For switching from ``conserver``, shall stop it first - yum install goconserver + #. stop ``conserver`` + systemctl stop conserver.service -#. If upgrading xCAT running ``conserver``, stop it first: :: + #. (Optional) for service nodes: - systemctl stop conserver.service + chdef -t group -o service setupconserver=2 + xdsh service 'systemctl stop conserver.service' -#. Start ``goconserver`` and create the console configuration files with a single command :: +#. To start and configure ``goconserver`` - makegocons + makegocons The new console logs will start logging to ``/var/log/consoles/.log`` + +#. To check the console status of nodes, use: + + makegocons -q diff --git a/docs/source/guides/admin-guides/references/man8/makeconservercf.8.rst b/docs/source/guides/admin-guides/references/man8/makeconservercf.8.rst index 105ea8367..c112313e2 100644 --- a/docs/source/guides/admin-guides/references/man8/makeconservercf.8.rst +++ b/docs/source/guides/admin-guides/references/man8/makeconservercf.8.rst @@ -27,7 +27,7 @@ SYNOPSIS \ **makeconservercf**\ [\ **-V|-**\ **-verbose**\ ] [\ **-c|-**\ **-conserver**\ ] [\ *noderange*\ ] -\ **makeconservercf**\ [\ **-V|-**\ **-verbose**\ ] \ *noderange*\ [\ **-t|-**\ **-trust**\ ] \ *hosts*\ +\ **makeconservercf**\ [\ **-V|-**\ **-verbose**\ ] \ *noderange*\ [\ **-t|-**\ **-trust**\ ] \ *hosts*\ \ **makeconservercf**\ [\ **-h|-**\ **-help|-v|-**\ **-version**\ ] @@ -58,55 +58,55 @@ OPTIONS -\ **-d|-**\ **-delete**\ - +\ **-d|-**\ **-delete**\ + Delete rather than add or refresh the nodes specified as a noderange. + - -\ **-C|-**\ **-cleanup**\ - +\ **-C|-**\ **-cleanup**\ + Remove the entries for the nodes whose definitions have been removed from xCAT db. + - -\ **-c|-**\ **-conserver**\ - +\ **-c|-**\ **-conserver**\ + Only set up the conserver on the conserver host. If no conserver host is set for nodes, the conserver gets set up only on the management node. + - -\ **-l|-**\ **-local**\ - +\ **-l|-**\ **-local**\ + Only run \ **makeconservercf**\ locally and create the local /etc/conserver.cf. The default is to also run it on all service nodes, if there are any. + - -\ **-t|-**\ **-trust**\ \ *hosts*\ - +\ **-t|-**\ **-trust**\ \ *hosts*\ + Add additional trusted hosts into /etc/conserver.cf. The \ *hosts*\ are comma separated list of ip addresses or host names. + - -\ **-v|-**\ **-version**\ - +\ **-v|-**\ **-version**\ + Display version. + - -\ **-V|-**\ **-verbose**\ - +\ **-V|-**\ **-verbose**\ + Verbose mode. + - -\ **-h|-**\ **-help**\ - +\ **-h|-**\ **-help**\ + Display usage message. - + @@ -116,11 +116,11 @@ RETURN VALUE -0. The command completed successfully. +0. The command completed successfully. -1. An error has occurred. +1. An error has occurred. @@ -132,33 +132,33 @@ EXAMPLES 1. To create conserver configuration for all the nodes. - - + + .. code-block:: perl - + makeconservercf - - + + 2. To create conserver configuration for nodes node01-node10. - - + + .. code-block:: perl - + makeconservercf node01-node10 - - + + 3. To remove conserver configuration for node01. - - + + .. code-block:: perl - + makeconservercf -d node01 - - + + diff --git a/xCAT-client/pods/man8/makegocons.8.pod b/xCAT-client/pods/man8/makegocons.8.pod index 34d1cc0cb..07b3ee25b 100644 --- a/xCAT-client/pods/man8/makegocons.8.pod +++ b/xCAT-client/pods/man8/makegocons.8.pod @@ -10,6 +10,8 @@ B [B<-V|--verbose>] [B<-C|--cleanup>] =head1 DESCRIPTION +In order to use I instead of I, reference https://xcat-docs.readthedocs.io/en/latest/advanced/goconserver/quickstart.html for more information. + The B command will start the goconserver service if it is not started, then send the REST request to create or delete the session resource in the goconserver service. The session information including the session command or ssh connection parameters (for openbmc) is generated by xcat diff --git a/xCAT-server/lib/xcat/plugins/conserver.pm b/xCAT-server/lib/xcat/plugins/conserver.pm index a8d01ddf8..220b1b56d 100644 --- a/xCAT-server/lib/xcat/plugins/conserver.pm +++ b/xCAT-server/lib/xcat/plugins/conserver.pm @@ -209,6 +209,9 @@ sub process_request { my $rsp->{data}->[0] = "goconserver is being used as the console service, did you mean: makegocons ? If not, stop goconserver and retry."; xCAT::MsgUtils->message("E", $rsp, $cb); return; + } else { + my $rsp->{data}->[0] = "makeconservercf is deprecrated as well as conserver, go to makegocons for more information about enabling goconserver."; + xCAT::MsgUtils->message("W", $rsp, $cb); } xCAT::Goconserver::switch_conserver($cb); }