Skip to content

Commit

Permalink
cluster: support RHEL8
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar committed May 23, 2022
1 parent 7ad779c commit 9df995d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion embed/templates/systemd/system.service.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LimitSTACK=10485760
AmbientCapabilities=CAP_NET_RAW
{{- end}}
User={{.User}}
ExecStart={{.DeployDir}}/scripts/run_{{.ServiceName}}.sh
ExecStart=/bin/bash -c '{{.DeployDir}}/scripts/run_{{.ServiceName}}.sh'
{{- if eq .ServiceName "prometheus"}}
ExecReload=/bin/bash -c 'kill -HUP $MAINPID $(pidof {{.DeployDir}}/bin/ng-monitoring-server)'
{{end}}
Expand Down
4 changes: 2 additions & 2 deletions embed/templates/systemd/tispark.service.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ User={{.User}}
{{- if ne .JavaHome ""}}
Environment="JAVA_HOME={{.JavaHome}}"
{{- end}}
ExecStart={{.DeployDir}}/sbin/start-{{.ServiceName}}.sh
ExecStop={{.DeployDir}}/sbin/stop-{{.ServiceName}}.sh
ExecStart=/bin/bash -c '{{.DeployDir}}/sbin/start-{{.ServiceName}}.sh'
ExecStop=/bin/bash -c '{{.DeployDir}}/sbin/stop-{{.ServiceName}}.sh'
Type=forking
{{- if .Restart}}
Restart={{.Restart}}
Expand Down
4 changes: 2 additions & 2 deletions pkg/cluster/operation/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ func checkOSInfo(opt *CheckOptions, osInfo *sysinfo.OS) *CheckResult {
// check version
// CentOS 8 is known to be not working, and we don't have plan to support it
// as of now, we may add support for RHEL 8 based systems in the future.
if ver, _ := strconv.ParseFloat(osInfo.Version, 64); ver < 7 || ver >= 8 {
result.Err = fmt.Errorf("%s %s not supported, use version 7 please",
if ver, _ := strconv.ParseFloat(osInfo.Version, 64); ver < 7 {
result.Err = fmt.Errorf("%s %s not supported, use version 8 please",
osInfo.Name, osInfo.Release)
return result
}
Expand Down

0 comments on commit 9df995d

Please sign in to comment.