diff --git a/cmd/agent/main.go b/cmd/agent/main.go index f4911a15f3..41c8f0aa65 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -11,7 +11,7 @@ import ( func main() { app := cmds.NewApp() - app.Commands = []cli.Command{ + app.Commands = []*cli.Command{ cmds.NewAgentCommand(agent.Run), } diff --git a/pkg/agent/loadbalancer/loadbalancer_test.go b/pkg/agent/loadbalancer/loadbalancer_test.go index 4e57f9a0bb..2a9b1f3560 100644 --- a/pkg/agent/loadbalancer/loadbalancer_test.go +++ b/pkg/agent/loadbalancer/loadbalancer_test.go @@ -2,7 +2,6 @@ package loadbalancer import ( "bufio" - "context" "errors" "fmt" "io/ioutil" @@ -106,7 +105,7 @@ func TestFailOver(t *testing.T) { DataDir: tmpDir, } - lb, err := New(context.Background(), cfg.DataDir, SupervisorServiceName, cfg.ServerURL) + lb, err := New(cfg.DataDir, SupervisorServiceName, cfg.ServerURL) if err != nil { assertEqual(t, err, nil) } @@ -157,7 +156,7 @@ func TestFailFast(t *testing.T) { DataDir: tmpDir, } - lb, err := New(context.Background(), cfg.DataDir, SupervisorServiceName, cfg.ServerURL) + lb, err := New(cfg.DataDir, SupervisorServiceName, cfg.ServerURL) if err != nil { assertEqual(t, err, nil) } diff --git a/pkg/server/server.go b/pkg/server/server.go index 5710dfc374..89b7bb05fe 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -103,7 +103,7 @@ func startWrangler(ctx context.Context, config *Config) error { return case <-config.ControlConfig.Runtime.APIServerReady: if err := runControllers(ctx, config); err != nil { - logrus.Fatal("failed to start controllers: %v", err) + logrus.Fatalf("failed to start controllers: %v", err) } } }() @@ -433,7 +433,7 @@ func setMasterRoleLabel(ctx context.Context, nodes v1.NodeClient) error { node.Labels[MasterRoleLabelKey] = "true" _, err = nodes.Update(node) if err == nil { - logrus.Infof("master role label has been set succesfully on node: %s", nodeName) + logrus.Infof("master role label has been set successfully on node: %s", nodeName) break } select {