Commit ca848296 by Marcus Efraimsson Committed by GitHub

Provisioning: Start provision dashboards after Grafana server have started (#21564)

6.2-beta1 changed so that data sources, dashboards and alert notifiers 
are provisioned on service Init where's before only data sources and 
alert notifiers was provisioned on service Init and dashboards was first
provisioned in service Run which happens after Grafana server have 
started.
This change reverts so that dashboard provisioning are first happening 
in service Run, after Grafana server have started.

Fixes #21133
parent d40b66f1
......@@ -69,15 +69,15 @@ func (ps *provisioningServiceImpl) Init() error {
return err
}
err = ps.ProvisionDashboards()
if err != nil {
return err
}
return nil
}
func (ps *provisioningServiceImpl) Run(ctx context.Context) error {
err := ps.ProvisionDashboards()
if err != nil {
ps.log.Error("Failed to provision dashboard", "error", err)
}
for {
// Wait for unlock. This is tied to new dashboardProvisioner to be instantiated before we start polling.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment