Skip to content

Commit

Permalink
Fix kubernetes cluster initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
kgantsov committed Sep 6, 2024
1 parent d9e09c1 commit cf1c09f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func main() {
if ServiceName != "" {
namespace := "default"
serviceDiscovery := cluster.NewServiceDiscoverySRV(namespace, ServiceName)
cl := cluster.NewCluster(serviceDiscovery, namespace, ServiceName, httpPort)
cl = cluster.NewCluster(serviceDiscovery, namespace, ServiceName, httpPort)

if err := cl.Init(); err != nil {
log.Warn().Msgf("Error initialising a cluster: %s", err)
Expand All @@ -89,7 +89,7 @@ func main() {
defer db.Close()

log.Info().Msgf(
"Starting node %s with HTTP on %s and Raft on %s %+v", nodeID, httpPort, raftPort, hosts,
"Starting node (%s) %s with HTTP on %s and Raft on %s %+v", ServiceName, nodeID, httpPort, raftPort, hosts,
)
node := raft.NewNode(
db, filepath.Join(dataDir, nodeID, "raft"), nodeID, httpPort, raftPort, hosts,
Expand Down

0 comments on commit cf1c09f

Please sign in to comment.