fix for bug 208749: the groups is a required attribute with mkdef to create node definitions
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4697 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
93474b3a30
commit
0d390087cf
@ -1213,6 +1213,19 @@ sub defmk
|
||||
}
|
||||
} # end - if group type
|
||||
|
||||
# If none of the attributes in nodelist is defined: groups,status,appstatus,primarysn,comments,disable
|
||||
# the nodelist table will not be updated, caused mkdef failed.
|
||||
# We give a restriction that the "groups" must be specified with mkdef.
|
||||
if (($type eq "node") && !defined($::FINALATTRS{$obj}{groups}))
|
||||
{
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] =
|
||||
"Attribute \'groups\' is not specified for node \'$obj\', skipping to the next node.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $::callback);
|
||||
$error = 1;
|
||||
next;
|
||||
}
|
||||
|
||||
#
|
||||
# Need special handling for node objects that have the
|
||||
# groups attr set - may need to create group defs
|
||||
@ -1282,15 +1295,6 @@ sub defmk
|
||||
}
|
||||
|
||||
} # end - if type = node
|
||||
# If none of the attributes in nodelist is defined: groups,status,appstatus,primarysn,comments,disable
|
||||
# the nodelist table will not be updated, caused mkdef failed.
|
||||
# We can give a restriction that the "groups" must be specified with mkdef,
|
||||
# but it is not so reasonable especially when the dynamic node group feature is implemented.
|
||||
# fixing this issue with specifying an empty "groups" if the "groups" is not specified with the command line or stanza file
|
||||
if (($type eq "node") && !defined($::FINALATTRS{$obj}{groups}))
|
||||
{
|
||||
$::FINALATTRS{$obj}{groups} = '';
|
||||
}
|
||||
|
||||
} # end of each obj
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user