Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lichunzhu committed Aug 13, 2020
1 parent e3699ca commit 2c7e525
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/discovery/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func NewServer(pdControl pdapi.PDControlInterface, masterControl dmapi.MasterCon

func (s *server) registerHandlers() {
ws := new(restful.WebService)
ws.Route(ws.GET("/new/{advertise-peer-url}").To(s.newHandler))
ws.Route(ws.GET("/new/{advertise-peer-url}/{register-type}").To(s.newHandler))
s.container.Add(ws)
}
Expand Down Expand Up @@ -90,7 +91,7 @@ func (s *server) newHandler(req *restful.Request, resp *restful.Response) {
return
}

klog.Infof("generated args for %s: %s, register-type: ", advertisePeerURL, result, registerType)
klog.Infof("generated args for %s: %s, register-type: %s", advertisePeerURL, result, registerType)
if _, err := io.WriteString(resp, result); err != nil {
klog.Errorf("failed to writeString: %s, %v", result, err)
}
Expand Down

0 comments on commit 2c7e525

Please sign in to comment.