Thanks for stepping in @yosiasz
After reviewing this issue with the rest of the team and since we have gathered enough evidence to establish that this question is unlikely to be solved by just providing guidance, docs, or pointers, we need you,@niteshchauhan , to bring this up into our GitHub repo as a new issue . We will assign the new issue to one of our engineering teams, that will take a closer look into it.
In the new issue, please mention that you have been advised to open it , and provide a link back to this post.
a bug has been raised at github
opened 04:38AM - 10 Jan 23 UTC
<!--
Please use this template to create your bug report. By providing as much i… nfo as possible you help us understand the issue, reproduce it and resolve it for you quicker. Therefore take a couple of extra minutes to make sure you have provided all info needed.
PROTIP: record your screen and attach it as a gif to showcase the issue.
- Questions should be posted to: https://community.grafana.com
- Use query inspector to troubleshoot issues: https://bit.ly/2XNF6YS
- How to record and attach gif: https://bit.ly/2Mi8T6K
-->
**What happened**:
We are trying to upgrade from v8.5.9 legacy alerting to v9.2.5 unified alerting
we are using a grafana docker container with sqlite database
we are trying to run another container with image 9.2.5 with same database
migration fails with following logs
```
logger=migrator t=2022-12-16T11:52:11.641947998Z level=warn msg="alert linked to obsolete notification channel, ignoring" alert="glc-dsb-redis01 - Redis Uptime alert" uid=ZCyZgxfMz
logger=migrator t=2022-12-16T11:52:11.641955625Z level=warn msg="alert linked to obsolete notification channel, ignoring" alert="gdc-als-re03 - SWAP Usage alert" uid=5
logger=migrator t=2022-12-16T11:52:11.64196354Z level=warn msg="alert linked to obsolete notification channel, ignoring" alert="gdc-als-re03 - SWAP Usage alert" uid=8
logger=migrator t=2022-12-16T11:52:12.481690314Z level=info msg="Executing migration" id="update dashboard_uid and panel_id from existing annotations"
logger=migrator t=2022-12-16T11:52:12.713124885Z level=info msg="Executing migration" id="dashboard permissions"
logger=migrator t=2022-12-16T11:52:12.738219442Z level=error msg="Executing migration failed" id="dashboard permissions" error="failed to migrate permissions: failed to create permissions for role: UNIQUE constraint failed: permission.role_id, permission.action, permission.scope"
logger=migrator t=2022-12-16T11:52:12.738258674Z level=error msg="Exec failed" error="failed to migrate permissions: failed to create permissions for role: UNIQUE constraint failed: permission.role_id, permission.action, permission.scope" sql="code migration"
Failed to start grafana. error: migration failed (id = dashboard permissions): failed to migrate permissions: failed to create permissions for role: UNIQUE constraint failed: permission.role_id, permission.action, permission.scope
migration failed (id = dashboard permissions): failed to migrate permission
```
**What you expected to happen**:
Successful migration to v9
**How to reproduce it (as minimally and precisely as possible)**:
upgrading from v8 legacy alerting to v9 unified alerting
**Anything else we need to know?**:
**Environment**:
- Grafana version: grafana 8.5.9 and OS centos 7
- Data source type & version: Elasticsearch 8 and Influxdb
- OS Grafana is installed on: centos 7 and Linux 3.10.0-1062.1.2.el7.x86_64
- User OS & Browser: Ubuntu and google chrome
- Grafana plugins: grafana-clock-panel,briangann-gauge-panel,natel-plotly-panel,grafana-simple-json-datasource
- Others:
This issue was first raised at grafana [community](https://community.grafana.com/t/migration-8-5-9-to-9-2-5-fails-with-dashboard-migration-permission-issue/78177/2),
as [suggested](https://community.grafana.com/t/migration-8-5-9-to-9-2-5-fails-with-dashboard-migration-permission-issue/78177/22?u=niteshchauhan) in that issue i have raised a bug here.
1 Like