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
This commit is contained in:
Marcus Efraimsson 2020-01-17 13:39:41 +01:00 committed by GitHub
parent d40b66f1c1
commit ca84829647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.