When precreatemypostscripts=1 and attempting to use an "end" prescript for
nodeset <noderange> osimage, the xbna plugin spits out an error.
However when prescreatemypostscript = 0, the Error does not occur.</noderange>
Here is the "end" script being called
/install/prescripts/osimage-end:
# #!/bin/bash
# echo Hello
# #updatenode $NODES -g
With precreatemypostscripts = 1:
nodeset c103n30 osimage=v5.4.8-dl-compute
c103n30: netboot centos5.4-kernel_three-seven-one-x86_64-v5.4.8-dl-compute
Error: xnba plugin bug, pid 11411, process description: 'xCATd SSL: nodeset to c103n30 for root@localhost: xnba instance: prescripts instance' with error 'Died at /opt/xcat/sbin/xcatd line 1464, <$parfd> line 1.
' while trying to fulfill request for the following nodes: c103n30
With precreatemypostscripts= 0:
nodeset c103n30 osimage=v5.4.8-dl-compute
c103n30: netboot centos5.4-kernel_three-seven-one-x86_64-v5.4.8-dl-compute
servicefarm03-hc: Running end script osimage-end for nodes c103n30.
servicefarm03-hc: osimage-end: Hello
Just realized I selected the wrong version. This is bug is actually in 2.8.4.
Diff:
What concerns me is in you end script you have
updatenode $NODES -g that regenerates the mypostscripts file. That looks like it is commented out.
When you run nodeset it regenerated the mypostscripts file with precreatemypostscripts=1
I can take this defect I am working in the area. Ii would like to see you working 100% on Redhat 7 testing and fixes.
Last edit: Lissa Valletta 2014-02-26
There is a bug with precreatemypostscripts which sometimes does not correctly set the NODESTATESTATUS variable during a nodeset.
It was recommended to run "updatenode <node range=""> -g" to work around this issue, so I wanted to do it via an "end" prescript.. When it failed I commented it out and added the echo Hello as a test.</node>
However that is not the issue of this bug.. Issue is that "end" prescripts cause and error with xnba when precreatemypostscripts is enabled.
Sent from my iPhone
On Feb 26, 2014, at 4:29 AM, "Lissa Valletta" lissav@users.sf.netamp#108;amp#105;amp#115;amp#115;amp#97;amp#118;amp#64;amp#117;amp#115;amp#101;amp#114;amp#115;amp#46;amp#115;amp#102;amp#46;amp#110;amp#101;amp#116; wrote:
What concerns me is in you end script you have
updatenode $NODES -g that regenerates the mypostscripts file. That looks like it is commented out.
When you run nodeset it regenerated the mypostscripts file with precreatemypostscripts=1
What build of
[bugs:#3998]http://sourceforge.net/p/xcat/bugs/3998/ xnba plugin bug + precreatemypostscripts + prescript end
Status: open
Created: Wed Feb 26, 2014 05:09 AM UTC by Jason
Last Updated: Wed Feb 26, 2014 05:23 AM UTC
Owner: yangsong
When precreatemypostscripts=1 and attempting to use an "end" prescript for
nodeset osimage, the xbna plugin spits out an error.
However when prescreatemypostscript = 0, the Error does not occur.
Here is the "end" script being called
/install/prescripts/osimage-end:
!/bin/bash
echo Hello
updatenode $NODES -g
With precreatemypostscripts = 1:
nodeset c103n30 osimage=v5.4.8-dl-compute
c103n30: netboot centos5.4-kernel_three-seven-one-x86_64-v5.4.8-dl-compute
Error: xnba plugin bug, pid 11411, process description: 'xCATd SSL: nodeset to c103n30 for root@localhost: xnba instance: prescripts instance' with error 'Died at /opt/xcat/sbin/xcatd line 1464, <$parfd> line 1.
' while trying to fulfill request for the following nodes: c103n30
With precreatemypostscripts= 0:
nodeset c103n30 osimage=v5.4.8-dl-compute
c103n30: netboot centos5.4-kernel_three-seven-one-x86_64-v5.4.8-dl-compute
servicefarm03-hc: Running end script osimage-end for nodes c103n30.
servicefarm03-hc: osimage-end: Hello
Sent from sourceforge.nethttp://sourceforge.net because you indicated interest in https://sourceforge.net/p/xcat/bugs/3998/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Bugs: #3998
yes we know about the problem with precreatemypostscripts which sometimes does not correctly set the NODESTATESTATUS variable during a nodeset. Linda is investigating it. It has to do with chaining . This is also a good bug, but not related to Rehat7 testing.
Diff:
If we uncommented updatenode $NODES -g then it would regenerate the mypostscripts file. But since this is a plugin should not be making an runxcmd call instead.
I spent several hours working on this problem, and have been able to consistently recreate it.
xCAT has woven a very complicated web of xcatd->plugin->xcatd->plugin->... set of calls in this situation, often forking new processes along the way. Turns out the problem stems from the lifetime/scope of some package variables in xnba.pm (specifically $callback in this case, but there may be others).
What is happening is that xnba.pm is initially loaded to handle the nodeset processing. It in turn calls destiny.pm(setdestiny) to do some of its work, which then calls the precreatepostscripts processing, which in turn loads (through perl REQUIRE) xnba.pm again to determine the current nodesetstate, and it seems some of the xnba.pm perl package variables from the original load are wiped out at that point. Then in later processing, the original xnba tries to use $callback to return messages to the user and dies because this variable no longer has a valid function pointer in it.
I am investigating a couple of different options to fix the code. Also, it turns out some other plugins such as pxe.pm, yaboot.pm, and possibly others, have the same problem.
Finally, this may also be the cause of the original nodesetstate problem Jason was seeing in his postscripts, that we thought might be related to the chain table traversal. It seems a similar processing path may be occurring.
I will post more as I gather more info and come up with a firm solution.
changed the file variables to globals.
unit test seems to work. Hopefully this will fix the problem. Also, let me know if this fixes the other nodesetstate problem you were having. I think it might.
xCAT 2.8.4: commit 165abd4f88101d5219cd750be5af5986b086bd6e
xCAT 2.9: commit e75be5fe886085a25425e381addcfa232cc927e9