Skip to content
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

Open
wants to merge 5 commits into
base: neutron-ha-tool-maintenance
Choose a base branch
from
Open

Some fixes for router migration #33

wants to merge 5 commits into from

Conversation

matelakat
Copy link

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.

Mate Lakat added 5 commits May 16, 2017 15:28
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.
No production code change, only testing the distributed router
scenarios.
We were raising the same RuntimeError from two places. Re-structured the
code a bit to eliminate the code duplication.
@matelakat matelakat requested review from rhafer and aspiers May 16, 2017 13:57
Copy link

@aspiers aspiers left a 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 :)

Copy link

@rhafer rhafer left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants