2
0
mirror of https://github.com/status-im/consul.git synced 2025-01-12 14:55:02 +00:00

config-entry: fix a panic when registering a service or ingress gateway

This commit is contained in:
Daniel Nephin 2022-02-04 18:51:32 -05:00
parent 437f769916
commit 82c264b2b3
2 changed files with 4 additions and 0 deletions
.changelog
agent/consul/state

3
.changelog/12277.txt Normal file

@ -0,0 +1,3 @@
```release-note:bug
config-entry: fix a panic when creating an ingress gateway config-entry and a proxy service instance, where both provided the same upstream and downstream mapping.
```

@ -4016,6 +4016,7 @@ func insertGatewayServiceTopologyMapping(tx WriteTxn, idx uint64, gs *structs.Ga
mapping := upstreamDownstream{
Upstream: gs.Service,
Downstream: gs.Gateway,
Refs: make(map[string]struct{}),
RaftIndex: gs.RaftIndex,
}
if err := tx.Insert(tableMeshTopology, &mapping); err != nil {