On Thu, May 1, 2014 at 2:27 PM, Jesse Becker <[email protected]> wrote:

> On Thu, May 01, 2014 at 01:58:04PM -0400, Michael Stauffer wrote:
>
>> 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.
>>
>
> I've recently been doing something similar with our system provisioning,
> although not directly in kickstart (we aren't using Rocks either, but I
> don't think that's the problem).
>
>
>  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:
>>
>
> I think the reason is one of timing.
>
> Working backwards, you want to do this:
>
> 4. configure exechost settings with information reported by qhost
> 3. for qhost to report info, sge_execd must be running on the node
> 2. for sge_execd to start, the node must be added via 'qconf -ae'
> 1. something needs to watch for new nodes, and trigger 'qconf -ae'
>
> I forget exactly when Rocks automagically adds nodes to SGE (the qconf
> -ae' bit, but I bet it hasn't happened yet.  Thus, sge_execd can't
> start, so qhost can't report host info, so qconf -mattr fails.
>
> A few possible solutions:
>
> 1 .You might be able to somehow force this part of the %post script to
> run "after" the master adds the new node.  Maybe part of the "firstboot"
> service?
>
> 2. Create a service that watches for new nodes, and configures them
> accordingly.
>
> 3. Have a cronjob that periodically configures *all* hosts (even "old"
> nodes, to catch HW changes).
>
> (we've opted for something between options 2 and 3--we look at all
> nodes, all the time, but only update "new" ones).


Thanks. I've implemented option 3 for the time being. New hosts are rarely
added or rebooted here so a periodic cron job will probably be just fine.

-M


>


>  <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; /root/qconf_complex_setup.log
>>
>> </post>
>>
>> Thanks!
>>
>> -M
>>
>
>  _______________________________________________
>> users mailing list
>> [email protected]
>> https://gridengine.org/mailman/listinfo/users
>>
>
>
> --
> Jesse Becker (Contractor)
>
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to