Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcs: fix micro-service topo's display #7956

Merged
merged 2 commits into from Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/mcs/scheduling/server/server.go
Expand Up @@ -20,6 +20,7 @@ import (
"net/http"
"os"
"os/signal"
"path/filepath"
"runtime"
"strconv"
"sync"
Expand Down Expand Up @@ -413,7 +414,8 @@ func (s *Server) startServer() (err error) {
// different service modes provided by the same pd-server binary
bs.ServerInfoGauge.WithLabelValues(versioninfo.PDReleaseVersion, versioninfo.PDGitHash).Set(float64(time.Now().Unix()))
bs.ServerMaxProcsGauge.Set(float64(runtime.GOMAXPROCS(0)))
deployPath, err := os.Executable()
execPath, err := os.Executable()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tso and resource manager also need to update

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get it. only tso and scheduling have it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need to pick it to release-8.0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

deployPath := filepath.Dir(execPath)
if err != nil {
deployPath = ""
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/mcs/tso/server/server.go
Expand Up @@ -20,6 +20,7 @@ import (
"net/http"
"os"
"os/signal"
"path/filepath"
"runtime"
"strconv"
"sync"
Expand Down Expand Up @@ -368,7 +369,8 @@ func (s *Server) startServer() (err error) {
s.serverLoopCtx, s.serverLoopCancel = context.WithCancel(s.Context())
legacySvcRootPath := endpoint.LegacyRootPath(s.clusterID)
tsoSvcRootPath := endpoint.TSOSvcRootPath(s.clusterID)
deployPath, err := os.Executable()
execPath, err := os.Executable()
deployPath := filepath.Dir(execPath)
if err != nil {
deployPath = ""
}
Expand Down