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

Re: [Condor-users] Condor $(OpSys) and $(Arch) parameter



kschwarz@xxxxxxxxxxxxxx wrote:
> Hi all,
> 
> Is there any parameter that is similar to the $(OpSys) but returns a 
> generic name for the operational system instead of the different versions 
> of Windows platforms (for instance!)? The same is valid for the $(Arch) 
> parameter.
> What I want to do is to use this parameter (let say $(OpSysGeneric)) to be 
> referenced in the requirements of a job or to configure Platform-Specific 
> Configuration Files. See examples below.
> 
> Requirements = (OpSysGeneric == "WINNT")
> 
> instead of
> 
> Requirements = (OpSys == "WINNT51" || OpSys == "WINNT52" || OpSys == 
> "WINNT60" || OpSys == "WINNT61")               ## and so on!
> 
> and
> 
> condor_config.SUN.SOLARIS
> condor_config.INTEL.LINUX
> condor_config.INTEL.WINNT
> 
> LOCAL_CONFIG_FILE = $(ETC)/condor_config.$(ARCHGENERIC).$(OPSYSGENERIC), \
>                                                 $(ETC)/$(HOSTNAME).local
> 
> instead of
> 
> condor_config.SUN5x.SOLARIS25
> condor_config.SUN4x.SOLARIS25
> condor_config.SUN4x.SOLARIS26
> condor_config.INTEL.LINUX
> condor_config.INTEL.WINNT51
> condor_config.INTEL.WINNT52
> condor_config.INTEL.WINNT60
> condor_config.INTEL.WINNT61
> 
> LOCAL_CONFIG_FILE = $(ETC)/condor_config.$(ARCH).$(OPSYS), \
>                     $(ETC)/$(HOSTNAME).local
> 
> where the WINNTnn are really copies of WINNT51 !
> 
> It will be helpful to simplify its usage. Any suggestions? If not 
> available yet, could it be included in a future Condor version?
> 
> Thanks, Klaus

Other than doing what Dan mentioned, you can define ArchGeneric and OpSysGeneric yourself, e.g.

ArchGeneric = SUN
OpSysGeneric = WINNT
STARTD_ATTRS = ArchGeneric, OpSysGeneric
LOCAL_CONFIG_FILE = $(ETC)/condor_config.$(ArchGeneric).$(OpSysGeneric), $(ETC)/$(HOSTNAME).local

This gives you ArchGeneric and OpSysGeneric attributes on all your slots, useful for Requirements expressions, and lets you specify the local config file using the same values.

It requires that you have a different global condor_config file for each ArchGeneric/OpSysGeneric combination that makes sense (I'd like to see SUN.WINNT running).

You could probably write a boot script that modified condor_config to set *Generic in some expected way.

Best,


matt