mirror of https://github.com/hashicorp/consul
Backport of Fix up case where subscription is terminated due to ACLs changing or a snapshot restore occurring into release/1.15.x (#17567)
* backport of commitpull/17572/head82e7d4fe18
* backport of commit45008e27c3
* backport of commitbdee9e3b98
--------- Co-authored-by: Andrew Stucki <andrew.stucki@hashicorp.com>
parent
d2a1795176
commit
db584696fd
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
xds: Fixed a bug where modifying ACLs on a token being actively used for an xDS connection caused all xDS updates to fail.
|
||||
```
|
|
@ -2,6 +2,7 @@ package proxycfgglue
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/go-memdb"
|
||||
|
@ -137,6 +138,12 @@ func newUpdateEvent(correlationID string, result any, err error) proxycfg.Update
|
|||
if acl.IsErrNotFound(err) {
|
||||
err = proxycfg.TerminalError(err)
|
||||
}
|
||||
// these are also errors where we should mark them
|
||||
// as terminal for the sake of proxycfg, since they require
|
||||
// a resubscribe.
|
||||
if errors.Is(err, stream.ErrSubForceClosed) || errors.Is(err, stream.ErrShuttingDown) {
|
||||
err = proxycfg.TerminalError(err)
|
||||
}
|
||||
return proxycfg.UpdateEvent{
|
||||
CorrelationID: correlationID,
|
||||
Result: result,
|
||||
|
|
Loading…
Reference in New Issue