Skip to content
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

Clean up PostgreSQL DB creation logic #904

Merged
merged 9 commits into from
Nov 7, 2023
Merged

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Nov 6, 2023

This started with the goal of getting rid of /root/.pgpass and instead use environment variables, but it escalated. See individual commits for details.

@evgeni
Copy link
Member

evgeni commented Nov 7, 2023

ACK, but not going to merge, @ekohl might or might not want to squash my fixups into the right real commits ;)

ekohl added 9 commits November 7, 2023 12:02
This uses nesting and inheritance to provide a context and further
refine it.

It also drops the case where it always provided the default database
port and a specific example without it. It now only tests the case where
it's provided no database port and a custom one.
Fixes: b1f38dd ("Drop Zabbix 2/3/4.2/4.4 support")
This makes the commands easier and doesn't require to store the password
plain text in a file.
This also uses the creates option for exec.
This uses zcat and a pipe to unpack the file on the fly.
This is not used anywhere within the class and only slows things down.
@ekohl
Copy link
Member Author

ekohl commented Nov 7, 2023

I did want to squash those up. I also extended the Drop unused zabbix_server_{images,data}_sql commit to do the same thing for MySQL. Made it easier to reason about in the tests :)

@ekohl ekohl linked an issue Nov 7, 2023 that may be closed by this pull request
@evgeni evgeni merged commit 3551fff into voxpupuli:master Nov 7, 2023
54 checks passed
@ekohl ekohl deleted the clean-up-pg-db branch November 7, 2023 12:53
@evgeni evgeni added the enhancement New feature or request label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exec[update_pgpass] failed
3 participants