From 0d5f8e693d4b62b1383e3cbcb0f5ceb0c91297c5 Mon Sep 17 00:00:00 2001 From: Victor Castell Date: Wed, 27 May 2015 23:13:33 +0200 Subject: [PATCH] Add profile default --- dcron/agent.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dcron/agent.go b/dcron/agent.go index 011164a9f..de70f3b5a 100644 --- a/dcron/agent.go +++ b/dcron/agent.go @@ -56,7 +56,7 @@ func (a *AgentCommand) readConfig(args []string) *Config { viper.SetDefault("discover", cmdFlags.Lookup("discover").Value) cmdFlags.String("etcd-machines", "127.0.0.1:2379", "etcd machines addresses") viper.SetDefault("etcd_machines", cmdFlags.Lookup("etcd-machines").Value) - cmdFlags.String("profile", "", "timing profile to use (lan, wan, local)") + cmdFlags.String("profile", "lan", "timing profile to use (lan, wan, local)") viper.SetDefault("profile", cmdFlags.Lookup("profile").Value) cmdFlags.Bool("server", false, "start dcron server") viper.SetDefault("server", cmdFlags.Lookup("server").Value) @@ -78,6 +78,7 @@ func (a *AgentCommand) readConfig(args []string) *Config { Discover: viper.GetString("discover"), EtcdMachines: viper.GetStringSlice("etcd_machines"), Server: viper.GetBool("server"), + Profile: viper.GetString("profile"), } return config @@ -358,7 +359,6 @@ func (a *AgentCommand) schedulerRestart() { } func (a *AgentCommand) schedulerReloadQuery(leader string) { - params := &serf.QueryParam{ FilterNodes: []string{leader}, RequestAck: true, @@ -371,6 +371,7 @@ func (a *AgentCommand) schedulerReloadQuery(leader string) { ackCh := qr.AckCh() respCh := qr.ResponseCh() + ack := <-ackCh log.Info("Received ack from the leader", ack) resp := <-respCh