User management settings changed in Mender 2.4.0b?

Not sure… The UI is not my specialty, so I will refer this to @mzedel. He’s out of office right now, but I hope he will answer soon.

Hi @kacf,

This looks interesting, If u say it works for you, then I would like to go ahead and upgrade to 2.4.0, But Im lil afraid to do it now, We have a major deploymenxt in next 10 days and Also I dnt want to be in 2.4.0b (beta version rgt),

So please advice me should I upgrade (any risk involved), I have data, I dont wana lose it now. Guide me to a proper upgrade. I have seen the doc where it is upgraded, but just want ur professional advice too

My advice would be: If you are on 2.4.0b1, then it is safe to upgrade to 2.4.0, and I recommend it. If you are on 2.3.1 or earlier, then I would wait until you have a calm period, just in case there are some migration problems.

Sure then, I guess I have to upgrade, But tell me one thing, Just to confirm, the Mender client are connect to this server using a server.crt, When I upgrade, it wont be disturbed rgt? It will still be connected to this server unless I change the server certificate or the DNS name?? Isn’t it, Just want to make sure if nothing will be disturbed?

Please tell me how to upgrade, Just follow that guide
https://docs.mender.io/2.4/administration/upgrading – This doc rgt? for 2.4.0 Upgrade

Should I back up data using Mender documentationn?

@genedupre the 2.4.0 image (mendersoftware/gui:mender-2.4.0) has the fix in - however only the latest master image (as in: built yesterday afternoon) has it, due to some additions that didn’t make it into 2.4 and prevented us from applying the same change…
If you are still not seeing the settings make sure none of the HAVE_MULTITENANT, HAVE_ENTERPRISE or MENDER_HOSTED env vars are set on the gui container - as they all would indicate RBAC availability and a user role would get priority.
I hope that helps!

@nishad1092 that link is correct and although backing up data might not be required it is recommended and especially if there is any data you don’t want to lose it is better to be safe than sorry IMHO

2 Likes

Hi @mzedel,
can confirm everything is working as intended with the master git from 2020-08-06
Gene

Hi @mzedel,
Thanks for helping with the MEN-3968 bug I was experiencing after upgrading from Mender 2.2.0 to 2.5.0.

Unfortunately, I just noticed that I’m also affected by the bug discussed here.
Even though we are talking about the 2.5.0 release (and not 2.4.0), I’m missing the “User management” button since the upgrade from 2.2.0. The other Mender instance on 2.2.0 still has it.

I already pulled the very latest mendersoftware/gui:mender-2.5.0 image and checked the environment variables of the running container to verify that neither of HAVE_MULTITENANT, HAVE_ENTERPRISE, and MENDER_HOSTED are set.
Unfortunately, the problem still persists.

Any idea what’s going wrong here or what I could try?
Was the fix accidentally removed from the 2.5.0 GUI?

Thanks a lot!

Colin

I’m encountering the same issue on the 2.5.0 GUI, the User Management button is absent. I’m also unable to add new user accounts through CLI:

./run exec mender-useradm /usr/bin/useradm create-user --username=sample@example.com --password=temporaryPassword
creating user failed: useradm: failed to create user in the db: (IndexOptionsConflict) Index with name: email_1 already exists with a different name

obviously, using a real email address in the actual arguments. The email address being provided for username is unique, and has never been used before.

EDIT: I’ve attempted to create a user through API calls to useradm. While I am able to GET the users list and user info, trying to POST a new user fails with code 500 Internal Server Error:

{
    "error": "internal error",
    "request_id": "e5243e2d-8f14-401b-8f76-09d7ec87b2d2"
}

This API failure doesn’t appear to be a permissions issue on the surface, as both GET /users and POST /users are stated to require ManagementJWT in the documentation, I’m able to GET /users without issue. Is this a role issue on some deeper level with the Enterprise split?

Hi @Thomas_Love I cannot replicate this. I launched a 2.5.0 on-prem production setup and was able to create the user with the mender-useradm command. This is not a generic problem at least.

@peter any ideas?

Do you have a User Management button in the webGUI on that 2.5.0 setup?

No. That may be a result of the Enterprise split since that is the primary interface for the Multitenancy feature that is only in that paln. But the creation of the login user with /usr/bin/useradm still works for me. @tranchitella may also have some input here.

@Thomas_Love this is a bug caused by the upgrade of old installations to Mender 2.5. Can you please try connecting to the useradm database in mongodb and remove any index on the users collection containing the “email” field?

Hi @tranchitella thank you for the insight. What do you recommend as a command to mongodb to remove that field without affecting the rest of the user data? I’m not too experienced with mongodb conventions.

@Thomas_Love

something like:

use useradm
db.users.getIndexes()
db.dropIndex(“name_of_the_index”)

Where name_of_the_index is the name of the index on the email field you can see from the getIndexes output.