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:
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
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\;
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 62 Stepping 4, GenuineIntel
PROGRAMFILES=C:\Program Files (x86)
Neither system or user environment vars get loaded as defined in the registry in:
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.
On Behalf Of Laborda Sanchez, Oscar (Volkswagen Group Services)
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