Skip to content

Commit f8db550

Browse files
committed
Fix how node role is determined.
1 parent 7b13ded commit f8db550

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/sidecar/configs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func (cfg *Config) MasterFQDN() string {
117117

118118
// NodeRole returns the role of the current node
119119
func (cfg *Config) NodeRole() NodeRole {
120-
if cfg.Hostname == cfg.MasterFQDN() {
120+
if cfg.FQDNForServer(cfg.ServerID) == cfg.MasterFQDN() {
121121
return MasterNode
122122
}
123123

@@ -154,7 +154,7 @@ func NewConfig() *Config {
154154

155155
var err error
156156
if cfg.MysqlDSN, err = getMySQLConnectionString(); err != nil {
157-
log.Error(err, "get mysql dsn")
157+
log.Info("failed to get mysql DSN string", "error", err)
158158
}
159159

160160
return cfg

0 commit comments

Comments
 (0)