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

Commit 7e9d5a8

Browse files
authored
Merge pull request #113 from dghubble/unused-method
pkg/agent: Remove unused waitForRebootSignal
2 parents 5e348fa + 7eae8ac commit 7e9d5a8

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

pkg/agent/agent.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package agent
22

33
import (
4-
"context"
54
"fmt"
65
"time"
76

@@ -227,28 +226,6 @@ func (k *Klocksmith) watchUpdateStatus(update func(s updateengine.Status), stop
227226
}
228227
}
229228

230-
// waitForRebootSignal watches update_engine and waits for
231-
// updateengine.UpdateStatusUpdatedNeedReboot
232-
func (k *Klocksmith) waitForRebootSignal() error {
233-
// first, check current status.
234-
status, err := k.ue.GetStatus()
235-
if err != nil {
236-
return fmt.Errorf("failed to get update_engine status: %v", err)
237-
}
238-
239-
// if we're not in UpdateStatusUpdatedNeedReboot, then wait for it.
240-
if status.CurrentOperation != updateengine.UpdateStatusUpdatedNeedReboot {
241-
ctx, cancel := context.WithCancel(context.Background())
242-
stc := make(chan updateengine.Status)
243-
go k.ue.RebootNeededSignal(stc, ctx.Done())
244-
<-stc
245-
cancel()
246-
}
247-
248-
// we are now in UpdateStatusUpdatedNeedReboot state.
249-
return nil
250-
}
251-
252229
// waitForOkToReboot waits for both 'ok-to-reboot' and 'needs-reboot' to be true.
253230
func (k *Klocksmith) waitForOkToReboot() error {
254231
n, err := k.nc.Get(k.node, v1meta.GetOptions{})

0 commit comments

Comments
 (0)