You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #18587 from ramr/fix-reload-cert-deleted
Automatic merge from submit-queue (batch tested with PRs 18587, 18296, 18667, 18665, 18532).
Fix router reload errors for deleted certificates
When a router is reloaded after a batch of route/ingress changes are committed, haproxy sometimes fail to reload. This can happen if a new request to delete a route (and so delete the associated certificates) is processed when the haproxy router is reloading. The router does recover on subsequent reloads when the config changes are actually processed.
See associated error log:
https://gist.github.com/ramr/122d70591d1fb8f97820869f7ca5550f
The change here defers the deletes till commit time and ensures we only delete the certificates for the routes that are being processed as part of the current batchset.
To recreate:
Just create and delete a number of routes in a loop ala:
```
function create_routes() {
local n=${1:-$NROUTES}
for i in `seq $n`; do
echo " - Creating route header-test-route-$i ... "
sed "s/%1/$i/g" route.json.template | oc create -f -
done
}
function delete_routes() {
local n=${1:-$NROUTES}
for i in `seq $n`; do
echo " - Deleting route header-test-route-$i ... "
oc delete route header-test-route-$i
# [ $((i%50)) == 0 ] && sleep 2
done
}
```
where `route.json.template` is just a route with the `metadata.name`, `id` and `spec.host` fields containing some text (`%1`) that gets substituted.
@knobunc@rajatchopra PTAL Thx
0 commit comments