Skip to content

Commit

Permalink
Corrected cvmfs root
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Nilsson committed May 6, 2024
1 parent a41d2c6 commit 612f379
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion PILOTVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.4.1
3.7.4.2
11 changes: 9 additions & 2 deletions pilot/user/atlas/cvmfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
'CVMFS_BASE/unpacked.cern.ch/logDir/lastUpdate',
'CVMFS_BASE/sft-nightlies.cern.ch/lcg/lastUpdate',
]
# when was the last cvmfs update?
last_update_file = '/cvmfs/sft.cern.ch/lcg/lastUpdate'


def get_cvmfs_base_path() -> str:
Expand All @@ -44,3 +42,12 @@ def get_cvmfs_base_path() -> str:
:return: base path for CVMFS (str).
"""
return get_file_system_root_path()


def get_last_update_file() -> str:
"""
Return the last update file.
:return: last update file (str).
"""
return f'{get_cvmfs_base_path()}/sft.cern.ch/lcg/lastUpdate'
2 changes: 1 addition & 1 deletion pilot/util/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
RELEASE = '3' # released number should be fixed at 3 for Pilot 3
VERSION = '7' # version number is '1' for first release, '0' until then, increased for bigger updates
REVISION = '4' # revision number should be reset to '0' for every new version release, increased for small updates
BUILD = '1' # build number should be reset to '1' for every new development cycle
BUILD = '2' # build number should be reset to '1' for every new development cycle

SUCCESS = 0
FAILURE = 1
Expand Down
6 changes: 5 additions & 1 deletion pilot/util/cvmfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ def get_last_update() -> int:
"""
pilot_user = os.environ.get('PILOT_USER', 'generic').lower()
user = __import__(f'pilot.user.{pilot_user}.cvmfs', globals(), locals(), [pilot_user], 0)
last_update_file = getattr(user, 'last_update_file', None)
try:
last_update_file = user.get_last_update_file()
except AttributeError:
last_update_file = None

timestamp = None
if last_update_file:
if os.path.exists(last_update_file):
Expand Down

0 comments on commit 612f379

Please sign in to comment.