Bug 2295395

Summary: HTTPError: 401 Client Error: Unauthorized for url :3100/api/dashboards/db
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Kenny Tordeurs <ktordeur>
Component: Ceph-AnsibleAssignee: Teoman ONAY <tonay>
Status: CLOSED ERRATA QA Contact: Sayalee <saraut>
Severity: medium Docs Contact:
Priority: high    
Version: 5.3CC: bshephar, ceph-eng-bugs, cephqe-warriors, eharney, fpantano, gfidente, gmeno, jelle.hoylaerts.ext, johfulto, mmagr, nathans, rpollack, rsachere, tonay, tserlin
Target Milestone: ---Flags: ktordeur: needinfo-
rpollack: needinfo? (tonay)
rpollack: needinfo? (tonay)
Target Release: 5.3z8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-ansible-6.0.28.17-1.el8cp Doc Type: Bug Fix
Doc Text:
.Mismatched dashboard `id` causes Grafana dashboard update failures Previously, during an update, if an `id` was specified but did not match an existing dashboard, the `Error EINVAL: Traceback` error was emitted and the Grafana update would fail. With this fix, the update completes successfully.
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-13 19:22:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kenny Tordeurs 2024-07-03 12:15:41 UTC
Description of problem:
HTTPError: 401 Client Error: Unauthorized for url :3100/api/dashboards/db

Version-Release number of selected component (if applicable):
16.2 > 17.1

How reproducible:
100%

Steps to Reproduce:
1. # openstack overcloud external-upgrade run --skip-tags "ceph_health,opendev-validation, ceph_ansible_remote_tmp" --stack openstack --tags ceph,facts --yes
2.
3.

Actual results:
"TASK [ceph-dashboard : inject grafana dashboard layouts] ***********************",

"fatal: [openstack001 -> openstack001]: FAILED! => {\"changed\": false, \"cmd\": [\"podman\", \"exec\", \"ceph-mon-openstack001\", \"ceph\", \"--cluster\", \"ceph\", \"dashboard\", \"grafana\", \"dashboards\", \"update\"], \"delta\": \"0:00:01.088045\", \"end\": \"2024-06-14 02:31:40.765994\", \"msg\": \"non-zero return code\", \"rc\": 22, \"start\": \"2024-06-14 02:31:39.677949\", \"stderr\": \"Error EINVAL: Traceback (most recent call last):\\n  File \\\"/usr/share/ceph/mgr/mgr_module.py\\\", line 1446, in _handle_command\\n    return self.handle_command(inbuf, cmd)\\n  File \\\"/usr/share/ceph/mgr/dashboard/module.py\\\", line 529, in handle_command\\n    push_local_dashboards()\\n  File \\\"/usr/share/ceph/mgr/dashboard/grafana.py\\\", line 136, in push_local_dashboards\\n    retry()\\n  File \\\"/usr/share/ceph/mgr/dashboard/grafana.py\\\", line 93, in __call__\\n    result = self.func(*self.args, **self.kwargs)\\n  File \\\"/usr/share/ceph/mgr/dashboard/grafana.py\\\", line 131, in push\\n    grafana.push_dashboard(body)\\n  File \\\"/usr/share/ceph/mgr/dashboard/grafana.py\\\", line 58, in push_dashboard\\n    response.raise_for_status()\\n  File \\\"/lib/python3.6/site-packages/requests/models.py\\\", line 940, in raise_for_status\\n    raise HTTPError(http_error_msg, response=self)\\nrequests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://192.168.3.5:3100/api/dashboards/db\", \"stderr_lines\": [\"Error EINVAL: Traceback (most recent call last):\", \"  File \\\"/usr/share/ceph/mgr/mgr_module.py\\\", line 1446, in _handle_command\", \"    return self.handle_command(inbuf, cmd)\", \"  File \\\"/usr/share/ceph/mgr/dashboard/module.py\\\", line 529, in handle_command\", \"    push_local_dashboards()\", \"  File \\\"/usr/share/ceph/mgr/dashboard/grafana.py\\\", line 136, in push_local_dashboards\", \"    retry()\", \"  File \\\"/usr/share/ceph/mgr/dashboard/grafana.py\\\", line 93, in __call__\", \"    result = self.func(*self.args, **self.kwargs)\", \"  File \\\"/usr/share/ceph/mgr/dashboard/grafana.py\\\", line 131, in push\", \"    grafana.push_dashboard(body)\", \"  File \\\"/usr/share/ceph/mgr/dashboard/grafana.py\\\", line 58, in push_dashboard\", \"    response.raise_for_status()\", \"  File \\\"/lib/python3.6/site-packages/requests/models.py\\\", line 940, in raise_for_status\", \"    raise HTTPError(http_error_msg, response=self)\", \"requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://192.168.3.5:3100/api/dashboards/db\"], \"stdout\": \"\", \"stdout_lines\": []}",

Expected results:
no errors

Additional info:
Add the ignore_errors: true flag in the task of the playbook /usr/share/ceph-ansible/roles/ceph-dashboard/tasks/configure_grafana_layouts.yml to workaround this

Comment 3 Kenny Tordeurs 2024-08-08 12:02:59 UTC
This is the KCS that explains the same issue: https://access.redhat.com/solutions/6965628

Comment 27 errata-xmlrpc 2025-02-13 19:22:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 5.3 security and bug fix updates), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2025:1478