irods-contrib / metalnx-web

Metalnx Web Application
https://metalnx.github.io/
BSD 3-Clause "New" or "Revised" License
36 stars 36 forks source link

How to manage pre-existing users? #305

Open messersc opened 2 years ago

messersc commented 2 years ago

Hi,

I am running metalnx in a docker-compose environment and so far it looks like everything works. But now I have run into a problem:

When users are add through iadmin mkuser, I do not see them anywhere in the metalnx web interface. Because of this, I cannot add them do groups or give permissions for collections.

However, when I try to add them in the Users screen, I get an error and the message

ERROR:  duplicate key value violates unique constraint "idx_user_main2"
DETAIL:  Key (user_name, zone_name)=(messersc@DOMAIN, tempZone) already exists.

So the workaround seems to be to delete the user through the irods admin interface and then to re-create it in metalnx.

Or is there anything I have missed? Would it be possible for metalnx to pull all existing users on startup?

Thanks a lot, Clemens

korydraughn commented 2 years ago

This looks like a bug. It could have something to do with the secondary database Metalnx uses.

We'll look into reproducing this and get a fix ready for the next release.

trel commented 2 years ago

Without looking, I would guess this is a lag in the sync process of Metalnx... If that is true, this will be "fixed", mostly with... the removal of the Metalnx database.

@messersc, can you confirm that if you wait a minute or two, the user does show up in Metalnx by itself?

messersc commented 2 years ago

Hi,

thanks a lot for the feedback. So the problem is that metalnx has its own database that is out of sync with irods, if I understand correctly.

@trel I let everything sit for 15, 20 minutes, no change. Logging out and back in does not change anything either.

What do you mean by

this will be "fixed", mostly with... the removal of the Metalnx database.

Should I try removing the database for metalnx and re-create it? I can try that, maybe metalnx currently only gets existing users the first time and not afterwards if the db already exists?

edit: apparently the latter also does not work, I only see the rodsAdmin after re-creating the database even if more users exists in irods.

Clemens

korydraughn commented 2 years ago

No, you shouldn't remove the Metalnx database. That is planned for a later release.

We are going to try and reproduce this issue, but in the mean time, you can try out the Zone Management Tool (a new administrative client). It can be found here:

It has been developed by the consortium to replace all administrative functionality provided by Metalnx. Admins are encouraged to switch to this new client if possible.

We are planning on removing administrative functionality from Metalnx and making Metalnx a rodsuser only client.