-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some fixes for router migration #33
base: neutron-ha-tool-maintenance
Are you sure you want to change the base?
Some fixes for router migration #33
Conversation
There was a bug when checking if the router has been removed - it was checking the router dict, whereas it should really check the ids.
We had 3 occurences of the above code, so it's time to extract that logic.
If a non-distributed router failed to move, we did 2 checks with no actions taken in between, removing the extra check.
We were raising the same RuntimeError from two places. Re-structured the code a bit to eliminate the code duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - didn't analyse super carefully, but the presence and addition of tests gives me confidence it's right :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Though while you're at it, could you also please fix the doc comments for list_routers_on_agent
(https://github.com/SUSE-Cloud/cookbook-openstack-network/pull/33/files#diff-937ed0b9cba9efd2521c8fd1c9e8416fR851) it still says that it returns a list of router_ids.
Added some fixes of router migration. The most important change is that we might have falsely reported that a router was deleted from the source agents, because we were not checking the router ids, we were expecting to see the same router dictionary from different api requests. Also some cosmetics applied to the code while I was there.