Skip to content

Commit 7dc3ffa

Browse files
authored
Merge pull request #56 from DrDaveD/master
remove old workaround for cvmfs_server < 2.7.3
2 parents 8014029 + 2845041 commit 7dc3ffa

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

rpm/cvmfs-servermon.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ setsebool -P httpd_can_network_connect 1 2>/dev/null || true
6868
/usr/share/cvmfs-servermon
6969

7070
%changelog
71+
# - Remove old workaround added in version 1.12 because it incorrectly
72+
# reported the status of a repo without an initial snapshot but with
73+
# a completed gc.
74+
7175
* Mon Oct 23 2023 Dave Dykstra <[email protected]> - 1.27-1
7276
- Correct inconsistent tab/space which python3 rejected.
7377
- Fix rare error message regarding an empty last_gc status that pylint

webapi/cvmfsmon_api.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -237,20 +237,14 @@ def dispatch(version, montests, parameters, start_response, environ):
237237

238238
if doupdated:
239239
if 'last_snapshot' not in repo_status:
240-
# there was a bug prior to cvmfs_server 2.7.3 that
241-
# caused garbage collection to remove the last_snapshot
242-
# entry, so use last_gc instead if it exists
243-
if 'last_gc' in repo_status:
244-
repo_status['last_snapshot'] = repo_status['last_gc']
245-
else:
246-
# no complete snapshot, look up snapshotting status
247-
try:
248-
url2 = repourl + '/.cvmfs_is_snapshotting'
249-
request = urllib_request.Request(url2, headers=headers)
250-
snapshotting_string = urllib_request.urlopen(request).read().decode('utf-8')
251-
repo_status['snapshotting_since'] = snapshotting_string
252-
except:
253-
pass
240+
# no complete snapshot, look up snapshotting status
241+
try:
242+
url2 = repourl + '/.cvmfs_is_snapshotting'
243+
request = urllib_request.Request(url2, headers=headers)
244+
snapshotting_string = urllib_request.urlopen(request).read().decode('utf-8')
245+
repo_status['snapshotting_since'] = snapshotting_string
246+
except:
247+
pass
254248
results.append(cvmfsmon_updated.runtest(repo, limits, repo_status, updated_slowrepos, errormsg))
255249
if domontest('gc', montests):
256250
results.append(cvmfsmon_gc.runtest(repo, limits, repo_status, errormsg))

0 commit comments

Comments
 (0)