mirror of
https://github.com/siderolabs/talos.git
synced 2025-12-06 18:11:33 +01:00
fix: talosctl reboot command passing mode in wait mode
The reboot mode was not passed correctly in wait mode. Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
This commit is contained in:
parent
34ab0007a6
commit
c449cb736b
@ -67,7 +67,7 @@ var rebootCmd = &cobra.Command{
|
|||||||
return action.NewTracker(
|
return action.NewTracker(
|
||||||
&GlobalArgs,
|
&GlobalArgs,
|
||||||
action.MachineReadyEventFn,
|
action.MachineReadyEventFn,
|
||||||
rebootGetActorID,
|
rebootGetActorID(opts...),
|
||||||
action.WithPostCheck(postCheckFn),
|
action.WithPostCheck(postCheckFn),
|
||||||
action.WithDebug(rebootCmdFlags.debug),
|
action.WithDebug(rebootCmdFlags.debug),
|
||||||
action.WithTimeout(rebootCmdFlags.timeout),
|
action.WithTimeout(rebootCmdFlags.timeout),
|
||||||
@ -75,8 +75,9 @@ var rebootCmd = &cobra.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func rebootGetActorID(ctx context.Context, c *client.Client) (string, error) {
|
func rebootGetActorID(opts ...client.RebootMode) func(ctx context.Context, c *client.Client) (string, error) {
|
||||||
resp, err := c.RebootWithResponse(ctx)
|
return func(ctx context.Context, c *client.Client) (string, error) {
|
||||||
|
resp, err := c.RebootWithResponse(ctx, opts...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
@ -86,6 +87,7 @@ func rebootGetActorID(ctx context.Context, c *client.Client) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return resp.GetMessages()[0].GetActorId(), nil
|
return resp.GetMessages()[0].GetActorId(), nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user