mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
parent
d40b66f1c1
commit
ca84829647
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user