ca: fix a masked bug in leaf cert generation that would not be notified of root cert rotation after the first one (#15005)
In practice this was masked by #14956 and was only uncovered fixing the other bug. go test ./agent -run TestAgentConnectCALeafCert_goodNotLocal would fail when only #14956 was fixed.
This commit is contained in:
parent
4ba1e75259
commit
ca916eec32
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
ca: fix a masked bug in leaf cert generation that would not be notified of root cert rotation after the first one
|
||||||
|
```
|
|
@ -165,6 +165,7 @@ func (c *ConnectCALeaf) fetchDone(rootUpdateCh chan struct{}) {
|
||||||
if len(c.rootWatchSubscribers) == 0 && c.rootWatchCancel != nil {
|
if len(c.rootWatchSubscribers) == 0 && c.rootWatchCancel != nil {
|
||||||
// This was the last request. Stop the root watcher.
|
// This was the last request. Stop the root watcher.
|
||||||
c.rootWatchCancel()
|
c.rootWatchCancel()
|
||||||
|
c.rootWatchCancel = nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue