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

[master] Use "checksums" args when calling "postgres.datadir_init" #55578

Conversation

meaksh
Copy link
Contributor

@meaksh meaksh commented Dec 10, 2019

This PR ports #54770 to master branch, which is fixing a bug existing on 2019.2.x release.


What does this PR do?

This PR fixes an issue inside postgres.datadir_init that is causing the accepted argument checksums is not being taken into account.

Therefore, without this PR, when you execute postgres.datadir_init or postgres_initdb.present state, the checksums argument is not used.

Previous Behavior

Given the following state:

pgsql-data-dir:
  postgres_initdb.present:
    - name: /var/lib/pgsql/data
    - auth: password
    - user: postgres
    - password: xxxxxx
    - encoding: UTF8
    - locale: C
    - runas: postgres
    - checksums: true

After applying it, the created DB is not created properly:

# su - postgres
postgres@postgres:~> psql
Password:
psql (10.10)
Type "help" for help.

postgres=# show data_checksums;
 data_checksums
----------------
 off                                                                                                                                                                                                 
(1 row)

postgres=#

New Behavior

Applying the same state produces a DB created successfully:

# su - postgres
postgres@postgres:~> psql
Password:
psql (10.10)
Type "help" for help.

postgres=# show data_checksums;
 data_checksums
----------------
 on                                                                                                                                                                                                 
(1 row)

postgres=#

Tests written?

[NOTICE] Bug fixes or features added to Salt require tests.
Please review the test documentation for details on how to implement tests into Salt's test suite.

Yes

Commits signed with GPG?

Yes

@meaksh meaksh requested a review from a team as a code owner December 10, 2019 09:20
@ghost ghost requested a review from garethgreenaway December 10, 2019 09:20
@dwoz dwoz merged commit 40e55b5 into saltstack:master Jan 10, 2020
@meaksh meaksh deleted the master-use-checksums-args-in-postgres.datadir_init branch January 13, 2020 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants