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

postgresql.conf can't be parsed due to password_encryption = scram-sha-256 #700

Closed
marcinbarczynski opened this issue Oct 20, 2020 · 1 comment

Comments

@marcinbarczynski
Copy link
Contributor

Since PostgreSQL 10 password_encryption is enum. If the value is set to scram-sha-256 (which contains hyphens), saving postgresql.conf with augeas fails with:

saving failed (run 'errors' for details)
Error in /var/lib/pgsql/13/data/postgresql.conf:782.0 (parse_skel_failed)
  Iterated lens matched less than it should
  Lens: /usr/share/augeas/lenses/dist/postgresql.aug:69.10-.46:
    Last matched: /usr/share/augeas/lenses/dist/postgresql.aug:30.10-.46:
    Next (no match): /usr/share/augeas/lenses/dist/quote.aug:117.2-.35:

This is because hyphen is not included in the definition of string that doesn't require quoting:

let word_opt_quot_re = /[A-Za-z][A-Za-z0-9_]*/

I fixed it by adding - to the regex.

marcinbarczynski added a commit to marcinbarczynski/augeas that referenced this issue Oct 20, 2020
…ercules-team#700)

Since PostgreSQL 10 password_encryption is enum.
If the value is set to scram-sha-256 (which contains hyphens),
saving postgresql.conf with augeas fails with:

saving failed (run 'errors' for details)
Error in /var/lib/pgsql/13/data/postgresql.conf:782.0 (parse_skel_failed)
  Iterated lens matched less than it should
  Lens: /usr/share/augeas/lenses/dist/postgresql.aug:69.10-.46:
    Last matched: /usr/share/augeas/lenses/dist/postgresql.aug:30.10-.46:
    Next (no match): /usr/share/augeas/lenses/dist/quote.aug:117.2-.35:

This is because hyphen wasn't included in the definition of string
that doesn't require quoting.
raphink added a commit that referenced this issue Oct 22, 2020
…700) (#701)

Since PostgreSQL 10 password_encryption is enum.
If the value is set to scram-sha-256 (which contains hyphens),
saving postgresql.conf with augeas fails with:

saving failed (run 'errors' for details)
Error in /var/lib/pgsql/13/data/postgresql.conf:782.0 (parse_skel_failed)
  Iterated lens matched less than it should
  Lens: /usr/share/augeas/lenses/dist/postgresql.aug:69.10-.46:
    Last matched: /usr/share/augeas/lenses/dist/postgresql.aug:30.10-.46:
    Next (no match): /usr/share/augeas/lenses/dist/quote.aug:117.2-.35:

This is because hyphen wasn't included in the definition of string
that doesn't require quoting.

Co-authored-by: Raphaël Pinson <raphael.pinson@camptocamp.com>
@raphink
Copy link
Member

raphink commented Oct 22, 2020

Closed by #701

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

No branches or pull requests

2 participants