Support xdsh/xdcp to MN, MN must be defined in nodelist table and nodetype.nodetype=mn

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12467 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
lissav 2012-05-02 11:54:31 +00:00
parent 246777b976
commit 5a090a858b

View File

@ -2889,6 +2889,12 @@ sub _resolve_nodes
resolve_nodes_hash
Builds the resolved nodes hash.
Does not do much anymore because we removed address resolution from
xdsh and just let ssh do it. Stayed to preserve the logic of the old
code.
Does check if the Management Node is part of the node range and sets
localhost if it is. The MN must be defined in nodelist and with
nodetype.nodetype=mn.
Arguments:
$options - options hash table describing dsh configuration options
@ -2916,6 +2922,11 @@ sub bld_resolve_nodes_hash
{
my ($class, $options, $resolved_targets, @target_list) = @_;
# find out if we have an MN in the list, local cp and sh will be used
# not remote shell
my $tab = xCAT::Table->new('nodetype');
my $type = $tab->getNodesAttribs(\@target_list,['nodetype']);
foreach my $target (@target_list)
{
@ -2924,6 +2935,10 @@ sub bld_resolve_nodes_hash
my $localhost;
my $user;
my $context = "XCAT";
my $nodetype=$type->{$target}->[0]->{nodetype};
if ($type->{$target}->[0]->{nodetype} eq "mn") {
$localhost=$target;
}
my %properties = (
'hostname' => $hostname,
'ip-address' => $ip_address,