Add SkipUpdate() Updater method

Allow to skip the update step and reboot to ReachView
This commit is contained in:
2018-10-16 12:29:46 +02:00
parent 68e9ba80b3
commit ec2fd846cc
4 changed files with 61 additions and 21 deletions

View File

@ -3,6 +3,7 @@ package rpc
import (
"context"
"fmt"
"log"
"net/http"
"time"
@ -331,6 +332,10 @@ func (o *OrionService) updateAndReboot(rqContext context.Context, box *OrionBox,
}
reply.Status = status
if err := boxCli.SkipUpdate(); err != nil {
log.Fatalf("error while skipping update: %s", err)
}
ctx, rebootCancel := context.WithTimeout(rqContext, 55*time.Second)
defer rebootCancel()
return boxCli.RebootNow(ctx, true)