Bugs item #2887320, was opened at 2009-10-28 01:38
Message generated for change (Comment added) made by ligc
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1006945&aid=2887320&group_id=208749
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: General
Group: v2.3.1
Status: Open
Resolution: Later
Priority: 5
Private: No
Submitted By: Jan Ranck-Gustafson (ranck)
Assigned to: Guang Cheng Li (ligc)
Summary: chdef doesn't check for existing postscripts before adding
Initial Comment:
xCAT build 2.3 1023
AIX 61
I have these postscripts set
> lsdef -t node -o c159f1ec01 -i name,postscripts
Object name: c159f3ec01
postscripts=syslog,aixremoteshell,otherpkgs,syncfiles,makedirs,setupntp,mount_tools
I then run this:
> chdef -t node -o c159f3ec01 -p postscripts=syslog,aixremoteshell,otherpkgs,syncfiles,configrmcnode,makedirs,setupntp,mount_tools
And the output is:
> lsdef -t node -o c159f3ec01 -i name,postscripts
Object name: c159f3ec01
postscripts=syslog,aixremoteshell,otherpkgs,syncfiles,makedirs,setupntp,mount_tools,syslog,aixremoteshell,otherpkgs,syncfiles,configrmcnode
chdef should check to see if the postscript listed to be added is already there and if so, do not add it again. As you can see, it did not duplicate
all of the postscripts I told it to add, just some of them.
----------------------------------------------------------------------
>Comment By: Guang Cheng Li (ligc)
Date: 2009-10-28 15:22
Message:
Here is what I am thinking about the changes: When setting the postscripts
into the postscripts table, check whether the postscript is already
included in xcatdefaults, if yes, then print warning message to indicate
this and does not set it into postscripts table.
[root@... ~]# tabdump postscripts
#node,postscripts,comments,disable
"xcatdefaults","syslog,remoteshell,otherpkgs,syncfiles",,
"service","servicenode",,
[root@... ~]# chdef lpar5 -p postscripts=aa,syslog,bb
Error: lpar5: postscripts 'syslog' is already included in the
'xcatdefaults'.
Object definitions have been created or modified.
[root@... ~]# tabdump postscripts
#node,postscripts,comments,disable
"xcatdefaults","syslog,remoteshell,otherpkgs,syncfiles",,
"service","servicenode",,
"lpar5","aa,bb",,
[root@... ~]#
----------------------------------------------------------------------
Comment By: Guang Cheng Li (ligc)
Date: 2009-10-28 15:15
Message:
The xCAT2.3 GA date is very close, since this is not a critical problem,
plan to fix it in xCAT 2.3.1
----------------------------------------------------------------------
Comment By: Norm Nott (nott)
Date: 2009-10-28 02:54
Message:
This happened because the list of postscripts that are run for a node are
actually stored in two different places. In the postscripts table there is
an entry for "xcatdefaults" which is the list of scripts that get run for
all nodes and there can also be a list (entry) for each specific node.
The scripts that you see repeated have now been added to both places so
they get displayed twice. It looks like the code that checks if the script
is already included for the node will have to also check the xcatdefaults
list. However I still see some potential problems with this design.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1006945&aid=2887320&group_id=208749
|