Hold a plan whose backup failed or stayed silent, say it, and ask again by a verb (issue 1066)
This commit is contained in:
@@ -884,6 +884,19 @@ func deliveryCommand(ctx context.Context, args []string) error {
|
||||
fmt.Printf("%s stopped by %s at tier %d of %d; what was asked still builds and registers, nothing further "+
|
||||
"is asked or sent\n", p.ID, *by, p.Tier, len(p.Tiers))
|
||||
return nil
|
||||
case "backups-again":
|
||||
if len(positionals) != 1 || strings.TrimSpace(*why) == "" {
|
||||
return errors.New("delivery backups-again <plan> --why <text> [--by <who>]")
|
||||
}
|
||||
var p inventory.Plan
|
||||
var again []inventory.PlanBackup
|
||||
if err := sayingOnTheBus(ctx, inv, func() (err error) {
|
||||
p, again, err = backupsAgain(ctx, inv, positionals[0], *by, strings.TrimSpace(*why))
|
||||
return err
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return answer(map[string]any{"plan": p.ID, "asked_again": again})
|
||||
case "walks":
|
||||
var walks []inventory.Plan
|
||||
if *planID != "" {
|
||||
@@ -924,7 +937,7 @@ func deliveryCommand(ctx context.Context, args []string) error {
|
||||
return answer(map[string]any{"held": deliverySeatHeld(entries), "walks": walks,
|
||||
"own-path": sortedKeysOf(ownPathWords())})
|
||||
}
|
||||
return fmt.Errorf("delivery %s: plan, order, check, go, stop or walks", sub)
|
||||
return fmt.Errorf("delivery %s: plan, order, check, go, stop, backups-again or walks", sub)
|
||||
}
|
||||
|
||||
// appliedFrom answers a machine's own report of the send a walk made to it from the controller's `apply` durations
|
||||
|
||||
Reference in New Issue
Block a user