From 7587c3b9461ba8823cce233af089f79ed9b0e796 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Tue, 11 Oct 2016 09:08:19 -0400 Subject: [PATCH 1/5] Remove -t option for bmcdiscover and used by default --- xCAT-server/lib/xcat/plugins/bmcdiscover.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 350294aff..918423eac 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -115,7 +115,7 @@ sub bmcdiscovery_usage { push @{ $rsp->{data} }, "Usage:"; push @{ $rsp->{data} }, "\tbmcdiscover [-?|-h|--help]"; push @{ $rsp->{data} }, "\tbmcdiscover [-v|--version]"; - push @{ $rsp->{data} }, "\tbmcdiscover [-s scan_method] [-u bmc_user] [-p bmc_passwd] [-z] [-w] [-t] --range ip_range\n"; + push @{ $rsp->{data} }, "\tbmcdiscover [-s scan_method] [-u bmc_user] [-p bmc_passwd] [-z] [-w] --range ip_range\n"; push @{ $rsp->{data} }, "\tCheck BMC administrator User/Password:\n"; push @{ $rsp->{data} }, "\t\tbmcdiscover -u bmc_user -p bmc_password -i bmc_ip --check\n"; @@ -168,7 +168,6 @@ sub bmcdiscovery_processargs { 'bmcpasswd|p=s' => \$::opt_P, 'ipsource' => \$::opt_S, 'version|v' => \$::opt_v, - 't' => \$::opt_T, ); if (!$getopt_success) { @@ -935,9 +934,7 @@ sub bmcdiscovery_ipmi { } else { $ip .= ",,"; } - if ($::opt_T) { - $ip .= ",mp,bmc"; - } + $ip .= ",mp,bmc"; if ($mtm and $serial) { $node = "node-$mtm-$serial"; $node =~ s/(.*)/\L$1/g; From 6e26da06b40a759f6aa707ce889618ccb25e1047 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Tue, 11 Oct 2016 13:32:02 -0400 Subject: [PATCH 2/5] remove "-t" option from bmcdiscover doc and man page --- .../ppc64le/discovery/mtms/discovery_using_defined.rst | 2 +- .../ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst | 4 ++-- .../guides/admin-guides/references/man1/bmcdiscover.1.rst | 8 +------- xCAT-client/pods/man1/bmcdiscover.1.pod | 6 +----- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst index 7049af972..dbb5e4e92 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst @@ -31,7 +31,7 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi To discover the BMC with an IP address of 172.30.0.1, use the command: :: - bmcdiscover --range 172.30.0.1 -t -z -w + bmcdiscover --range 172.30.0.1 -z -w The discovered nodes will be written to xCAT database: :: diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst index d81c0cd5b..f3388c855 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst @@ -5,7 +5,7 @@ After environment is ready, and the server is powered, we can start server disco The following command can be used to discovery BMC within an IP range and write the discovered node definition into xCAT database:: - bmcdiscover -s nmap --range 50.0.100.1-100 -t -z -w + bmcdiscover -s nmap --range 50.0.100.1-100 -z -w The discovered BMC node will be like this:: @@ -27,7 +27,7 @@ The discovered BMC node will be like this:: 2. bmcdiscover will use username/password pair set in ``passwd`` table with **key** equal **ipmi**. If you'd like to use other username/password pair, you can use :: - bmcdiscover -s nmap --range 50.0.100.1-100 -t -z -w -u -p + bmcdiscover -s nmap --range 50.0.100.1-100 -z -w -u -p Start discovery process ----------------------- diff --git a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst index 00a06fb0c..efe3bde5b 100644 --- a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst +++ b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst @@ -23,7 +23,7 @@ SYNOPSIS \ **bmcdiscover**\ [\ **-v | -**\ **-version**\ ] -\ **bmcdiscover**\ [\ **-s**\ \ *scan_method*\ ] [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] [\ **-z**\ ] [\ **-w**\ ] [\ **-t**\ ] \ **-**\ **-range**\ \ *ip_ranges*\ +\ **bmcdiscover**\ [\ **-s**\ \ *scan_method*\ ] [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] [\ **-z**\ ] [\ **-w**\ ] \ **-**\ **-range**\ \ *ip_ranges*\ \ **bmcdiscover**\ \ **-u**\ \ *bmc_user*\ \ **-p**\ \ *bmc_passwd*\ \ **-i**\ \ *bmc_ip*\ \ **-**\ **-check**\ @@ -74,12 +74,6 @@ OPTIONS -\ **-t**\ - - Generate a BMC type node object - - - \ **-i|-**\ **-bmcip**\ BMC IP address. diff --git a/xCAT-client/pods/man1/bmcdiscover.1.pod b/xCAT-client/pods/man1/bmcdiscover.1.pod index 09abbe40c..3d4058f51 100644 --- a/xCAT-client/pods/man1/bmcdiscover.1.pod +++ b/xCAT-client/pods/man1/bmcdiscover.1.pod @@ -8,7 +8,7 @@ B [B<-?>|B<-h>|B<--help>] B [B<-v>|B<--version>] -B [B<-s> I] [B<-u> I] [B<-p> I] [B<-z>] [B<-w>] [B<-t>] B<--range> I +B [B<-s> I] [B<-u> I] [B<-p> I] [B<-z>] [B<-w>] B<--range> I B B<-u> I B<-p> I B<-i> I B<--check> @@ -45,10 +45,6 @@ List the data returned in xCAT stanza format Write to the xCAT database. -=item B<-t> - -Generate a BMC type node object - =item B<-i|--bmcip> BMC IP address. From f69ced6932d7490306cc9554f0e8711f54bfdeb0 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Tue, 11 Oct 2016 22:15:29 -0400 Subject: [PATCH 3/5] Add WARN message if it has '-t' options --- .../ppc64le/discovery/mtms/discovery_using_defined.rst | 2 +- xCAT-server/lib/xcat/plugins/bmcdiscover.pm | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst index dbb5e4e92..2a71d8087 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst @@ -27,7 +27,7 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi #. Detect the BMCs and add the node definitions into xCAT. - Use the ``bmcdiscover`` command to discover the BMCs responding over an IP range and automatically write the output into the xCAT database. You **must** use the ``-t`` option to indicate node type is bmc and the ``-w`` option to automatically write the output into the xCAT database. + Use the ``bmcdiscover`` command to discover the BMCs responding over an IP range and automatically write the output into the xCAT database. You **must** use the ``-w`` option to automatically write the output into the xCAT database. To discover the BMC with an IP address of 172.30.0.1, use the command: :: diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 918423eac..80a5cf771 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -168,6 +168,7 @@ sub bmcdiscovery_processargs { 'bmcpasswd|p=s' => \$::opt_P, 'ipsource' => \$::opt_S, 'version|v' => \$::opt_v, + 't' => \$::opt_T, ); if (!$getopt_success) { @@ -254,6 +255,13 @@ sub bmcdiscovery_processargs { return 1; } + if ($::opt_T) { + my $msg = "WARN: The -t option is deprecated and will be ignored"; + my $rsp = {}; + push @{ $rsp->{data} }, "$msg"; + xCAT::MsgUtils->message("I", $rsp, $::CALLBACK); + } + scan_process($::opt_M, $::opt_R, $::opt_Z, $::opt_W, $request_command); return 0; } From 3c98adf3d125440e051ce3224795c992d5a5e2dd Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Wed, 12 Oct 2016 10:34:35 -0400 Subject: [PATCH 4/5] more modification on discovery_using_defined.rst --- .../ppc64le/discovery/mtms/discovery_using_defined.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst index 2a71d8087..a310c908e 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst @@ -47,6 +47,7 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi postbootscripts=otherpkgs postscripts=syslog,remoteshell,syncfiles serial=10112CA + nodetype=mp #. **Pre-define** the compute nodes: @@ -68,6 +69,8 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi mgt=ipmi mtm=8247-22L serial=10112CA + nodetype=mp + hwtype=bmc #. Edit the ``predefined.stanzas`` file and change the discovered nodes to the intended ``hostname`` and ``IP address``. @@ -84,6 +87,8 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi ip=10.1.2.1 + #. Remove ``nodetype`` and ``hwtype`` from ``predefined.stanza`` file based on the MTMS mapping. + #. Repeat for additional nodes in the ``predefined.stanza`` file based on the MTMS mapping. From 6dbb558cce5129b3187f899d7266546fcd910811 Mon Sep 17 00:00:00 2001 From: Casandra Qiu Date: Wed, 12 Oct 2016 11:24:19 -0400 Subject: [PATCH 5/5] change message to W as warning message --- xCAT-server/lib/xcat/plugins/bmcdiscover.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm index 80a5cf771..ecf5449f4 100644 --- a/xCAT-server/lib/xcat/plugins/bmcdiscover.pm +++ b/xCAT-server/lib/xcat/plugins/bmcdiscover.pm @@ -256,10 +256,10 @@ sub bmcdiscovery_processargs { } if ($::opt_T) { - my $msg = "WARN: The -t option is deprecated and will be ignored"; + my $msg = "The -t option is deprecated and will be ignored"; my $rsp = {}; push @{ $rsp->{data} }, "$msg"; - xCAT::MsgUtils->message("I", $rsp, $::CALLBACK); + xCAT::MsgUtils->message("W", $rsp, $::CALLBACK); } scan_process($::opt_M, $::opt_R, $::opt_Z, $::opt_W, $request_command);