[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] Determining requirements when using hooks



Ian Chesal wrote:
As you know, matching in Condor is bi-lateral, add
"Requirements = TRUE"
to your job classads.
Thanks Matthew. I'll try that out. If this is the case there's an
error in > the docs. Section 4.4.1.1 for Hook: Fetch Work says the Class
Ad returned > by the fetch work hook should be identical to a COD class
and tells you to > look at section 4.3.3 for the details. There's no
mention of Requirements
in the COD attributes.

I'll let you know if this works (or doesn't). Makes sense that is
should.

This worked. At least it got me ahead a step. Some notes: quoting the
Requirements string for the job output didn't work. But just passing an
unquoted True worked. So:

        Requirements = True

Now I'm getting:

        3/13 18:09:03 vm2: Slot requirements not satisfied.
        3/13 18:09:03 DaemonCore: return from reaper for pid 9246

Which makes sense. Kind of. I have START = True on the machine and was
expecting that to be the end of it.

A little poking around and it turns out there's a default Requirements
string that I've ignored for so long now because we only run vanilla
universe jobs:

        Requirements = (START) && (IsValidCheckpointPlatform)
        IsValidCheckpointPlatform = ( \
                ( \
                        (TARGET.JobUniverse == 1) == FALSE
                ) || ( \
                        (MY.CheckpointPlatform =!= UNDEFINED) && \
                        (TARGET.LastCheckpointPlatform =?=
MY.CheckpointPlatform)\
                        || (TARGET.NumCkpts == 0) \
                        ) \
                )\
        )

So it looks like my job needs at least a JobUniverse setting that's not
equal to 1. Another something to add to the docs.

- Ian

I just had success with this on a Red Hat and Fedora system...

JobUniverse = 5
Cmd = "/bin/date"
Out = "job.out"
Err = "job.err"
Iwd = "/tmp"
Owner = "nobody"
Requirements = TRUE

...the Owner may even be superfluous. However, on Windows, you might need the Owner, a User (typically Owner@UID_DOMAIN), and maybe an NTDomain - all strings.

The reason you can't quote the Requirements is because it's an expression. A classad string attribute is always quoted and expressions are not, e.g. Cmd vs Requirements.

Best,


matt