Custom dashboard prevents PMM Server Docker update from 2.20 to 2.21
Description
How to test
How to document
is duplicated by
Smart Checklist
Activity

Aleksandra Abramova September 20, 2021 at 1:07 PM
Hi, !
Thank you for your activity! We would like to send you a gift from Percona. Please, contact me at community-team@percona.com with your mailing address and phone number (for delivery only).
Thanks!

Vadim Yalovets September 15, 2021 at 3:39 PMEdited
It can be applied as a workaround.

Jira Bot September 6, 2021 at 6:56 AM
To:
CC:
Hi, I'm jira-bot, Percona's Jira automation tool. I've detected that someone from
Percona has made an edit to the Summary field of an issue that you reported.
I'm not sentient (yet) so I'm not sure whether the person fixed a typo, changed
a few words, or completely rewrote the text. In any case, it is Percona Engineering's
intention to make the Summary and Description of an issue as accurate as possible
so that we're fixing the actual problem you're encountering, and to avoid
misunderstandings about symptoms and causes.
If the current Summary does not accurately reflect the problem you are reporting,
or if you feel the change was otherwise inappropriate in some way, please add a
new comment explaining things and we'll address it as soon as we can.
This message will be added only once per issue, regardless of how many times
the Summary is edited.
message-code:summary-edited
User impact: User can't upgrade PMM
STR:*
Install PMM 2.20.0 (or older version) server
Create the New dashboard and add some tags
Open Home dashboard and start upgrade
Actual result: Upgrade stuck up on Grafana updating
Expected result: Upgrade is finished successfully
Original report: Hello
Tried to update pmm-server 2.20 -> 2.21
docker environment.
docker logs shows dashboard-upgrade starting/stopping cycle, depending where in this process the website is somehow usable, but not all page are there.
docker cp pmm-server:/srv/dashboard-upgrade.log .
shows a Traceback:
Dashboard title: 'NUMA Details'
Result: 200 '{"id":10341,"slug":"numa-details","status":"success","uid":"node-memory-numa","url":"/graph/d/node-memory-numa/numa-details","version":2}'
Dashboard title: 'PMM Query Analytics'
Result: 200 '{"id":10311,"slug":"pmm-query-analytics","status":"success","uid":"pmm-qan","url":"/graph/d/pmm-qan/pmm-query-analytics","version":2}'
Dashboard title: 'PostgreSQL DB/Table Size Details (Designed for PMM2)'
Traceback (most recent call last):
File "/usr/share/percona-dashboards/import-dashboards.py", line 541, in <module>
main()
File "/usr/share/percona-dashboards/import-dashboards.py", line 520, in main
move_into_folders(api_key)
File "/usr/share/percona-dashboards/import-dashboards.py", line 414, in move_into_folders
dash_data['folderId'] = SET_OF_TAGS[tag]
KeyError: u'Posgresql'
grafana: stopped
grafana: started
In bold marked dashboard is a custom one (mentioned in recent blogpost).
I was able to click through dashoard -> manage -> postgresql -> check that dashboard and delete it.
Only possible if it is not to far up in the list so you have enough time to delete it, otherwise I would get stuck in that loop.
The folder exists, the KeyError is missing a "t" ?
Creating folder 'PostgreSQL'
Result: 400 '{"message":"a folder or dashboard in the general folder with the same name already exists"}'
The dashboard was usable in 2.20
Perhaps the process "dashboard-upgrade" should mark dashboards from the list if it hit an error, to prevent such a loop.
Is there a way to delete a dashboard from inside the container if someone is noch able to delete it while the loop is present?
Workaround