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

Re: [Condor-users] Submit job to a machine in a particular IP address range



On Tue, Feb 21, 2006 at 01:02:27PM +0000, James Osborne wrote:
> Hi
> 
> Is it possible to submit a job so that it will only execute on a machine in a
> particular IP address range
> 
> I already know the following is possible
> 
> requirements = (Machine == "hostname.example.com")
> 
> Tying the job down to a particular machine.   I could copy and paste tons of
> machine names into a long requirements expression but that's not ideal, so, is
> there a way to do something like
> 
> requirements = (Machineaddress >= "x.x.x.0" && Machineaddress <= "x.x.x.254")
> 
> Does anybody have any ideas ?
> 

Condor has a "subnet" attribute:

condor_status -l vm1@xxxxxxxxxxxxxxxxxx | grep Subnet
Subnet = "128.105.146"

Now, the "subnet" calculation is totally wrong (it's just the first 3
numbers from the IP address, it never looks at the netmask) but if
you want to restrict it to a class C it would work.

There is no greater than/less than operator that understands IP addresses,
and there is no attribute in the machine ad that by is a single integer
version of the ip address. (though you could use startd_cron to put one
in, and then you could use the normal >= and <= operators)

-Erik