Ignore MemberAlreadyExist exception during startup. - #5765
Ignore MemberAlreadyExist exception during startup.#5765khushboobhatia01 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Looks good. Needs a changelog entry, and one of your commits is using an email address that is not attached to your github account, so you'll need to rewrite the commits to fix that (or the CLA bot will keep complaining).
Also, I wonder if there's a decent way to add a test for this. Can you look into that?
81625e5 to
0261c73
Compare
|
@khushboobhatia01 I rebased and fixed the author email. Now the CLA bot is not complaining. |
| try: | ||
| return coordinator.join_group(group_id, capabilities=capabilities).get() | ||
| except MemberAlreadyExist: | ||
| pass |
There was a problem hiding this comment.
More comment on legacy, but in the try we return whatever coordinator.join_group returns, but if memberalreadyexists we don't return anything...
I think in fact the join_group doesn't return anything - so probably just worth changing it so that we change the try to remove the "return" on the call to coordinator.join_group. Or if its expected to return something then we need to adjust the except clause...
During service startup, if service registry is enabled we register the service.
If the service member ID already exists in the registry, the service start up fails with an exception MemberAlreadyExist.
This change will ignore this exception and continue with service startup.
Why do we need this change?
Consider a scenario where pod with a Stackstorm service is running.