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

Add functionality to erase members from networks using file backend i… #822

Merged
merged 1 commit into from
Sep 25, 2018

Conversation

dschulz
Copy link
Contributor

@dschulz dschulz commented Aug 2, 2018

The FileDB.cpp was lacking the functionality to actually delete members from networks.
This patch allows to delete the .json files corresponding to members in any given network.

Signed-off-by: Diego Schulz dschulz@gmail.com

…n controller microservice

Signed-off-by: Diego Schulz <dschulz@gmail.com>
@dschulz
Copy link
Contributor Author

dschulz commented Aug 2, 2018

This is only a partial fix. The json files get deleted right away when the DELETE method is issued to the controller api, but the member still appears when querying the member list for the same network. When the daemon is restarted after that, the member disappears, though.

I'm not sure why this is not working as I expected. I can only guess it has something to do with the _memberChanged() function.

@adamierymenko can you please take a quick look and comment on this? Thanks!

@adamierymenko adamierymenko merged commit 7a42416 into zerotier:dev Sep 25, 2018
@adamierymenko
Copy link
Contributor

This is related to #859

@lpbpu
Copy link

lpbpu commented Jan 11, 2019

@dschulz , the reason why member still appears when DELETE from controller api, just because misuse of DB:get function to get member's config
In FileDB::eraseMember
get(networkId,network);
get(memberId,member);
should changed to
get(networkId,network,memberId,member);

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

Successfully merging this pull request may close these issues.

3 participants