Changing timeouts to Duration types for giving the user an easier time setting high amoutns of time. Added support for sla-drain count and percentage policies. Coordination policy is to be implemented. Bumped up version number and fixed eimplicit recon calling the wrong API function.
This commit is contained in:
parent
2de607464f
commit
ef76abd73c
5 changed files with 84 additions and 35 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
"github.com/paypal/gorealis/gen-go/apache/aurora"
|
||||
"github.com/spf13/cobra"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
@ -13,8 +14,8 @@ func init() {
|
|||
|
||||
// Stop subcommands
|
||||
stopCmd.AddCommand(stopMaintCmd)
|
||||
stopMaintCmd.Flags().IntVar(&monitorInterval,"interval", 5, "Interval at which to poll scheduler.")
|
||||
stopMaintCmd.Flags().IntVar(&monitorTimeout,"timeout", 50, "Time after which the monitor will stop polling and throw an error.")
|
||||
stopMaintCmd.Flags().DurationVar(&monitorInterval,"interval", time.Second * 5, "Interval at which to poll scheduler.")
|
||||
stopMaintCmd.Flags().DurationVar(&monitorTimeout,"timeout", time.Minute * 1, "Time after which the monitor will stop polling and throw an error.")
|
||||
|
||||
// Stop update
|
||||
|
||||
|
@ -58,8 +59,8 @@ func endMaintenance(cmd *cobra.Command, args []string) {
|
|||
hostResult, err := monitor.HostMaintenance(
|
||||
args,
|
||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_NONE},
|
||||
monitorInterval,
|
||||
monitorTimeout)
|
||||
int(monitorInterval.Seconds()),
|
||||
int(monitorTimeout.Seconds()))
|
||||
|
||||
|
||||
maintenanceMonitorPrint(hostResult,[]aurora.MaintenanceMode{aurora.MaintenanceMode_NONE})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue