As I said, it is loading a barebone environment. Is it not loading neither the system environment vars neither the user environment vars. This is a screenshot of the system environment vars, most of them are missing: De: HTCondor-users [mailto:htcondor-users-bounces@xxxxxxxxxxx]
En nombre de John M Knoeller load_profile can’t be specified with run_as_owner because run_as_owner implies loading the owner’s profile. and I and see from this PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\program files\Python2714\;C:\program files\Python2714\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\Microsoft Application Virtualization Client;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Autodesk\Backburner\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft
ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\condor\bin\; That the system environment is being loaded. Otherwise the path would be empty. -tj From: HTCondor-users
[mailto:htcondor-users-bounces@xxxxxxxxxxx]
On Behalf Of Laborda Sanchez, Oscar (Volkswagen Group Services) Hello TJ, thanks for your reply. The environment vars get correctly loaded in interactive sessions (both system and user), and as I said Condor is configured to run as owner (STARTER_ALLOW_RUNAS_OWNER = True) and I confirm that
it is correctly working as such. When I submit a job to the local machine, only barebone environment vars get loaded: condor_set.run executable = condor_set.bat universe = vanilla output = condor_set.out log = condor_set.log error = condor_set.err run_as_owner = true requirements = TARGET.Machine=="<server_name>" request_cpus = 12 #load_profile = true queue condor_set.bat set condor_set.out BATCH_SYSTEM=HTCondor COMPUTERNAME=<server_name> COMSPEC=C:\WINDOWS\system32\cmd.exe CUDA_VISIBLE_DEVICES=10000 GPU_DEVICE_ORDINAL=10000 NUMBER_OF_PROCESSORS=12 OMP_NUM_THREADS=12 OS=Windows_NT PATH=C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\program files\Python2714\;C:\program files\Python2714\Scripts;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\Microsoft Application Virtualization Client;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Autodesk\Backburner\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft
ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\condor\bin\; PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC PROCESSOR_ARCHITECTURE=x86 PROCESSOR_ARCHITEW6432=x86 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 62 Stepping 4, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=3e04 PROGRAMFILES=C:\Program Files (x86) PROMPT=$P$G SystemDrive=C: SystemRoot=C:\WINDOWS TEMP=C:\PROGRA~2\condor\execute\dir_10064 TMP=C:\PROGRA~2\condor\execute\dir_10064 TMPDIR=C:\PROGRA~2\condor\execute\dir_10064 WINDIR=C:\WINDOWS _CHIRP_DELAYED_UPDATE_PREFIX=Chirp* _CONDOR_AssignedGPUs=10000 _CONDOR_CHIRP_CONFIG=C:\PROGRA~2\condor\execute\dir_10064\.chirp.config _CONDOR_JOB_AD=C:\PROGRA~2\condor\execute\dir_10064\.job.ad _CONDOR_JOB_IWD=D:\USUARIS\<user_name>\Documents\condor_test _CONDOR_JOB_PIDS= _CONDOR_MACHINE_AD=C:\PROGRA~2\condor\execute\dir_10064\.machine.ad _CONDOR_SCRATCH_DIR=C:\PROGRA~2\condor\execute\dir_10064 _CONDOR_SLOT=slot1_1 Neither system or user environment vars get loaded as defined in the registry in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment HKEY_CURRENT_USER\Environment According to the manual, load_profile cannot be used with run_as_owner, and actually the exact same environment variables get set when I set it to true: load_profile = <True
| False> When
True, loads the account profile of the dedicated run account for Windows jobs. May not be used
with run_as_owner. When I submit a python script that manually loads environment variables not yet defined from HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and then execute the
software, it will successfully find the license environment variable defined there. I am using this as a workaround for now. PS: I am using Condor 8.6.9. Note: I removed the actual workstation name and user name because of company policy. De: HTCondor-users [mailto:htcondor-users-bounces@xxxxxxxxxxx]
En nombre de John M Knoeller when a job is run as the the submitting user, the system environment variables as for that user will be loaded, just as if that user had logged-in interactively.
So, first you should log in to the execute machine as that user and see what environment is getting set. If it is not what you want, then you will have to change the Windows configuration. Once you know that is correct, we can look at what HTCondor does.
Run_as_owner is both a configuration option on the execute node (to allow run_as_owner). and a job submit attribute (to request run_as_owner). You must specify both for a job to run as the owner. otherwise none of
the system environment variables are loaded unless the job specifies load_profile=true. With load_profile, you get the system environment for the default user. Without either load_profile or run_as_owner in the job, you get no system environment at all. -tj From: HTCondor-users
[mailto:htcondor-users-bounces@xxxxxxxxxxx]
On Behalf Of Laborda Sanchez, Oscar (Volkswagen Group Services) Hello, I am trying to run a software in Condor under Windows that has some configuration defined in environment variables (license, paths, etc.), but I find that Condor is not loading system environment vars. Attribute “load_profile”
is not an option, because Condor is set up as “run_as_owner”. Is there an easy method to get those system environment variables loaded? So far I have found the “environment” and “getenv” attributes, but I would really prefer for this stuff to stay in the server side. Thanks a lot Óscar |