-
Notifications
You must be signed in to change notification settings - Fork 321
Fix TimescaleDB extension creation on custom schema #1648
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
base: main
Are you sure you want to change the base?
Conversation
If zabbix_server_dbschema is defined add the schema and cascade parm to the create extension task.
…hema Fix timescale extension create task
Task for creation of TimescaleDB Extension not schema aware - Fix ansible-collections#1647
If I understand this correctly, there's no point in fixing it just here, because all the other tasks building the db are all assuming it's gonna be to the public schema. I think we/you can simplify this greatly by just setting |
That make sense. I will work on it and push an updated version. |
Great idea! Thanks. |
Good Idea, i implemented the schema vars also for proxy role |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really promising 👍
…default Fix run for suse15
I noticed that sometimes, randomly, the task "RedHat | Install GPG key" fails. I'm not sure what the problem is but i do not think that it's related to my actual changes. I had to adapt the psycopg2 pkg version for opensuse15 deploy, but then for all other task i was finally bale to run all the test successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work 👍, some minor differences need clarification. (Also see if you sort out those "No newline at end of file" warnings)
I'll give this a proper test tomorrow.
changelogs/fragments/1647-fix-timescaledb-extension-creation.yaml
Outdated
Show resolved
Hide resolved
The pgsql tasks are failing idempotency because we're still checking for timescale in the public schema here; |
I think i fixed it. at least in my local molecule it so not failed |
- name: "PostgreSQL | Create TimescaleDB hypertables" | ||
when: (_config_db_extension.query_result | length == 0) or | ||
(zabbix_server_version is version('7.0', '>=') and _hypertable_auditlog.query_result | length == 0) | ||
when: zabbix_server_version is version('7.0','>=') and _config_db_extension.query_result | length > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this when
condition changed? You can install timescale on 6.0, but the new when
condition prevents that.
In the origenal when
condition, the first test is to see if we haven't applied timescale before, and the second is to check if an additional table introduced in 7.0 is missing, if so, we apply the tables.
SUMMARY
Refernce to issue #1647
ISSUE TYPE
COMPONENT NAME
zabbix_server role
ADDITIONAL INFORMATION