diff --git a/cmd/heimdall/main.go b/cmd/heimdall/main.go index af7f20c..fc12248 100644 --- a/cmd/heimdall/main.go +++ b/cmd/heimdall/main.go @@ -72,12 +72,6 @@ func main() { Value: "redis://127.0.0.1:6379/0", EnvVar: "HEIMDALL_REDIS_URL", }, - cli.StringFlag{ - Name: "advertise-redis-url, p", - Usage: "advertise uri for peers", - Value: fmt.Sprintf("redis://%s:6379/0", heimdall.GetIP()), - EnvVar: "HEIMDALL_ADVERTISE_REDIS_URL", - }, cli.StringFlag{ Name: "peer", Usage: "grpc address to join a peer", diff --git a/cmd/heimdall/run.go b/cmd/heimdall/run.go index 8c51e94..b801f0b 100644 --- a/cmd/heimdall/run.go +++ b/cmd/heimdall/run.go @@ -52,7 +52,6 @@ func runServer(cx *cli.Context) error { EndpointPort: cx.Int("endpoint-port"), InterfaceName: cx.String("interface-name"), RedisURL: cx.String("redis-url"), - AdvertiseRedisURL: cx.String("advertise-redis-url"), } errCh := make(chan error, 1) diff --git a/config.go b/config.go index 76c1dd5..d2f8075 100644 --- a/config.go +++ b/config.go @@ -47,8 +47,6 @@ type Config struct { InterfaceName string // RedisURL is the uri to the redis backend RedisURL string - // AdvertiseRedisURL is the uri to the public redis backend - AdvertiseRedisURL string // TLSCertificate is the certificate used for grpc communication TLSServerCertificate string // TLSKey is the key used for grpc communication diff --git a/server/node.go b/server/node.go index a8243f3..fe4ca00 100644 --- a/server/node.go +++ b/server/node.go @@ -120,6 +120,7 @@ func (s *Server) configureNode() error { return err } // wait for tunnel to come up + logrus.Infof("waiting for master %s", r.Master.ID) if err := s.waitForMaster(ctx, r.Master); err != nil { return err } @@ -130,7 +131,7 @@ func (s *Server) configureNode() error { continue } - logrus.Debug("waiting for redis sync") + logrus.Infof("waiting for redis sync with %s", r.Master.ID) if err := s.waitForRedisSync(ctx); err != nil { return err } @@ -272,7 +273,7 @@ func (s *Server) joinMaster(m *v1.Master) error { conn := pool.Get() defer conn.Close() - logrus.Debugf("configuring redis as slave of %s", m.RedisURL) + logrus.Debugf("configuring redis as slave of %s", m.ID) u, err := url.Parse(m.RedisURL) if err != nil { return errors.Wrap(err, "error parsing master redis url") diff --git a/server/peer.go b/server/peer.go index 623e1d7..fe87327 100644 --- a/server/peer.go +++ b/server/peer.go @@ -71,7 +71,6 @@ func (s *Server) peerUpdater(ctx context.Context) { logrus.Debugf("starting peer config updater: ttl=%s", peerConfigUpdateInterval) t := time.NewTicker(peerConfigUpdateInterval) for range t.C { - logrus.Debug("peer config update") uctx, cancel := context.WithTimeout(ctx, peerConfigUpdateInterval) if err := s.updatePeerInfo(uctx, s.cfg.ID); err != nil { logrus.Errorf("updateLocalPeerInfo: %s", err) @@ -86,8 +85,6 @@ func (s *Server) peerUpdater(ctx context.Context) { continue } - logrus.Debugf("peer update: peers %+v", peers) - node, err := s.getNode(ctx, s.cfg.ID) if err != nil { logrus.Error(err) diff --git a/server/server.go b/server/server.go index 26f8465..9f9f60f 100644 --- a/server/server.go +++ b/server/server.go @@ -149,6 +149,7 @@ func (s *Server) Run() error { } // wait for tunnel to come up + logrus.Infof("waiting for master %s", r.Master.ID) if err := s.waitForMaster(ctx, r.Master); err != nil { return errors.Wrap(err, "error waiting for master") } @@ -158,7 +159,7 @@ func (s *Server) Run() error { return err } - logrus.Debug("waiting for redis sync") + logrus.Infof("waiting for redis sync with %s", r.Master.ID) if err := s.waitForRedisSync(ctx); err != nil { return err } @@ -253,7 +254,6 @@ func getPool(redisUrl string) (*redis.Pool, error) { auth, ok := u.User.Password() if ok { - logrus.Debug("setting masterauth for redis") if _, err := conn.Do("CONFIG", "SET", "MASTERAUTH", auth); err != nil { return nil, errors.Wrap(err, "error authenticating to redis") }