-
Notifications
You must be signed in to change notification settings - Fork 5.5k
influxdb_user can't create cluster admins in current InlluxDB versions #33495
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
Comments
Looks like that definitely needs to get fixed. @bbinet do you have any opinions as well on wether InfluxDB 0.8 support should be kept into the module? |
I'd like to keep 0.8 support if possible because I've not migrated yet (and this could also be the case for other users because influxdb has dramatically changed in the following versions), but it could be renamed to something like "influxdb08". |
Thanks for your comments, @bbinet. I am curious as to how you got the module working with InfluxDB 0.8 at all as current versions of the influxdb Python module require you to use This does not seem to be the case in the salt execution module, so I am a bit surprised that you can still use it. Do you propose to maintain two influxdb modules, one for 0.8 and one for later versions, named influxdb08 and influxdb respectively? Which one would the state(s) use, or rather, how would they know which one to use? |
I'm still using an old version of influxdb-python too. Yes my proposal was to maintain two separate influxdb modules because the API has completely changed since v0.8. It could be as simple as renaming the current influxdb module with the "08" suffix, and start from scratch new modules for InfluxDB v0.13+. Finally I'm also fine with dropping InfluxDB v0.8 support altogether: it will force me to migrate. But it might be problematic for some other saltstack users who are stuck with influxdb v0.8. |
Thank you for elaborating! I see no inherent value in dropping support for an InfluxDB release that is still used by many people, apart from the fact that it would significantly simplify the codebase. My feeling right now is that dropping 0.8 support at the moment would disgruntle some people who are still on 0.8 and can't move to newer versions for one reason or another. I'll see how much work it'll be to support both 0.8 and later versions in salt. |
The influxdb state and execution modules are unfortunately quite specific to InfluxDB 0.8. In particular the user administration has changed dramatically between 0.8 and 0.9. InfluxDB 0.8 differentiated between cluster admins (i.e. users not tied to a database) and database users that are created in the context of a specific database. InfluxDB 0.9 changed this model to one in which users and admin users are created globally and then granted certain privileges on individual databases. Compare https://docs.influxdata.com/influxdb/v0.8/api/administration/ to https://docs.influxdata.com/influxdb/v0.9/administration/authentication_and_authorization/#authorization to see what I mean. The Any opinions on how to solve this? I am interested in getting Saltstack to work with current InfluxDB releases and don't necessarily want to break the current situation for 0,8 users, but the more I look into this the more work I see :) |
I see the following options at this point:
Which route do you prefer? I am sort of torn between 2 and 3 and the "clean slate" of 1, with a slight preference for 2 (which is due to me not using 0.8). |
Personally I'm all for the 2nd option. |
@bbinet - I pushed some commits I'm currently working on to https://github.com/babilen/salt/tree/influxdb-current which should allow you to manage InfluxDB 0.8 databases and users with current versions of the influxdb-python module. The states have been renamed to |
Ok, thanks. I don't have much time these days, so don't wait for me to move forward (I will test your changes when I have some spare time, but don't know when). |
Sure, no rush. I just figured that some feedback is better than no feedback :) |
Ok, I was going to implement the missing features that in v0.9. Because current InfluxDB module and state are so basic! But I see @BABILEN did a good job! So what do we need to do now? Test that against InfluxDB 0.8 and 0.9? |
I waited for a new https://github.com/influxdata/influxdb-python/ release that included influxdata/influxdb-python#331 and influxdata/influxdb-python#330. Some testing of the modules and states at https://github.com/babilen/salt/tree/influxdb-current would be great. I'll open a PR soon. |
Uh oh!
There was an error while loading. Please reload this page.
Description of Issue/Question
The influxdb_user state can create two types of users, namely normal ones and cluster admins. The decision to create one or the other is based on the value of the "database" argument in that a cluster admin is created if no database is specified.
Unfortunately changes introduced in #31787 which allowed this state to be used in influxdb 0.9 and later versions, only allow for the creation of "normal users" and not cluster admins.
It would be relatively straightforward to fix this and I simply wanted to ask before providing a PR if we want to provide support for InfluxDB 0.8 or if support for that could be dropped.
Steps to Reproduce Issue
Try to create a cluster admin user using
influxdb_user.present
by not setting thedatabase
argument.The text was updated successfully, but these errors were encountered: