Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: give priority to CVMFS locations #232

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 17 additions & 20 deletions Pilot/pilotTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,31 +1029,28 @@ def __init__(self):

def __checkSecurityDir(self, envName, dirName):

# try and find it
for candidate in self.CVMFS_locations:
candidateDir = os.path.join(candidate,
'etc/grid-security',
dirName)
self.log.debug(
"Candidate directory for %s is %s"
% (envName, candidateDir)
)
if safe_listdir(candidateDir):
self.log.debug("Setting %s=%s" % (envName, candidateDir))
self.installEnv[envName] = candidateDir
os.environ[envName] = candidateDir
return
self.log.debug("%s not found or not a directory" % candidateDir)

if envName in os.environ and safe_listdir(os.environ[envName]):
self.log.debug(
"%s is set in the host environment as %s, aligning installEnv to it"
% (envName, os.environ[envName])
)
self.installEnv[envName] = os.environ[envName]
)
else:
self.log.debug("%s is not set in the host environment" % envName)
# try and find it
for candidate in self.CVMFS_locations:
candidateDir = os.path.join(candidate,
'etc/grid-security',
dirName)
self.log.debug(
"Candidate directory for %s is %s"
% (envName, candidateDir)
)
if safe_listdir(candidateDir):
self.log.debug("Setting %s=%s" % (envName, candidateDir))
self.installEnv[envName] = candidateDir
os.environ[envName] = candidateDir
break
self.log.debug("%s not found or not a directory" % candidateDir)

if envName not in self.installEnv:
self.log.error("Could not find/set %s" % envName)
sys.exit(1)

Expand Down
Loading