On 05/01/2014 02:26 PM, Reuti wrote:
Hi,

Am 01.05.2014 um 19:58 schrieb Michael Stauffer:

I'm trying to get some resource configurations in place during kickstart. I have the 
following in my kickstart file "replace-partition.xml". The file is run during 
kickstart: I can see output to text files when I add debugging info.

This code runs correctly if I run it in a shell once the node is up.

The issue seems to be that qhost and qconf aren't outputting anything when they 
run. Is that to be expected? Here's what I have added:
<post>

   <....snipped the default stuff for this post...>

         # Here's the code as I'd like it to work:
         # This code gets reached. I can output these env vars and the
         #  values are correct.
         export SGEBIN=$SGE_ROOT/bin/$SGE_ARCH
         export NODE=$(/bin/hostname -s)
         export MEMFREE=`$SGEBIN/qhost -F mem_total -h $NODE|tail -n 1|cut -d: 
-f3 | cut -d= -f2`
         $SGEBIN/qconf -mattr exechost complex_values h_vmem=$MEMFREE $NODE 
2&gt;&amp;1 &gt; /root/qconf_complex_setup.log
         $SGEBIN/qconf -mattr exechost complex_values s_vmem=$MEMFREE $NODE 2&gt;&amp;1 
&gt;&gt;
Might be intended, but this syntax will put the error to the default output and 
only the default output in the logfile. In case you want to capture both it 
needs to be written as:

qconf ... >>/root/qconf_complex_setup.log 2>&1

You can also use eliminate the redirection all together and use the --log option to the postinstall script in your kickstart file, like this:

%post --log=/root/post-install.log

# do something here
# do something else here

% end


_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to