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
User sync removes already existing users #343
Comments
I had the same issue when trying to use oncall. I am no expert in Python langage, so maybe my solution is not the best, or even breaks something else. |
Hello @altaroin, thanks for the explanation. I reached the same solution.
For people with this issue in the future, the issues is caused by the problem explained by @altaroinj. The simple solution is to decode the user like in his (or mine) code example. |
@altaroinj or @pavanfhw, could either of you validate if this change fixes your issue? Internally we use a different custom sync script but I want to make sure the current code is not broken for those that are using the existing ldap sync diegocepedaw@f61fad1 |
@diegocepedaw, I can you confirm that it solved the problem. |
I think this is a misconfiguration on my part, but every loop of the
oncall-user-sync
it get the users from LDAP server and tries to add them to the database. But if the user already exists it gives the error for each user:(1062, "Duplicate entry '<my user on ldap server>' for key 'user.username_unique'")
And then the users gets removed from the database (also its contacts etc). The next iteration it inserts all the users present in the LDAP server. Next time it removes them again for the same reason given above. This does not make sense. I am not being able to understand why it is happening. Can someone give correct configuration example for this features?
The text was updated successfully, but these errors were encountered: