Compare commits
5 commits
main
...
jsonInSupp
Author | SHA1 | Date | |
---|---|---|---|
|
d3b8d05a6a | ||
|
05557a65c8 | ||
|
b37462d006 | ||
|
e0d400e85c | ||
|
1497aca2bb |
12 changed files with 91 additions and 93 deletions
|
@ -1,5 +1,7 @@
|
||||||
0.0.10 (unreleased)
|
0.1.0 (unreleased)
|
||||||
|
|
||||||
|
* Adding support for drain sub-command to take in JSON list from stdin or from a specified file.
|
||||||
|
* Added flags `json-file` and `json` to drain, maintenance, and sla-drain.
|
||||||
|
|
||||||
0.0.9
|
0.0.9
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@ func createJob(cmd *cobra.Command, args []string) {
|
||||||
log.Fatal("unable to create Aurora job: ", err)
|
log.Fatal("unable to create Aurora job: ", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ok, monitorErr := client.InstancesMonitor(auroraJob.JobKey(),
|
if ok, monitorErr := client.MonitorInstances(auroraJob.JobKey(),
|
||||||
auroraJob.GetInstanceCount(),
|
auroraJob.GetInstanceCount(),
|
||||||
5,
|
5,
|
||||||
50); !ok || monitorErr != nil {
|
50); !ok || monitorErr != nil {
|
||||||
|
|
|
@ -58,7 +58,7 @@ func killJob(cmd *cobra.Command, args []string) {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ok, err := client.InstancesMonitor(job.JobKey(), 0, 5, 50); !ok || err != nil {
|
if ok, err := client.MonitorInstances(job.JobKey(), 0, 5, 50); !ok || err != nil {
|
||||||
log.Fatalln("Unable to kill all instances of job")
|
log.Fatalln("Unable to kill all instances of job")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ func monitorHost(cmd *cobra.Command, args []string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("Monitoring for %v at %v intervals", monitorHostCmd.monitorTimeout, monitorHostCmd.monitorInterval)
|
log.Infof("Monitoring for %v at %v intervals", monitorHostCmd.monitorTimeout, monitorHostCmd.monitorInterval)
|
||||||
hostResult, err := client.HostMaintenanceMonitor(args, maintenanceModes, monitorHostCmd.monitorInterval, monitorHostCmd.monitorTimeout)
|
hostResult, err := client.MonitorHostMaintenance(args, maintenanceModes, monitorHostCmd.monitorInterval, monitorHostCmd.monitorTimeout)
|
||||||
|
|
||||||
maintenanceMonitorPrint(hostResult, maintenanceModes)
|
maintenanceMonitorPrint(hostResult, maintenanceModes)
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ var pulseJobUpdateCmd = &cobra.Command{
|
||||||
|
|
||||||
func pulseJobUpdate(cmd *cobra.Command, args []string) {
|
func pulseJobUpdate(cmd *cobra.Command, args []string) {
|
||||||
_, err := client.PulseJobUpdate(
|
_, err := client.PulseJobUpdate(
|
||||||
&aurora.JobUpdateKey{
|
aurora.JobUpdateKey{
|
||||||
Job: &aurora.JobKey{Environment: *env, Role: *role, Name: *name},
|
Job: &aurora.JobKey{Environment: *env, Role: *role, Name: *name},
|
||||||
ID: updateID,
|
ID: updateID,
|
||||||
})
|
})
|
||||||
|
|
|
@ -37,7 +37,7 @@ var resumeJobUpdateCmd = &cobra.Command{
|
||||||
|
|
||||||
func resumeJobUpdate(cmd *cobra.Command, args []string) {
|
func resumeJobUpdate(cmd *cobra.Command, args []string) {
|
||||||
err := client.ResumeJobUpdate(
|
err := client.ResumeJobUpdate(
|
||||||
&aurora.JobUpdateKey{
|
aurora.JobUpdateKey{
|
||||||
Job: &aurora.JobKey{Environment: *env, Role: *role, Name: *name},
|
Job: &aurora.JobKey{Environment: *env, Role: *role, Name: *name},
|
||||||
ID: updateID,
|
ID: updateID,
|
||||||
},
|
},
|
||||||
|
|
|
@ -36,6 +36,8 @@ var caCertsPath string
|
||||||
var clientKey, clientCert string
|
var clientKey, clientCert string
|
||||||
var configFile string
|
var configFile string
|
||||||
var toJson bool
|
var toJson bool
|
||||||
|
var fromJson bool
|
||||||
|
var fromJsonFile string
|
||||||
var logLevel string
|
var logLevel string
|
||||||
var duration time.Duration
|
var duration time.Duration
|
||||||
var percent float64
|
var percent float64
|
||||||
|
@ -43,10 +45,9 @@ var count int64
|
||||||
var filename string
|
var filename string
|
||||||
var message = new(string)
|
var message = new(string)
|
||||||
var updateID string
|
var updateID string
|
||||||
var statusList = make([]string, 0, 0)
|
|
||||||
var log = logrus.New()
|
var log = logrus.New()
|
||||||
|
|
||||||
const australisVer = "v0.0.10"
|
const australisVer = "v0.1.0"
|
||||||
|
|
||||||
var forceDrainTimeout time.Duration
|
var forceDrainTimeout time.Duration
|
||||||
|
|
||||||
|
|
92
cmd/start.go
92
cmd/start.go
|
@ -15,6 +15,10 @@
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/paypal/gorealis/v2/gen-go/apache/aurora"
|
"github.com/paypal/gorealis/v2/gen-go/apache/aurora"
|
||||||
|
@ -23,6 +27,8 @@ import (
|
||||||
|
|
||||||
const countFlag = "count"
|
const countFlag = "count"
|
||||||
const percentageFlag = "percentage"
|
const percentageFlag = "percentage"
|
||||||
|
const jsonFlag = "json"
|
||||||
|
const jsonFileFlag = "json-file"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
rootCmd.AddCommand(startCmd)
|
rootCmd.AddCommand(startCmd)
|
||||||
|
@ -34,6 +40,8 @@ func init() {
|
||||||
// Maintenance specific flags
|
// Maintenance specific flags
|
||||||
startDrainCmd.cmd.Flags().DurationVar(&startDrainCmd.monitorInterval, "interval", time.Second*5, "Interval at which to poll scheduler.")
|
startDrainCmd.cmd.Flags().DurationVar(&startDrainCmd.monitorInterval, "interval", time.Second*5, "Interval at which to poll scheduler.")
|
||||||
startDrainCmd.cmd.Flags().DurationVar(&startDrainCmd.monitorTimeout, "timeout", time.Minute*10, "Time after which the monitor will stop polling and throw an error.")
|
startDrainCmd.cmd.Flags().DurationVar(&startDrainCmd.monitorTimeout, "timeout", time.Minute*10, "Time after which the monitor will stop polling and throw an error.")
|
||||||
|
startDrainCmd.cmd.Flags().StringVar(&fromJsonFile, jsonFileFlag, "", "JSON file to read list of agents from.")
|
||||||
|
startDrainCmd.cmd.Flags().BoolVar(&fromJson, jsonFlag, false, "Read JSON list of agents from the STDIN.")
|
||||||
|
|
||||||
/* SLA Aware commands */
|
/* SLA Aware commands */
|
||||||
startCmd.AddCommand(startSLADrainCmd.cmd)
|
startCmd.AddCommand(startSLADrainCmd.cmd)
|
||||||
|
@ -46,6 +54,8 @@ func init() {
|
||||||
startSLADrainCmd.cmd.Flags().DurationVar(&forceDrainTimeout, "sla-limit", time.Minute*60, "Time limit after which SLA-Aware drain sheds SLA Awareness.")
|
startSLADrainCmd.cmd.Flags().DurationVar(&forceDrainTimeout, "sla-limit", time.Minute*60, "Time limit after which SLA-Aware drain sheds SLA Awareness.")
|
||||||
startSLADrainCmd.cmd.Flags().DurationVar(&startSLADrainCmd.monitorInterval, "interval", time.Second*10, "Interval at which to poll scheduler.")
|
startSLADrainCmd.cmd.Flags().DurationVar(&startSLADrainCmd.monitorInterval, "interval", time.Second*10, "Interval at which to poll scheduler.")
|
||||||
startSLADrainCmd.cmd.Flags().DurationVar(&startSLADrainCmd.monitorTimeout, "timeout", time.Minute*20, "Time after which the monitor will stop polling and throw an error.")
|
startSLADrainCmd.cmd.Flags().DurationVar(&startSLADrainCmd.monitorTimeout, "timeout", time.Minute*20, "Time after which the monitor will stop polling and throw an error.")
|
||||||
|
startSLADrainCmd.cmd.Flags().StringVar(&fromJsonFile, jsonFileFlag, "", "JSON file to read list of agents from.")
|
||||||
|
startSLADrainCmd.cmd.Flags().BoolVar(&fromJson, jsonFlag, false, "Read JSON list of agents from the STDIN.")
|
||||||
|
|
||||||
startCmd.AddCommand(startMaintenanceCmd.cmd)
|
startCmd.AddCommand(startMaintenanceCmd.cmd)
|
||||||
startMaintenanceCmd.cmd.Run = maintenance
|
startMaintenanceCmd.cmd.Run = maintenance
|
||||||
|
@ -53,6 +63,8 @@ func init() {
|
||||||
// SLA Maintenance specific flags
|
// SLA Maintenance specific flags
|
||||||
startMaintenanceCmd.cmd.Flags().DurationVar(&startMaintenanceCmd.monitorInterval, "interval", time.Second*5, "Interval at which to poll scheduler.")
|
startMaintenanceCmd.cmd.Flags().DurationVar(&startMaintenanceCmd.monitorInterval, "interval", time.Second*5, "Interval at which to poll scheduler.")
|
||||||
startMaintenanceCmd.cmd.Flags().DurationVar(&startMaintenanceCmd.monitorTimeout, "timeout", time.Minute*10, "Time after which the monitor will stop polling and throw an error.")
|
startMaintenanceCmd.cmd.Flags().DurationVar(&startMaintenanceCmd.monitorTimeout, "timeout", time.Minute*10, "Time after which the monitor will stop polling and throw an error.")
|
||||||
|
startMaintenanceCmd.cmd.Flags().StringVar(&fromJsonFile, jsonFileFlag, "", "JSON file to read list of agents from.")
|
||||||
|
startMaintenanceCmd.cmd.Flags().BoolVar(&fromJson, jsonFlag, false, "Read JSON list of agents from the STDIN.")
|
||||||
}
|
}
|
||||||
|
|
||||||
var startCmd = &cobra.Command{
|
var startCmd = &cobra.Command{
|
||||||
|
@ -62,19 +74,19 @@ var startCmd = &cobra.Command{
|
||||||
|
|
||||||
var startDrainCmd = monitorCmdConfig{
|
var startDrainCmd = monitorCmdConfig{
|
||||||
cmd: &cobra.Command{
|
cmd: &cobra.Command{
|
||||||
Use: "drain [space separated host list]",
|
Use: "drain [space separated host list or use JSON flags]",
|
||||||
Short: "Place a list of space separated Mesos Agents into draining mode.",
|
Short: "Place a list of space separated Mesos Agents into draining mode.",
|
||||||
Long: `Adds a Mesos Agent to Aurora's Drain list. Agents in this list
|
Long: `Adds a Mesos Agent to Aurora's Drain list. Agents in this list
|
||||||
are not allowed to schedule new tasks and any tasks already running on this Agent
|
are not allowed to schedule new tasks and any tasks already running on this Agent
|
||||||
are killed and rescheduled in an Agent that is not in maintenance mode. Command
|
are killed and rescheduled in an Agent that is not in maintenance mode. Command
|
||||||
expects a space separated list of hosts to place into maintenance mode.`,
|
expects a space separated list of hosts to place into maintenance mode.`,
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: argsValidateJSONFlags,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var startSLADrainCmd = monitorCmdConfig{
|
var startSLADrainCmd = monitorCmdConfig{
|
||||||
cmd: &cobra.Command{
|
cmd: &cobra.Command{
|
||||||
Use: "sla-drain [space separated host list]",
|
Use: "sla-drain [space separated host list or use JSON flags]",
|
||||||
Short: "Place a list of space separated Mesos Agents into maintenance mode using SLA aware strategies.",
|
Short: "Place a list of space separated Mesos Agents into maintenance mode using SLA aware strategies.",
|
||||||
Long: `Adds a Mesos Agent to Aurora's Drain list. Agents in this list
|
Long: `Adds a Mesos Agent to Aurora's Drain list. Agents in this list
|
||||||
are not allowed to schedule new tasks and any tasks already running on this Agent
|
are not allowed to schedule new tasks and any tasks already running on this Agent
|
||||||
|
@ -84,25 +96,66 @@ If the --count argument is passed, tasks will be drained using the count SLA pol
|
||||||
when a Job does not have a defined SLA policy.
|
when a Job does not have a defined SLA policy.
|
||||||
If the --percentage argument is passed, tasks will be drained using the percentage SLA policy as a fallback
|
If the --percentage argument is passed, tasks will be drained using the percentage SLA policy as a fallback
|
||||||
when a Job does not have a defined SLA policy.`,
|
when a Job does not have a defined SLA policy.`,
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: argsValidateJSONFlags,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var startMaintenanceCmd = monitorCmdConfig{
|
var startMaintenanceCmd = monitorCmdConfig{
|
||||||
cmd: &cobra.Command{
|
cmd: &cobra.Command{
|
||||||
Use: "maintenance [space separated host list]",
|
Use: "maintenance [space separated host list or use JSON flags]",
|
||||||
Short: "Place a list of space separated Mesos Agents into maintenance mode.",
|
Short: "Place a list of space separated Mesos Agents into maintenance mode.",
|
||||||
Long: `Places Mesos Agent into Maintenance mode. Agents in this list
|
Long: `Places Mesos Agent into Maintenance mode. Agents in this list
|
||||||
are de-prioritized for scheduling a task. Command
|
are de-prioritized for scheduling a task. Command
|
||||||
expects a space separated list of hosts to place into maintenance mode.`,
|
expects a space separated list of hosts to place into maintenance mode.`,
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: argsValidateJSONFlags,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func argsValidateJSONFlags(cmd *cobra.Command, args []string) error {
|
||||||
|
if cmd.Flags().Changed(jsonFlag) && cmd.Flags().Changed(jsonFileFlag) {
|
||||||
|
return errors.New("only json file or json stdin must be set")
|
||||||
|
}
|
||||||
|
// These two flags are mutually exclusive
|
||||||
|
if cmd.Flags().Changed(jsonFlag) != cmd.Flags().Changed(jsonFileFlag) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(args) < 1 {
|
||||||
|
return errors.New("at least one host must be specified")
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func hostList(cmd *cobra.Command, args []string) []string {
|
||||||
|
var hosts []string
|
||||||
|
if cmd.Flags().Changed(jsonFlag) {
|
||||||
|
err := json.NewDecoder(os.Stdin).Decode(&hosts)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
} else if cmd.Flags().Changed(jsonFileFlag) {
|
||||||
|
data, err := ioutil.ReadFile(fromJsonFile)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
err = json.Unmarshal(data, &hosts)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
hosts = args
|
||||||
|
}
|
||||||
|
|
||||||
|
return hosts
|
||||||
|
}
|
||||||
|
|
||||||
func drain(cmd *cobra.Command, args []string) {
|
func drain(cmd *cobra.Command, args []string) {
|
||||||
|
hosts := hostList(cmd, args)
|
||||||
|
|
||||||
log.Infoln("Setting hosts to DRAINING")
|
log.Infoln("Setting hosts to DRAINING")
|
||||||
log.Infoln(args)
|
log.Infoln(hosts)
|
||||||
result, err := client.DrainHosts(args...)
|
result, err := client.DrainHosts(hosts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("error: %+v", err)
|
log.Fatalf("error: %+v", err)
|
||||||
}
|
}
|
||||||
|
@ -111,8 +164,8 @@ func drain(cmd *cobra.Command, args []string) {
|
||||||
|
|
||||||
log.Infof("Monitoring for %v at %v intervals", monitorHostCmd.monitorTimeout, monitorHostCmd.monitorInterval)
|
log.Infof("Monitoring for %v at %v intervals", monitorHostCmd.monitorTimeout, monitorHostCmd.monitorInterval)
|
||||||
// Monitor change to DRAINING and DRAINED mode
|
// Monitor change to DRAINING and DRAINED mode
|
||||||
hostResult, err := client.HostMaintenanceMonitor(
|
hostResult, err := client.MonitorHostMaintenance(
|
||||||
args,
|
hosts,
|
||||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED},
|
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED},
|
||||||
startDrainCmd.monitorInterval,
|
startDrainCmd.monitorInterval,
|
||||||
startDrainCmd.monitorTimeout)
|
startDrainCmd.monitorTimeout)
|
||||||
|
@ -125,7 +178,6 @@ func drain(cmd *cobra.Command, args []string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func slaDrainHosts(policy *aurora.SlaPolicy, interval, timeout time.Duration, hosts ...string) {
|
func slaDrainHosts(policy *aurora.SlaPolicy, interval, timeout time.Duration, hosts ...string) {
|
||||||
|
|
||||||
result, err := client.SLADrainHosts(policy, int64(forceDrainTimeout.Seconds()), hosts...)
|
result, err := client.SLADrainHosts(policy, int64(forceDrainTimeout.Seconds()), hosts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("error: %+v\n", err)
|
log.Fatalf("error: %+v\n", err)
|
||||||
|
@ -135,7 +187,7 @@ func slaDrainHosts(policy *aurora.SlaPolicy, interval, timeout time.Duration, ho
|
||||||
|
|
||||||
log.Infof("Monitoring for %v at %v intervals", timeout, interval)
|
log.Infof("Monitoring for %v at %v intervals", timeout, interval)
|
||||||
// Monitor change to DRAINING and DRAINED mode
|
// Monitor change to DRAINING and DRAINED mode
|
||||||
hostResult, err := client.HostMaintenanceMonitor(
|
hostResult, err := client.MonitorHostMaintenance(
|
||||||
hosts,
|
hosts,
|
||||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED},
|
[]aurora.MaintenanceMode{aurora.MaintenanceMode_DRAINED},
|
||||||
interval,
|
interval,
|
||||||
|
@ -148,6 +200,8 @@ func slaDrainHosts(policy *aurora.SlaPolicy, interval, timeout time.Duration, ho
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func slaDrain(cmd *cobra.Command, args []string) {
|
func slaDrain(cmd *cobra.Command, args []string) {
|
||||||
|
hosts := hostList(cmd, args)
|
||||||
|
|
||||||
// This check makes sure only a single flag is set.
|
// This check makes sure only a single flag is set.
|
||||||
// If they're both set or both not set, the statement will evaluate to true.
|
// If they're both set or both not set, the statement will evaluate to true.
|
||||||
if cmd.Flags().Changed(percentageFlag) == cmd.Flags().Changed(countFlag) {
|
if cmd.Flags().Changed(percentageFlag) == cmd.Flags().Changed(countFlag) {
|
||||||
|
@ -170,15 +224,17 @@ func slaDrain(cmd *cobra.Command, args []string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infoln("Hosts affected: ", args)
|
log.Infoln("Hosts affected: ", args)
|
||||||
slaDrainHosts(policy, startDrainCmd.monitorInterval, startDrainCmd.monitorTimeout, args...)
|
slaDrainHosts(policy, startDrainCmd.monitorInterval, startDrainCmd.monitorTimeout, hosts...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func maintenance(cmd *cobra.Command, args []string) {
|
func maintenance(cmd *cobra.Command, args []string) {
|
||||||
|
hosts := hostList(cmd, args)
|
||||||
|
|
||||||
log.Infoln("Setting hosts to Maintenance mode")
|
log.Infoln("Setting hosts to Maintenance mode")
|
||||||
log.Infoln(args)
|
log.Infoln(hosts)
|
||||||
result, err := client.StartMaintenance(args...)
|
result, err := client.StartMaintenance(hosts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("error: %+v\n", err)
|
log.Fatalf("error: %+v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debugln(result)
|
log.Debugln(result)
|
||||||
|
@ -186,8 +242,8 @@ func maintenance(cmd *cobra.Command, args []string) {
|
||||||
log.Infof("Monitoring for %v at %v intervals", monitorHostCmd.monitorTimeout, monitorHostCmd.monitorInterval)
|
log.Infof("Monitoring for %v at %v intervals", monitorHostCmd.monitorTimeout, monitorHostCmd.monitorInterval)
|
||||||
|
|
||||||
// Monitor change to DRAINING and DRAINED mode
|
// Monitor change to DRAINING and DRAINED mode
|
||||||
hostResult, err := client.HostMaintenanceMonitor(
|
hostResult, err := client.MonitorHostMaintenance(
|
||||||
args,
|
hosts,
|
||||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_SCHEDULED},
|
[]aurora.MaintenanceMode{aurora.MaintenanceMode_SCHEDULED},
|
||||||
startMaintenanceCmd.monitorInterval,
|
startMaintenanceCmd.monitorInterval,
|
||||||
startMaintenanceCmd.monitorTimeout)
|
startMaintenanceCmd.monitorTimeout)
|
||||||
|
|
|
@ -66,13 +66,13 @@ func endMaintenance(cmd *cobra.Command, args []string) {
|
||||||
log.Println(args)
|
log.Println(args)
|
||||||
result, err := client.EndMaintenance(args...)
|
result, err := client.EndMaintenance(args...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("error: %+v\n", err)
|
log.Fatalf("error: %+v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debugln(result)
|
log.Debugln(result)
|
||||||
|
|
||||||
// Monitor change to NONE mode
|
// Monitor change to NONE mode
|
||||||
hostResult, err := client.HostMaintenanceMonitor(
|
hostResult, err := client.MonitorHostMaintenance(
|
||||||
args,
|
args,
|
||||||
[]aurora.MaintenanceMode{aurora.MaintenanceMode_NONE},
|
[]aurora.MaintenanceMode{aurora.MaintenanceMode_NONE},
|
||||||
stopMaintenanceConfig.monitorInterval,
|
stopMaintenanceConfig.monitorInterval,
|
||||||
|
|
5
debian/changelog
vendored
5
debian/changelog
vendored
|
@ -1,6 +1,7 @@
|
||||||
australis (0.0.10) unstable; urgency=medium
|
australis (0.1.0) unstable; urgency=medium
|
||||||
|
|
||||||
* Unreleased
|
* Adding support for drain sub-command to take in JSON list from stdin or from a specified file.
|
||||||
|
* Added flags json-file and json to drain, maintenance, and sla-drain.
|
||||||
|
|
||||||
-- Renan DelValle <renanidelvalle@gmail.com> Wed, 29 Jan 2020 15:10:00 -0700
|
-- Renan DelValle <renanidelvalle@gmail.com> Wed, 29 Jan 2020 15:10:00 -0700
|
||||||
|
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -4,7 +4,7 @@ require (
|
||||||
github.com/BurntSushi/toml v0.3.1 // indirect
|
github.com/BurntSushi/toml v0.3.1 // indirect
|
||||||
github.com/cpuguy83/go-md2man v1.0.10 // indirect
|
github.com/cpuguy83/go-md2man v1.0.10 // indirect
|
||||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||||
github.com/paypal/gorealis/v2 v2.0.1
|
github.com/paypal/gorealis/v2 v2.21.0
|
||||||
github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e
|
github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e
|
||||||
github.com/sirupsen/logrus v1.2.0
|
github.com/sirupsen/logrus v1.2.0
|
||||||
github.com/spf13/cobra v0.0.0-20180115160933-0c34d16c3123
|
github.com/spf13/cobra v0.0.0-20180115160933-0c34d16c3123
|
||||||
|
|
62
go.sum
62
go.sum
|
@ -1,62 +0,0 @@
|
||||||
git.apache.org/thrift.git v0.12.0 h1:692K1/SsOcQvkvMRMdt60FCq2AvKpuQNM6sIeH3mN4s=
|
|
||||||
git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
|
||||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
|
||||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
|
||||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
|
||||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
|
||||||
github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk=
|
|
||||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
|
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
|
||||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
|
||||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
|
||||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
|
||||||
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
|
|
||||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
|
||||||
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
|
|
||||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
|
||||||
github.com/paypal/gorealis/v2 v2.0.1 h1:7V9jjoeRWeVWaTm9Fgc08gWq1/k/sebVDe2WeFWAVGA=
|
|
||||||
github.com/paypal/gorealis/v2 v2.0.1/go.mod h1:mJz1e40v9vHyw8dDvzGvblHcCtFuJ+eo7yPjFYnowhE=
|
|
||||||
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
|
|
||||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
|
||||||
github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e h1:+RHxT/gm0O3UF7nLJbdNzAmULvCFt4XfXHWzh3XI/zs=
|
|
||||||
github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
||||||
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
|
|
||||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
|
||||||
github.com/samuel/go-zookeeper v0.0.0-20171117190445-471cd4e61d7a h1:EYL2xz/Zdo0hyqdZMXR4lmT2O11jDLTPCEqIe/FR6W4=
|
|
||||||
github.com/samuel/go-zookeeper v0.0.0-20171117190445-471cd4e61d7a/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
|
|
||||||
github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo=
|
|
||||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
|
||||||
github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI=
|
|
||||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
|
||||||
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
|
|
||||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
|
||||||
github.com/spf13/cobra v0.0.0-20180115160933-0c34d16c3123 h1:q6iuSBmQzLC/v8wFROjMxVDNFXeev53yQKUtkoLhS10=
|
|
||||||
github.com/spf13/cobra v0.0.0-20180115160933-0c34d16c3123/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
|
|
||||||
github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk=
|
|
||||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
|
||||||
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
|
|
||||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
|
||||||
github.com/spf13/viper v1.3.1 h1:5+8j8FTpnFV4nEImW/ofkzEt8VoOiLXxdYIDsB73T38=
|
|
||||||
github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
|
|
||||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/testify v1.2.0/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
||||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
|
||||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
|
||||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
|
||||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 h1:mKdxBk7AujPs8kU4m80U72y/zjbZ3UcXC7dClwKbUI0=
|
|
||||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a h1:1n5lsVfiQW3yfsRGu98756EH1YthsFqr/5mxHduZW2A=
|
|
||||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
Loading…
Add table
Add a link
Reference in a new issue