[COMMIT scylla-cluster-tests branch-2023.1] fix(monitoring): add `kiosk` for automatic height calculation to work

0 views
Skip to first unread message

Commit Bot

<bot@cloudius-systems.com>
unread,
Aug 12, 2024, 5:12:09 PMAug 12
to scylladb-dev@googlegroups.com, Israel Fruchter
From: Israel Fruchter <fr...@scylladb.com>
Committer: Israel Fruchter <israel....@gmail.com>
Branch: branch-2023.1

fix(monitoring): add `kiosk` for automatic height calculation to work

passing `height=-1` for automatic calculation of height, was broken
for a few releases, in this release it should work when `kisok` parameter
is also being passed

(cherry picked from commit 9282de2f99b84dc65a2d5a83390f075adb9922d7)

---
diff --git a/sdcm/logcollector.py b/sdcm/logcollector.py
--- a/sdcm/logcollector.py
+++ b/sdcm/logcollector.py
@@ -498,8 +498,11 @@ def get_grafana_screenshot(self, node, local_dst):
datetime.datetime.now().strftime("%Y%m%d_%H%M%S"),
node.name))
LOGGER.debug("Get screenshot for url %s, save to %s", grafana_url, screenshot_path)
+ # deliberately specifying params as string to be able to use kiosk mode
+ # since requests can put a param without value, if using dict
+ # https://github.com/psf/requests/issues/2651
with requests.get(grafana_url, stream=True,
- params=dict(width=dashboard.resolution[0], height=dashboard.resolution[1])) as response:
+ params=f"width={dashboard.resolution[0]}&height=-1&kiosk") as response:
response.raise_for_status()
with open(screenshot_path, 'wb') as output_file:
for chunk in response.iter_content(chunk_size=8192):
Reply all
Reply to author
Forward
0 new messages