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

remove old workaround for cvmfs_server < 2.7.3 #56

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions rpm/cvmfs-servermon.spec
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ setsebool -P httpd_can_network_connect 1 2>/dev/null || true
/usr/share/cvmfs-servermon

%changelog
# - Remove old workaround added in version 1.12 because it incorrectly
# reported the status of a repo without an initial snapshot but with
# a completed gc.

* Mon Oct 23 2023 Dave Dykstra <[email protected]> - 1.27-1
- Correct inconsistent tab/space which python3 rejected.
- Fix rare error message regarding an empty last_gc status that pylint
Expand Down
22 changes: 8 additions & 14 deletions webapi/cvmfsmon_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,20 +237,14 @@ def dispatch(version, montests, parameters, start_response, environ):

if doupdated:
if 'last_snapshot' not in repo_status:
# there was a bug prior to cvmfs_server 2.7.3 that
# caused garbage collection to remove the last_snapshot
# entry, so use last_gc instead if it exists
if 'last_gc' in repo_status:
repo_status['last_snapshot'] = repo_status['last_gc']
else:
# no complete snapshot, look up snapshotting status
try:
url2 = repourl + '/.cvmfs_is_snapshotting'
request = urllib_request.Request(url2, headers=headers)
snapshotting_string = urllib_request.urlopen(request).read().decode('utf-8')
repo_status['snapshotting_since'] = snapshotting_string
except:
pass
# no complete snapshot, look up snapshotting status
try:
url2 = repourl + '/.cvmfs_is_snapshotting'
request = urllib_request.Request(url2, headers=headers)
snapshotting_string = urllib_request.urlopen(request).read().decode('utf-8')
repo_status['snapshotting_since'] = snapshotting_string
except:
pass
results.append(cvmfsmon_updated.runtest(repo, limits, repo_status, updated_slowrepos, errormsg))
if domontest('gc', montests):
results.append(cvmfsmon_gc.runtest(repo, limits, repo_status, errormsg))
Expand Down
Loading