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

Use "checksums" args when calling "postgres.datadir_init" #54770

Conversation

meaksh
Copy link
Contributor

@meaksh meaksh commented Sep 26, 2019

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 September 26, 2019 15:12
@ghost ghost requested a review from Ch3LL September 26, 2019 15:12
@dwoz
Copy link
Contributor

dwoz commented Dec 9, 2019

@meaksh This needs to be re-opened against the master branch. We are no
longer accepting PRs to the 2019.2. If this fixes a bug in a 2019.2.x
release, please make note of it in your PR to master. Thanks!

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