include sessionCookieEnabled when syncing routes#121
Conversation
| insert_batch = [x for x in source_routes if not in_list(x, existing_routes)] | ||
| delete_batch = [y for y in existing_routes if not in_list(y, source_routes)] | ||
|
|
||
| if namespace == "gw-41c0c": |
b65f165 to
8656e18
Compare
|
Ready for review. Changes worked as expected in dev and are currently deployed there. |
| traceback.print_exc() | ||
| logger.error("Error creating routes. %s" % (ex)) | ||
| raise HTTPException(status_code=400, detail="Error creating routes. %s" % (ex)) | ||
| except SystemExit as ex: |
There was a problem hiding this comment.
Are you sure it is OK to remove the raising of the SystemExit exception? I think I had to include this otherwise the SIGTERM signal is ignored if the process is in the middle of that code block. So could take longer to terminate the Pod.
There was a problem hiding this comment.
My bad - I had removed earlier when trying to resolve errors that came up when deleting a route that doesn't exist (until I saw and modeled off microservices/kubeApi/tests/routers/test_del_route.py) and should have restored them.
More generally, I should have reviewed all my changes in the commit. Thanks for the catch
|
With the most recent changes in kube_api in dev (running in Gold which is in standby mode), I observed a route needing syncing being deleted and then re-inserted on the next scheduler run. Detailed observations:
So why is delete now happening after insert? Presumably this was not always the behaviour, though it does come second in routes and was always based on route name I have set kube api back to |
|
Hmm... I think the reason is that for deletion, it really just needs to know whether the |
|
Aha thanks for digging in there. That's a tricky side effect from changing Newest code works as expected when a sync update is needed in DR: |
|
Ugh probably should have squash merged. Could do a hard reset or we live with it |
Description
Fixes APS-2743 - gwa scheduler is not using the route tag aps.route.session.cookie.enabled
Includes sessionCookieEnabled when examining the existing routes in OCP on the cluster being synced
Types of changes
Checklist