-
Notifications
You must be signed in to change notification settings - Fork 31
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
Resources and role_grants are not running in the correct order --maybe? #119
Comments
Thanks for the detailed report. For configs like this, Titan uses your grant config to decide how to handle custom owners. But I don't think it handles role trees currently. I will repro locally and get a fix in an upcoming release. |
I have an initial fix, but it still causes errors occasionally. Going to take a second look next week. |
I think I'm running into a similar issue. Starting from scratch on a brand new account - have my confing yml completed. I have databases set in the config yml, but get an error that it is trying to grant to the role without ever creating the database:
|
Clarifying on this, my yml is setup:
edit: making all the database roles regular roles seems to have worked. |
@GJMcClintock can you confirm which version of Titan you're on? |
@teej 0.10.13 - just installed today |
[titan-core=0.9.1]
Not sure if it's a bug or if I'm missing something.
I have a yaml configuration that contains
that fails with an error
Insufficient privileges to operate on database 'TRANSFORM_TITAN'
when trying to create one of the schemas (different one each time) in one of the databases that is owned by a custom role.e.g.
[titanadmin:SYSADMIN] > CREATE SCHEMA TRANSFORM_TITAN.MART_FINANCE DATA_RETENTION_TIME_IN_DAYS = 1 MAX_DATA_EXTENSION_TIME_IN_DAYS = 14 (err 3001, 0.10s)
If I make a copy of that configuration and remove everything after role_grants, the first run succeeds.
If I now run again the original configuration, it also succeeds.
What I think it's happening is that the order of the statements is something like:
sysadmin
before therole_grants
have been executed.If the above is correct, not sure if it's a resource lineage not tracked or if it could be solved by creating roles first, then role_grants then everything else.
Below I paste the config file that is showing the error. Apologies for the long file -- I tried minimizing the config but then the error was not reproducible all the time (sometimes it errored, sometimes it didn't), so I have just removed everything after
databases
but left the roles and role_grants.The text was updated successfully, but these errors were encountered: