Skip to content

Commit

Permalink
etcd: Fix backport "Fix incorrect context usage in session renewal"
Browse files Browse the repository at this point in the history
Session success was never reported due to a chunk being omitted

Fixes: 0bbe6a6
Signed-off-by: Thomas Graf <thomas@cilium.io>
  • Loading branch information
tgraf committed Aug 3, 2020
1 parent 0bbe6a6 commit 3317c4f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/kvstore/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ func (e *etcdClient) renewSession(ctx context.Context) error {
e.UnlockIgnoreTime()
return fmt.Errorf("unable to renew etcd session: %s", err)
}
sessionSuccess <- true
log.Infof("Got new lease ID %x", newSession.Lease())

e.session = newSession
Expand Down Expand Up @@ -561,6 +562,7 @@ func (e *etcdClient) renewLockSession(ctx context.Context) error {
e.UnlockIgnoreTime()
return fmt.Errorf("unable to renew etcd lock session: %s", err)
}
sessionSuccess <- true
log.Infof("Got new lock lease ID %x", newSession.Lease())

e.lockSession = newSession
Expand Down

0 comments on commit 3317c4f

Please sign in to comment.