From f7ae606485c80b9876fa71e02ca280fff5b3d6b0 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Sat, 26 Oct 2013 00:17:42 +0800 Subject: [PATCH 01/17] fixing bug 3821 give better description for chkkitcomp --- xCAT-client/pods/man1/chkkitcomp.1.pod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-client/pods/man1/chkkitcomp.1.pod b/xCAT-client/pods/man1/chkkitcomp.1.pod index e4c220523..b25c80e3b 100644 --- a/xCAT-client/pods/man1/chkkitcomp.1.pod +++ b/xCAT-client/pods/man1/chkkitcomp.1.pod @@ -12,6 +12,8 @@ B [B<-V>|B<--verbose>] B<-i> I I The B command will check if the kit components are compatible with the xCAT osimage. This command will if the kitcompname_list provided on the command line is compatible with the osimage. +This command will ignore the current osimage.kitcomponents setting, and just to check if the kitcompname list in the cmdline are compatible with the osimage by osversion/ostype/osarch/ and kit component dependencies. + Note: The xCAT support for Kits is only available for Linux operating systems. =head1 OPTIONS From 0ffc189feecced42b52c850d0b5cfe4165419962 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Sat, 26 Oct 2013 00:19:27 +0800 Subject: [PATCH 02/17] fixing bug 3821 give better description for chkkitcomp --- xCAT-client/pods/man1/chkkitcomp.1.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-client/pods/man1/chkkitcomp.1.pod b/xCAT-client/pods/man1/chkkitcomp.1.pod index b25c80e3b..6c964ab01 100644 --- a/xCAT-client/pods/man1/chkkitcomp.1.pod +++ b/xCAT-client/pods/man1/chkkitcomp.1.pod @@ -10,7 +10,7 @@ B [B<-V>|B<--verbose>] B<-i> I I =head1 DESCRIPTION -The B command will check if the kit components are compatible with the xCAT osimage. This command will if the kitcompname_list provided on the command line is compatible with the osimage. +The B command will check if the kit components are compatible with the xCAT osimage. This command will ignore the current osimage.kitcomponents setting, and just to check if the kitcompname list in the cmdline are compatible with the osimage by osversion/ostype/osarch/ and kit component dependencies. From fbc44597cad6f6a3f5d6da8ef59e43015ad22ad5 Mon Sep 17 00:00:00 2001 From: jjhua Date: Sun, 27 Oct 2013 16:16:57 -0400 Subject: [PATCH 03/17] remove the print Dumper() --- xCAT-OpenStack/lib/perl/xCAT/Cloud.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-OpenStack/lib/perl/xCAT/Cloud.pm b/xCAT-OpenStack/lib/perl/xCAT/Cloud.pm index 72b71d844..cb9ae9f50 100644 --- a/xCAT-OpenStack/lib/perl/xCAT/Cloud.pm +++ b/xCAT-OpenStack/lib/perl/xCAT/Cloud.pm @@ -128,7 +128,7 @@ sub getcloudres my $clients = shift; my $cloudres; my $cloudlist; - my $repos;use Data::Dumper; print Dumper($cloudinfo_hash); + my $repos; if( @$clients == 0 ) { #This should not be a chef-server, and it's a chef-client if( defined($cloudinfo_hash) && defined($cloudinfo_hash->{$node}) ) { From b44b1bbd6e2c75e3d62b3dbe24f1d0e477737357 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 27 Oct 2013 11:08:20 -0400 Subject: [PATCH 04/17] Tolerate and amend host definitions in SVC removing hard requirement for host names to match svc and xCAT --- xCAT-server/lib/xcat/plugins/svc.pm | 58 ++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/svc.pm b/xCAT-server/lib/xcat/plugins/svc.pm index 10b2b437b..3d0185338 100644 --- a/xCAT-server/lib/xcat/plugins/svc.pm +++ b/xCAT-server/lib/xcat/plugins/svc.pm @@ -76,8 +76,8 @@ sub mkstorage { } my $lun = create_lun(controller=>$controller, size=>$size, pool=>$pool); my $wwns = get_wwns(@nodes); - makehosts($wwns, controller=>$controller, cfg=>$storents); - bindhosts(\@nodes, $lun, controller=>$controller); + my @names = makehosts($wwns, controller=>$controller, cfg=>$storents); + bindhosts(\@names, $lun, controller=>$controller); } else { foreach my $node (@nodes) { mkstorage_single(node=>$node, size=>$size, pool=>$pool, @@ -119,11 +119,47 @@ sub bindhosts { } } +sub fixup_host { + my $session = shift; + my $wwnlist = shift; + my @hosts = hashifyoutput($session->cmd("lshost -delim :")); + my %wwnmap; + my %hostmap; + foreach my $host (@hosts) { + my @hostd = $session->cmd("lshost -delim : ".$host->{name}); + foreach my $hdatum (@hostd) { + if ($hdatum =~ m/^WWPN:(.*)$/) { + $wwnmap{$1} = $host->{name}; + $hostmap{$host->{name}}->{$1} = 1; + } + } + } + my $name; + foreach my $wwn (@$wwnlist) { + $wwn =~ s/://g; + $wwn = uc($wwn); + if (defined $wwnmap{$wwn}) { # found the matching host + #we want to give the host all the ports that may be relevant + $name = $wwnmap{$wwn}; + foreach my $mwwn (@$wwnlist) { + $mwwn =~ s/://g; + $mwwn = uc($mwwn); + if (not defined $hostmap{$name}->{$mwwn}) { + $session->cmd("addhostport -hbawwpn $mwwn -force $name"); + } + } + return $name; + } + } + die "unable to find host to fixup"; +} + sub makehosts { my $wwnmap = shift; my %args = @_; my $session = establish_session(%args); my $stortab = xCAT::Table->new('storage'); + my @hosts; foreach my $node (keys %$wwnmap) { my $wwnstr = ""; foreach my $wwn (@{$wwnmap->{$node}}) { @@ -134,7 +170,18 @@ sub makehosts { #TODO: what if the given wwn exists, but *not* as the nodename we want #the correct action is to look at hosts, see if one exists, and reuse, #create, or warn depending - $session->cmd("mkhost -name $node -fcwwpn $wwnstr -force"); + my @hostres = $session->cmd("mkhost -name $node -hbawwpn $wwnstr -force"); + my $result = $hostres[0]; + if ($result =~ m/^CMM/) { # we have some exceptional case.... + if ($result =~ m/^CMMVC6035E/) { #duplicate name and/or wwn.. + #need to finde the host and massage it to being viable + push @hosts, fixup_host($session, $wwnmap->{$node}); + } else { + die $result." while trying to create host"; + } + } else { + push @hosts, $node; + } my @currentcontrollers = split /,/, $args{cfg}->{$node}->[0]->{controller}; if ($args{cfg}->{$node}->[0] and $args{cfg}->{$node}->[0]->{controller}) { @currentcontrollers = split /,/, $args{cfg}->{$node}->[0]->{controller}; @@ -148,6 +195,7 @@ sub makehosts { my $ctrstring = join ",", @currentcontrollers; $stortab->setNodeAttribs($node,{controller=>$ctrstring}); } + return @hosts; } my %wwnmap; @@ -293,8 +341,8 @@ sub mkstorage_single { } my $lun = create_lun(controller=>$controller, size=>$size, pool=>$pool); my $wwns = get_wwns($node); - makehosts($wwns, controller=>$controller, cfg=>{$node=>$cfg}); - bindhosts([$node], $lun, controller=>$controller); + my @names = makehosts($wwns, controller=>$controller, cfg=>{$node=>$cfg}); + bindhosts(\@names, $lun, controller=>$controller); } sub process_request { From 2aaeb87959fde184de10bdc3511cd84c97072cb1 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 27 Oct 2013 11:17:50 -0400 Subject: [PATCH 05/17] Fix shared mkstorage to actually function correctly in svc --- xCAT-server/lib/xcat/plugins/svc.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/svc.pm b/xCAT-server/lib/xcat/plugins/svc.pm index 3d0185338..196efe594 100644 --- a/xCAT-server/lib/xcat/plugins/svc.pm +++ b/xCAT-server/lib/xcat/plugins/svc.pm @@ -115,7 +115,7 @@ sub bindhosts { #TODO: get what failure looks like... somehow... #I guess I could make something with mismatched name and see how it #goes - $session->cmd("mkvdiskhostmap -host $node ".$lun->{id}); + $session->cmd("mkvdiskhostmap -force -host $node ".$lun->{id}); } } From 1e8ebff8ac395f76852845dfc88379751c40cbd6 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 27 Oct 2013 14:51:20 -0400 Subject: [PATCH 06/17] Add lsstorage command to the svc plugin --- xCAT-server/lib/xcat/plugins/svc.pm | 46 ++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/svc.pm b/xCAT-server/lib/xcat/plugins/svc.pm index 196efe594..d428c5f3c 100644 --- a/xCAT-server/lib/xcat/plugins/svc.pm +++ b/xCAT-server/lib/xcat/plugins/svc.pm @@ -20,14 +20,42 @@ my %controllersessions; sub handled_commands { return { mkstorage => "storage:type", + lsstorage => "storage:type", rmstorage => "storage:type", lspool => "storage:type", } } +sub lsstorage { + my $request = shift; + my @nodes = @{$request->{node}}; + my $storagetab = xCAT::Table->new("storage",-create=>0); + unless ($storagetab) { return; } + my $storents = $storagetab->getNodesAttribs(\@nodes,[qw/controller/]); + my $wwns = get_wwns(@nodes); + foreach my $node (@nodes) { + if ($storents and $storents->{$node} and $storents->{$node}->[0]->{controller}) { + my $ctls = $storents->{$node}->[0]->{controller}; + foreach my $ctl (split /,/, $ctls) { # TODO: scan all controllers at once + my $session = establish_session(controller=>$ctl); + my %namemap = makehosts($wwns, controller=>$ctl, cfg=>$storents); + my @vdisks = hashifyoutput($session->cmd("lsvdisk -delim :")); + foreach my $vdisk (@vdisks) { + my @maps = hashifyoutput($session->cmd("lsvdiskhostmap -delim : ".$vdisk->{'id'})); + foreach my $map (@maps) { + if ($map->{host_name} eq $namemap{$node}) { + sendmsg($vdisk->{name}.': size: '.$vdisk->{capacity}.' id: '.$vdisk->{vdisk_UID},$callback,$node); + last; + } + } + } + } + } + } +} + sub mkstorage { my $request = shift; - my $ctx = shift; my @nodes = @{$request->{node}}; my $shared = 0; my $controller; @@ -76,7 +104,8 @@ sub mkstorage { } my $lun = create_lun(controller=>$controller, size=>$size, pool=>$pool); my $wwns = get_wwns(@nodes); - my @names = makehosts($wwns, controller=>$controller, cfg=>$storents); + my %namemap = makehosts($wwns, controller=>$controller, cfg=>$storents); + my @names = values %namemap; bindhosts(\@names, $lun, controller=>$controller); } else { foreach my $node (@nodes) { @@ -159,7 +188,7 @@ sub makehosts { my %args = @_; my $session = establish_session(%args); my $stortab = xCAT::Table->new('storage'); - my @hosts; + my %nodenamemap; foreach my $node (keys %$wwnmap) { my $wwnstr = ""; foreach my $wwn (@{$wwnmap->{$node}}) { @@ -175,12 +204,12 @@ sub makehosts { if ($result =~ m/^CMM/) { # we have some exceptional case.... if ($result =~ m/^CMMVC6035E/) { #duplicate name and/or wwn.. #need to finde the host and massage it to being viable - push @hosts, fixup_host($session, $wwnmap->{$node}); + $nodenamemap{$node} = fixup_host($session, $wwnmap->{$node}); } else { die $result." while trying to create host"; } } else { - push @hosts, $node; + $nodenamemap{$node} = $node; } my @currentcontrollers = split /,/, $args{cfg}->{$node}->[0]->{controller}; if ($args{cfg}->{$node}->[0] and $args{cfg}->{$node}->[0]->{controller}) { @@ -195,7 +224,7 @@ sub makehosts { my $ctrstring = join ",", @currentcontrollers; $stortab->setNodeAttribs($node,{controller=>$ctrstring}); } - return @hosts; + return %nodenamemap; } my %wwnmap; @@ -341,7 +370,8 @@ sub mkstorage_single { } my $lun = create_lun(controller=>$controller, size=>$size, pool=>$pool); my $wwns = get_wwns($node); - my @names = makehosts($wwns, controller=>$controller, cfg=>{$node=>$cfg}); + my %namemap = makehosts($wwns, controller=>$controller, cfg=>{$node=>$cfg}); + my @names = values %namemap; bindhosts(\@names, $lun, controller=>$controller); } @@ -351,6 +381,8 @@ sub process_request { $dorequest = shift; if ($request->{command}->[0] eq 'mkstorage') { mkstorage($request); + } elsif ($request->{command}->[0] eq 'lsstorage') { + lsstorage($request); } elsif ($request->{command}->[0] eq 'lspool') { lsmdiskgrp($request); } From dc9dd79a5b1521c808dc81b3811ec12b06420e41 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 27 Oct 2013 15:16:14 -0400 Subject: [PATCH 07/17] Add ability to request a specific name when doing mkstorage --- xCAT-server/lib/xcat/plugins/svc.pm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/svc.pm b/xCAT-server/lib/xcat/plugins/svc.pm index d428c5f3c..c12b386f2 100644 --- a/xCAT-server/lib/xcat/plugins/svc.pm +++ b/xCAT-server/lib/xcat/plugins/svc.pm @@ -65,12 +65,14 @@ sub mkstorage { unless (ref $request->{arg}) { die "TODO: usage"; } + my $name; @ARGV = @{$request->{arg}}; unless (GetOptions( 'shared' => \$shared, 'controller=s' => \$controller, 'boot' => \$boot, 'size=f' => \$size, + 'name=s' => \$name, 'pool=s' => \$pool, )) { foreach (@nodes) { @@ -102,7 +104,9 @@ sub mkstorage { unless (defined $pool and defined $controller) { return; } - my $lun = create_lun(controller=>$controller, size=>$size, pool=>$pool); + my %lunargs = (controller=>$controller, size=>$size, pool=>$pool); + if ($name) { $lunargs{name} = $name; } + my $lun = create_lun(%lunargs); my $wwns = get_wwns(@nodes); my %namemap = makehosts($wwns, controller=>$controller, cfg=>$storents); my @names = values %namemap; @@ -110,7 +114,7 @@ sub mkstorage { } else { foreach my $node (@nodes) { mkstorage_single(node=>$node, size=>$size, pool=>$pool, - boot=>$boot, controller=>$controller, + boot=>$boot, name=>$name, controller=>$controller, cfg=>$storents->{$node}); } } @@ -293,7 +297,11 @@ sub create_lun { my $session = establish_session(%args); my $pool = $args{pool}; my $size = $args{size}; - my @result = $session->cmd("mkvdisk -iogrp io_grp0 -mdiskgrp $pool -size $size -unit gb"); + my $cmd="mkvdisk -iogrp io_grp0 -mdiskgrp $pool -size $size -unit gb"; + if ($args{name}) { + $cmd .= " -name ".$args{name}; + } + my @result = $session->cmd($cmd); if ($result[0] =~ m/Virtual Disk, id \[(\d*)\], successfully created/) { my $diskid = $1; my $name; @@ -368,7 +376,11 @@ sub mkstorage_single { $controller = $cfg->{controller}; $controller =~ s/.*,//; } - my $lun = create_lun(controller=>$controller, size=>$size, pool=>$pool); + my %lunargs = (controller=>$controller, size=>$size, pool=>$pool); + if ($args{name}) { + $lunargs{name} = $args{name}."-".$node; + } + my $lun = create_lun(%lunargs); my $wwns = get_wwns($node); my %namemap = makehosts($wwns, controller=>$controller, cfg=>{$node=>$cfg}); my @names = values %namemap; From 7cab5a1f4172b6e5ce5a74c5aa35002a64de9f0e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 27 Oct 2013 15:22:50 -0400 Subject: [PATCH 08/17] Have mkstorage report the volumes created. --- xCAT-server/lib/xcat/plugins/svc.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/svc.pm b/xCAT-server/lib/xcat/plugins/svc.pm index c12b386f2..304db92fb 100644 --- a/xCAT-server/lib/xcat/plugins/svc.pm +++ b/xCAT-server/lib/xcat/plugins/svc.pm @@ -107,6 +107,7 @@ sub mkstorage { my %lunargs = (controller=>$controller, size=>$size, pool=>$pool); if ($name) { $lunargs{name} = $name; } my $lun = create_lun(%lunargs); + sendmsg($lun->{name}.": id: ".$lun->{wwn},$callback); my $wwns = get_wwns(@nodes); my %namemap = makehosts($wwns, controller=>$controller, cfg=>$storents); my @names = values %namemap; @@ -381,6 +382,7 @@ sub mkstorage_single { $lunargs{name} = $args{name}."-".$node; } my $lun = create_lun(%lunargs); + sendmsg($lun->{name}.": id: ".$lun->{wwn},$callback,$node); my $wwns = get_wwns($node); my %namemap = makehosts($wwns, controller=>$controller, cfg=>{$node=>$cfg}); my @names = values %namemap; From bd899691b0da6b1ffea5c16d21328590aa62fb04 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 27 Oct 2013 16:23:52 -0400 Subject: [PATCH 09/17] Add detachstorage call to svc plugin --- xCAT-server/lib/xcat/plugins/svc.pm | 38 ++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/svc.pm b/xCAT-server/lib/xcat/plugins/svc.pm index 304db92fb..6bd4f6900 100644 --- a/xCAT-server/lib/xcat/plugins/svc.pm +++ b/xCAT-server/lib/xcat/plugins/svc.pm @@ -21,11 +21,44 @@ sub handled_commands { return { mkstorage => "storage:type", lsstorage => "storage:type", + detachstorage => "storage:type", rmstorage => "storage:type", lspool => "storage:type", } } +sub detachstorage { + my $request = shift; + my @nodes = @{$request->{node}}; + my $controller; + @ARGV = @{$request->{arg}}; + unless (GetOptions( + 'controller=s' => \$controller, + )) { + foreach (@nodes) { + sendmsg([1,"Error parsing arguments"],$callback,$_); + } + } + my $storagetab = xCAT::Table->new('storage'); + my $storents = $storagetab->getNodesAttribs(\@nodes, [qw/controller/]); + unless ($controller) { + $controller = assure_identical_table_values(\@nodes, $storents, 'controller'); + } + my $volname = shift @ARGV; + my $wwns = get_wwns(@nodes); + use Data::Dumper; + my %namemap = makehosts($wwns, controller=>$controller, cfg=>$storents); + foreach my $node (keys %namemap) { + my $host = $namemap{$node}; + my $session = establish_session(controller=>$controller); + my @rets = $session->cmd("rmvdiskhostmap -host $host $volname"); + my $ret = $rets[0]; + if ($ret =~ m/^CMMVC5842E/) { + sendmsg([1,"Node not attached"],$callback,$node); + } + } +} + sub lsstorage { my $request = shift; my @nodes = @{$request->{node}}; @@ -332,7 +365,7 @@ sub assure_identical_table_values { $callback, $node); return undef; } - my $currval = $storents->{$node}->{$attribute}; + my $currval = $sent->{$attribute}; unless ($currval) { sendmsg([1, "No $attribute in arguments or table"], $callback, $node); @@ -344,6 +377,7 @@ sub assure_identical_table_values { $callback, $node); return undef; } + if (not defined $lastval) { $lastval = $currval; } } return $lastval; } @@ -397,6 +431,8 @@ sub process_request { mkstorage($request); } elsif ($request->{command}->[0] eq 'lsstorage') { lsstorage($request); + } elsif ($request->{command}->[0] eq 'detachstorage') { + detachstorage($request); } elsif ($request->{command}->[0] eq 'lspool') { lsmdiskgrp($request); } From bb351003dc13131e8a24cb67c32c608bfb955884 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 27 Oct 2013 16:39:23 -0400 Subject: [PATCH 10/17] Implement rmstorage for sc --- xCAT-server/lib/xcat/plugins/svc.pm | 50 ++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/svc.pm b/xCAT-server/lib/xcat/plugins/svc.pm index 6bd4f6900..7345cf3f1 100644 --- a/xCAT-server/lib/xcat/plugins/svc.pm +++ b/xCAT-server/lib/xcat/plugins/svc.pm @@ -44,21 +44,59 @@ sub detachstorage { unless ($controller) { $controller = assure_identical_table_values(\@nodes, $storents, 'controller'); } - my $volname = shift @ARGV; + my @volnames = @ARGV; my $wwns = get_wwns(@nodes); use Data::Dumper; my %namemap = makehosts($wwns, controller=>$controller, cfg=>$storents); foreach my $node (keys %namemap) { my $host = $namemap{$node}; my $session = establish_session(controller=>$controller); - my @rets = $session->cmd("rmvdiskhostmap -host $host $volname"); - my $ret = $rets[0]; - if ($ret =~ m/^CMMVC5842E/) { - sendmsg([1,"Node not attached"],$callback,$node); + foreach my $volname (@volnames) { + my @rets = $session->cmd("rmvdiskhostmap -host $host $volname"); + my $ret = $rets[0]; + if ($ret =~ m/^CMMVC5842E/) { + sendmsg([1,"Node not attached to $volname"],$callback,$node); + } } } } +sub rmstorage { + my $request = shift; + my @nodes = @{$request->{node}}; + my $controller; + @ARGV = @{$request->{arg}}; + unless (GetOptions( + 'controller=s' => \$controller, + )) { + foreach (@nodes) { + sendmsg([1,"Error parsing arguments"],$callback,$_); + } + } + my @volnames = @ARGV; + my $storagetab = xCAT::Table->new('storage'); + my $storents = $storagetab->getNodesAttribs(\@nodes, [qw/controller/]); + unless ($controller) { + $controller = assure_identical_table_values(\@nodes, $storents, 'controller'); + } + detachstorage($request); + my $session = establish_session(controller=>$controller); + foreach my $volname (@volnames) { + my @info = $session->cmd("rmvdisk $volname"); + my $ret = $info[0]; + if ($ret =~ m/^CMMVC5753E/) { + foreach my $node (@nodes) { + sendmsg([1,"Disk $volname does not exist"], $callback, @nodes); + } + } elsif ($ret =~ m/^CMMVC5840E/) { + foreach my $node (@nodes) { + sendmsg([1,"Disk $volname is mapped to other nodes and/or busy"], $callback, @nodes); + } + } + } +} + + sub lsstorage { my $request = shift; my @nodes = @{$request->{node}}; @@ -431,6 +469,8 @@ sub process_request { mkstorage($request); } elsif ($request->{command}->[0] eq 'lsstorage') { lsstorage($request); + } elsif ($request->{command}->[0] eq 'rmstorage') { + rmstorage($request); } elsif ($request->{command}->[0] eq 'detachstorage') { detachstorage($request); } elsif ($request->{command}->[0] eq 'lspool') { From 06fe33434a94f18b3267e9037c33b562b5f16a46 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Sun, 27 Oct 2013 16:49:25 -0400 Subject: [PATCH 11/17] Fix table sourced controller pointing in *storage calls in svc --- xCAT-server/lib/xcat/plugins/svc.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/svc.pm b/xCAT-server/lib/xcat/plugins/svc.pm index 7345cf3f1..98352215b 100644 --- a/xCAT-server/lib/xcat/plugins/svc.pm +++ b/xCAT-server/lib/xcat/plugins/svc.pm @@ -445,8 +445,8 @@ sub mkstorage_single { } if (defined $args{controller}) { $controller = $args{controller}; - } elsif ($cfg->{controller}) { - $controller = $cfg->{controller}; + } elsif ($cfg->[0]->{controller}) { + $controller = $cfg->[0]->{controller}; $controller =~ s/.*,//; } my %lunargs = (controller=>$controller, size=>$size, pool=>$pool); From 428058af5a2885f8dd8ba01460743cf3440114d0 Mon Sep 17 00:00:00 2001 From: jjhua Date: Mon, 28 Oct 2013 11:02:30 -0400 Subject: [PATCH 12/17] move setup_openstack_repo from xCAT/postscripts/ to xCAT-OpenStack/postscripts, and it will be packed into xCAT-OpenStack package --- {xCAT => xCAT-OpenStack}/postscripts/setup_openstack_repo | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {xCAT => xCAT-OpenStack}/postscripts/setup_openstack_repo (100%) diff --git a/xCAT/postscripts/setup_openstack_repo b/xCAT-OpenStack/postscripts/setup_openstack_repo similarity index 100% rename from xCAT/postscripts/setup_openstack_repo rename to xCAT-OpenStack/postscripts/setup_openstack_repo From 0c7e33c045569bc5a08abc5f34fa4ff110a7fac0 Mon Sep 17 00:00:00 2001 From: yinle Date: Mon, 28 Oct 2013 06:28:45 -0700 Subject: [PATCH 13/17] Add check in configeth to give message to AIX user. --- xCAT/postscripts/configeth | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT/postscripts/configeth b/xCAT/postscripts/configeth index 356dbb872..d66ec3d15 100755 --- a/xCAT/postscripts/configeth +++ b/xCAT/postscripts/configeth @@ -314,6 +314,10 @@ if [ "$str_os_type" = "linux" ];then str_os_type="redhat" str_cfg_dir="/etc/sysconfig/network-scripts/" fi +else + echo "configeth dose not support AIX in this build" + exit 0 + fi logger -t xcat -p local4.err "configeth: os type: $str_os_type" From 8ecf88438cbb338a3ac2129c9eab1bd2be7101d6 Mon Sep 17 00:00:00 2001 From: yinle Date: Mon, 28 Oct 2013 06:33:44 -0700 Subject: [PATCH 14/17] Add check in confignics to give message to AIX user. --- xCAT/postscripts/confignics | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT/postscripts/confignics b/xCAT/postscripts/confignics index f523d9b1c..37fe95bd8 100755 --- a/xCAT/postscripts/confignics +++ b/xCAT/postscripts/confignics @@ -45,6 +45,11 @@ bool_cfg_inst_nic=0 str_inst_nic='' str_ib_nics='' str_os_type=`uname | tr 'A-Z' 'a-z'` +if [ "$str_os_type" = "aix" ];then + logger -t xcat -p local4.err "confignics: aix does not support in this build" + echo "confignics: aix does not support in this build" + exit 0 +fi bool_remove=0 num_iba_ports= str_all_nics='' From 3be3d26ac392e24cf0420658dd2c5c58a613d7d4 Mon Sep 17 00:00:00 2001 From: yinle Date: Mon, 28 Oct 2013 07:27:29 -0700 Subject: [PATCH 15/17] Add lsslp support for IMM2. --- xCAT-server/lib/xcat/plugins/lsslp.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/lsslp.pm b/xCAT-server/lib/xcat/plugins/lsslp.pm index a6b3db461..74e66424e 100644 --- a/xCAT-server/lib/xcat/plugins/lsslp.pm +++ b/xCAT-server/lib/xcat/plugins/lsslp.pm @@ -525,7 +525,7 @@ sub invoke_dodiscover { if ($globalopt{service}) { $services = $globalopt{service}; } else { - $services = [WILDCARD_SERVICE,HARDWARE_SERVICE,SOFTWARE_SERVICE]; + $services = [WILDCARD_SERVICE,HARDWARE_SERVICE,SOFTWARE_SERVICE,SERVICE_IMM2]; } #efix for hmc bug if ($services =~ /hardware-management-console/) { @@ -1421,7 +1421,6 @@ sub xCATdB { my $hidden = ($type =~ /bpa|fsp/)? 1:0; my $groups = lc($type).",all"; my $tmp_pre = xCAT::data::ibmhwtypes::parse_group($model); - if (defined($tmp_pre)) { $groups .= ",$tmp_pre"; } @@ -1504,7 +1503,6 @@ sub format_stanza { if (defined($tmp_pre)) { $groups .= ",$tmp_pre"; } - ################################# # Node attributes @@ -2099,3 +2097,5 @@ sub bt_handle_new_slp_entity { $btresult{$mac} = $data; } 1; + + From ec85d061177f460c1f100c35f1e735ef325d4e0a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 28 Oct 2013 10:43:08 -0400 Subject: [PATCH 16/17] Suppress warnings about ssh/tech support shell --- xCAT-server/share/xcat/install/esxi/hypervisor.tmpl | 1 + 1 file changed, 1 insertion(+) diff --git a/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl b/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl index 0f3d2a6b2..6a200daa6 100644 --- a/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl +++ b/xCAT-server/share/xcat/install/esxi/hypervisor.tmpl @@ -52,6 +52,7 @@ echo -e "\nnextdestiny\n" | /bin/o chkconfig SSH on chkconfig ESXShell on esxcli system settings advanced set --int-value 0 --option /VMFS3/EnableBlockDelete +esxcli system settings advanced set --int-value 1 --option /UserVars/SuppressShellWarning esxcli network ip set -e y esxcli network firewall ruleset set -r DHCPv6 -e y esxcli network firewall ruleset set -r sshServer -e y From b0ddf05865bfce26d54084f462f30b4d6acc4068 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 28 Oct 2013 10:44:40 -0400 Subject: [PATCH 17/17] Fix stateless esxi warning about ssh --- xCAT-server/share/xcat/netboot/esxi/48.esxifixup | 1 + 1 file changed, 1 insertion(+) diff --git a/xCAT-server/share/xcat/netboot/esxi/48.esxifixup b/xCAT-server/share/xcat/netboot/esxi/48.esxifixup index df4500688..dc99ab1e6 100644 --- a/xCAT-server/share/xcat/netboot/esxi/48.esxifixup +++ b/xCAT-server/share/xcat/netboot/esxi/48.esxifixup @@ -1,6 +1,7 @@ #!/bin/sh #first off, let's ditch UNMAP, per vwmare's recall... localcli system settings advanced set --int-value 0 --option /VMFS3/EnableBlockDelete +localcli system settings advanced set --int-value 1 --option /UserVars/SuppressShellWarning #ok, now let's turn on some SSH and ESXShell fun localcli network firewall ruleset set -r sshServer -e y chkconfig ESXShell on