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

Commit 3b60e93

Browse files
author
Dongsu Park
committed
Merge pull request #1666 from endocode/dongsu/fleetctl-destroy-block-flags
fleetctl: support options --no-block, --block-attempts for destroy command
2 parents 90b717e + c38bfac commit 3b60e93

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fleetctl/destroy.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var cmdDestroy = &cobra.Command{
2727
Short: "Destroy one or more units in the cluster",
2828
Long: `Completely remove one or more running or submitted units from the cluster.
2929
30-
Instructs systemd on the host machine to stop the unit, deferring to systemd
30+
Instructs systemd on the host machine to destroy the unit, deferring to systemd
3131
completely for any custom stop directives (i.e. ExecStop option in the unit
3232
file).
3333
@@ -37,6 +37,9 @@ Destroyed units are impossible to start unless re-submitted.`,
3737

3838
func init() {
3939
cmdFleet.AddCommand(cmdDestroy)
40+
41+
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.")
42+
cmdDestroy.Flags().BoolVar(&sharedFlags.NoBlock, "no-block", false, "Do not wait until the units are destroyed before exiting. Always the case for global units.")
4043
}
4144

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

0 commit comments

Comments
 (0)