Skip to content

Commit

Permalink
[fix] download.go : Fail to gemix cluster install ... cause that graf…
Browse files Browse the repository at this point in the history
…ana:7.5.17 's download url is changed. throw exception: "Error: receiving status of 404 for url: https://dl.grafana.com/oss/release/grafana-enterprise-7.5.17.linux-amd64.tar.gz" #67

#67
  • Loading branch information
Johnny-ZTSD authored Dec 20, 2024
1 parent 2326400 commit 84edcaa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/cluster/operation/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ func Download(prefix, component, nodeOS, arch, version string) error {
arch = "amd64"
}
fileName = fmt.Sprintf("%s-enterprise-%s.%s-%s.tar.gz", component, ver.GrafanaVersion, nodeOS, arch)
componentUrl = strings.Join([]string{"https://dl.grafana.com/oss/release", fileName}, "/")
// FIX for : https://github.com/openGemini/gemix/issues/67
grafanaBaseUrlEnv := os.Getenv("GRAFANA_BASE_URL");
if grafanaBaseUrlEnv == "" {
grafanaBaseUrlEnv = "https://dl.grafana.com/enterprise/release"; //"https://dl.grafana.com/oss/release" is Deprecated
}
//componentUrl = strings.Join([]string{"https://dl.grafana.com/oss/release", fileName}, "/")
componentUrl = strings.Join([]string{ grafanaBaseUrlEnv, fileName}, "/")
}
dstPath := spec.ProfilePath(spec.OpenGeminiPackageCacheDir, fileName)
if err := os.MkdirAll(spec.ProfilePath(spec.OpenGeminiPackageCacheDir), 0750); err != nil {
Expand Down

0 comments on commit 84edcaa

Please sign in to comment.