<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Farrukh,<div class=""><br class=""></div><div class="">Have you tried using match expressions?  Those are evaluated by the schedd before the job ad is sent to the startd.</div><div class=""><br class=""></div><div class="">That said, looking at a random StartdLog, I see MachineAttr* attributes in the startd activate claim request -- which occurs prior to launching the job.  So, I'm confused why that isn't working for you.</div><div class=""><br class=""></div><div class="">Worst case scenario - the shadow has a copy of both the machine and job ad at the point when the job is launched.  Hence, it should be a very modest patch to do the attribute lookup with both ads in the context.</div><div class=""><br class=""></div><div class="">Brian</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 4, 2017, at 2:46 PM, Farrukh Aftab Khan <<a href="mailto:farrukh.aftab.khan@gmail.com" class="">farrukh.aftab.khan@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default"><p class=""><font size="2" class=""><span style="font-family:trebuchet ms,sans-serif" class="">Hi guys,<br class=""></span></font>
<font size="2" class=""><span style="font-family:trebuchet ms,sans-serif" class=""><br class="">
We are trying to run jobs in a pool with both local worker nodes and 
pilots coming in from off site. Our local workers have docker and we 
want to run all jobs running on the local cluster inside containers. To 
do this, we add the following classAds to the job JDL:<br class=""></span></font>
<font size="2" class=""><span style="font-family:trebuchet ms,sans-serif" class=""><br class="">
WantDocker = TRUE<br class="">
DockerImage = "xyz"<br class=""></span></font>
<font size="2" class=""><span style="font-family:trebuchet ms,sans-serif" class=""><br class="">
Our general idea with this setup is for the jobs to be able to run 
wherever they can find resources i.e. be it off site or on site. These 
jobs run fine when they run on the local workers with docker but are 
kicked off when they try to run on pilots without docker support. <br class=""></span></font>
</p>
<font size="2" class=""><span style="font-family:trebuchet ms,sans-serif" class="">
Is there a way for us to force all local running jobs to run on 
docker from the startd side alone? This way the jobs won't have to 
specify that they want docker and can run on pilots too. At the same 
time we will be able to force all jobs trying to run on the local 
cluster to always use docker.<br class=""></span></font>
<font size="2" class=""><span style="font-family:trebuchet ms,sans-serif" class=""><br class="">
So far I have tried using 'JobMachineAttrs' to fetch 'HasDocker' 
in the job classAd, but by the time the corresponding 
'MachineAttrHasDocker0' gets populated the job is already running. I 
also tried referencing HasDocker directly from WantDocker in the job 
classAds, but the classAd isn't evaluated with reference to the startd 
classAds. I know this can probably be done by putting the local on site 
workers behind a CE but this is something we are trying to get away 
from.<br class=""></span></font>
<font size="2" class=""><span style="font-family:trebuchet ms,sans-serif" class=""><br class="">
Any other ideas or suggestions are welcome.<br class=""></span></font>
<font size="2" class=""><span style="font-family:trebuchet ms,sans-serif" class=""><br class="">
Best regards,<br class="">
Farrukh</span></font></div></div>
_______________________________________________<br class="">HTCondor-users mailing list<br class="">To unsubscribe, send a message to <a href="mailto:htcondor-users-request@cs.wisc.edu" class="">htcondor-users-request@cs.wisc.edu</a> with a<br class="">subject: Unsubscribe<br class="">You can also unsubscribe by visiting<br class=""><a href="https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users" class="">https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users</a><br class=""><br class="">The archives can be found at:<br class="">https://lists.cs.wisc.edu/archive/htcondor-users/</div></blockquote></div><br class=""></div></body></html>