Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1666 from endocode/dongsu/fleetctl-destroy-block-…
Browse files Browse the repository at this point in the history
…flags

fleetctl: support options --no-block, --block-attempts for destroy command
  • Loading branch information
Dongsu Park committed Aug 23, 2016
2 parents 90b717e + c38bfac commit 875d938
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fleetctl/destroy.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var cmdDestroy = &cobra.Command{
Short: "Destroy one or more units in the cluster",
Long: `Completely remove one or more running or submitted units from the cluster.
Instructs systemd on the host machine to stop the unit, deferring to systemd
Instructs systemd on the host machine to destroy the unit, deferring to systemd
completely for any custom stop directives (i.e. ExecStop option in the unit
file).
Expand All @@ -37,6 +37,9 @@ Destroyed units are impossible to start unless re-submitted.`,

func init() {
cmdFleet.AddCommand(cmdDestroy)

cmdDestroy.Flags().IntVar(&sharedFlags.BlockAttempts, "block-attempts", 0, "Wait until the units are destroyed, performing up to N attempts before giving up. A value of 0 indicates no limit. Does not apply to global units.")
cmdDestroy.Flags().BoolVar(&sharedFlags.NoBlock, "no-block", false, "Do not wait until the units are destroyed before exiting. Always the case for global units.")
}

func runDestroyUnit(cCmd *cobra.Command, args []string) (exit int) {
Expand Down

0 comments on commit 875d938

Please sign in to comment.