-
Notifications
You must be signed in to change notification settings - Fork 257
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
Adding InfluxDB user returns Error: Failed to create User: user not found #5840
Comments
My original thinking was that this was a meta-node issue - for some reason I thought that URL was being proxied more or less straight through. Looking at Chronograf's source, though, that's obviously not the case. Walking through the code, it looks like where we're failing is probably here
(Incidentally, that conditional section is checked a second time almost immediately, looks like a mistake/double paste.) Anyway, under the hood that looks to be calling influx::add, that function's quite small, but there's almost certainly potential for a race there
It's running a But then it moves onto assigning permissions for that user
If that fails, we know we're going to return the error back up the call chain into the response JSON. Additionally, it doesn't make any sense for a user creation command to return "user not found", but it does make sense for a permissions operation to do so. Looking in grantPermission
So,
We're using I think the answer is that our permissions request is going to another node, and because of the size of the user's table/dataset it hasn't finished replicating across yet - reworking to ensure that the |
@sranka - Has this been triaged and scheduled for a release? We have a customer suffering from this bug. |
A solution to investigate would be to execute all statements (create user and grants) in a single InfluxQL query, without worrying about cluster implementation at all. |
@btasker thank you for your investigation, I looked a bit deeper to see that the situation in the code is different.
Chronograf UI does not allow to create users with roles and permissions, |
This needs to be run against an Enterprise/Cloud1 environment (there need to be multiple nodes)
Error: Failed to create User: user not found
Expected behavior:
The user should be added without error
Actual behavior:
The user is created, but an error is returned
The
POST
to/chronograf/v1/sources/0/users
returnsThe text was updated successfully, but these errors were encountered: