From af21dd67c7017512fe4b67f098f201e859df6af6 Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Mon, 25 Mar 2019 13:00:58 -0700 Subject: [PATCH] bug fix: wrong monitor value being used for slaPercentage. --- cmd/start.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/start.go b/cmd/start.go index 837e6f5..be648f2 100644 --- a/cmd/start.go +++ b/cmd/start.go @@ -35,8 +35,8 @@ func init() { startSLAPercentageDrainCmd.cmd.Run = SLAPercentageDrain // SLA Maintenance specific flags - startSLAPercentageDrainCmd.cmd.Flags().DurationVar(&startSLACountDrainCmd.monitorInterval, "interval", time.Second*10, "Interval at which to poll scheduler.") - startSLAPercentageDrainCmd.cmd.Flags().DurationVar(&startSLACountDrainCmd.monitorTimeout, "timeout", time.Minute*20, "Time after which the monitor will stop polling and throw an error.") + startSLAPercentageDrainCmd.cmd.Flags().DurationVar(&startSLAPercentageDrainCmd.monitorInterval, "interval", time.Second*10, "Interval at which to poll scheduler.") + startSLAPercentageDrainCmd.cmd.Flags().DurationVar(&startSLAPercentageDrainCmd.monitorTimeout, "timeout", time.Minute*20, "Time after which the monitor will stop polling and throw an error.") startSLAPercentageDrainCmd.cmd.Flags().Float64Var(&percent, "percent", 80.0, "Percentage of instances that should be running to meet SLA.") startSLAPercentageDrainCmd.cmd.Flags().DurationVar(&duration, "duration", time.Minute*1, "Minimum time duration a task needs to be `RUNNING` to be treated as active.") startSLAPercentageDrainCmd.cmd.Flags().DurationVar(&forceDrainTimeout, "sla-limit", time.Minute*60, "Time limit after which SLA-Aware drain sheds SLA Awareness.") @@ -140,7 +140,7 @@ func slaDrain(policy *aurora.SlaPolicy, interval, timeout time.Duration, hosts . log.Debugln(result) - log.Infof("Monitoring for %v at %v intervals", monitorHostCmd.monitorTimeout, monitorHostCmd.monitorInterval) + log.Infof("Monitoring for %v at %v intervals", timeout, interval) // Monitor change to DRAINING and DRAINED mode hostResult, err := client.HostMaintenanceMonitor( hosts,