From bb20b69a88b02a4bc54a4b49d61871b32100e0f6 Mon Sep 17 00:00:00 2001 From: ligc Date: Sat, 5 Jan 2013 07:39:45 +0000 Subject: [PATCH] add warning message with nodeset install/netboot/statelite for RHEL, CentOS, Fedora, SLES and Debian/Ubuntu git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14753 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 34 ++++++++++++++++++++++++ xCAT-server/lib/xcat/plugins/debian.pm | 32 ++++++++++++++++++++++ xCAT-server/lib/xcat/plugins/sles.pm | 34 ++++++++++++++++++++++++ 3 files changed, 100 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 3a9fe1100..02b67795f 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -220,6 +220,23 @@ sub mknetboot } #my $addkcmdhash = # $bptab->getNodesAttribs(\@nodes, ['addkcmdline']); + + # Warning message for nodeset install/netboot/statelite + foreach my $knode (keys %oents) + { + my $ent = $oents{$knode}->[0]; + if ($ent && $ent->{provmethod} + && (($ent->{provmethod} eq 'install') || ($ent->{provmethod} eq 'netboot') || ($ent->{provmethod} eq 'statelite'))) + { + $callback->( + { + warning => ["The options \"install\", \"netboot\", and \"statelite\" have been deprecated. They should continue to work in this release, but have not been tested as carefully, and some new functions are not available with these options. For full function and support, use \"nodeset osimage=\" instead."], + } + ); + # Do not print this warning message multiple times + last; + } + } foreach my $node (@nodes) { my $osver; @@ -907,6 +924,23 @@ sub mkinstall #my $addkcmdhash = # $bptab->getNodesAttribs(\@nodes, ['addkcmdline']); require xCAT::Template; + + # Warning message for nodeset install/netboot/statelite + foreach my $knode (keys %osents) + { + my $ent = $osents{$knode}->[0]; + if ($ent && $ent->{provmethod} + && (($ent->{provmethod} eq 'install') || ($ent->{provmethod} eq 'netboot') || ($ent->{provmethod} eq 'statelite'))) + { + $callback->( + { + warning => ["The options \"install\", \"netboot\", and \"statelite\" have been deprecated. They should continue to work in this release, but have not been tested as carefully, and some new functions are not available with these options. For full function and support, use \"nodeset osimage=\" instead."], + } + ); + # Do not print this warning message multiple times + last; + } + } foreach $node (@nodes) { my $os; diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 046a6d8f8..4e38f379a 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -418,6 +418,22 @@ sub mkinstall #my $addkcmdhash = # $bptab->getNodesAttribs(\@nodes, ['addkcmdline']); require xCAT::Template; + # Warning message for nodeset install/netboot/statelite + foreach my $knode (keys %osents) + { + my $ent = $osents{$knode}->[0]; + if ($ent && $ent->{provmethod} + && (($ent->{provmethod} eq 'install') || ($ent->{provmethod} eq 'netboot') || ($ent->{provmethod} eq 'statelite'))) + { + $callback->( + { + warning => ["The options \"install\", \"netboot\", and \"statelite\" have been deprecated. They should continue to work in this release, but have not been tested as carefully, and some new functions are not available with these options. For full function and support, use \"nodeset osimage=\" instead."], + } + ); + # Do not print this warning message multiple times + last; + } + } foreach $node (@nodes) { my $os; @@ -864,6 +880,22 @@ sub mknetboot } #my $addkcmdhash = # $bptab->getNodesAttribs(\@nodes, ['addkcmdline']); + # Warning message for nodeset install/netboot/statelite + foreach my $knode (keys %oents) + { + my $ent = $oents{$knode}->[0]; + if ($ent && $ent->{provmethod} + && (($ent->{provmethod} eq 'install') || ($ent->{provmethod} eq 'netboot') || ($ent->{provmethod} eq 'statelite'))) + { + $callback->( + { + warning => ["The options \"install\", \"netboot\", and \"statelite\" have been deprecated. They should continue to work in this release, but have not been tested as carefully, and some new functions are not available with these options. For full function and support, use \"nodeset osimage=\" instead."], + } + ); + # Do not print this warning message multiple times + last; + } + } foreach my $node (@nodes) { my $osver; diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index de10f9477..82973ee31 100644 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -100,6 +100,22 @@ sub mknetboot my $reshash = $restab->getNodesAttribs(\@nodes, ['primarynic', 'tftpserver', 'tftpdir', 'xcatmaster', 'nfsserver', 'nfsdir', 'installnic']); my %donetftp=(); + # Warning message for nodeset install/netboot/statelite + foreach my $knode (keys %{$ntents}) + { + my $ent = $ntents->{$knode}->[0]; + if ($ent && $ent->{provmethod} + && (($ent->{provmethod} eq 'install') || ($ent->{provmethod} eq 'netboot') || ($ent->{provmethod} eq 'statelite'))) + { + $callback->( + { + warning => ["The options \"install\", \"netboot\", and \"statelite\" have been deprecated. They should continue to work in this release, but have not been tested as carefully, and some new functions are not available with these options. For full function and support, use \"nodeset osimage=\" instead."], + } + ); + # Do not print this warning message multiple times + last; + } + } foreach my $node (@nodes) { my $osver; @@ -677,6 +693,24 @@ sub mkinstall require xCAT::Template; #only used here, load so memory can be COWed # Define a variable for driver update list my @dd_drivers; + + # Warning message for nodeset install/netboot/statelite + foreach my $knode (keys %{$ntents}) + { + my $ent = $ntents->{$knode}->[0]; + if ($ent && $ent->{provmethod} + && (($ent->{provmethod} eq 'install') || ($ent->{provmethod} eq 'netboot') || ($ent->{provmethod} eq 'statelite'))) + { + $callback->( + { + warning => ["The options \"install\", \"netboot\", and \"statelite\" have been deprecated. They should continue to work in this release, but have not been tested as carefully, and some new functions are not available with these options. For full function and support, use \"nodeset osimage=\" instead."], + } + ); + # Do not print this warning message multiple times + last; + } + } + foreach $node (@nodes) { my $os;