Jira (PUP-10678) Augeas fails with Postgresql 13

8 views
Skip to first unread message

Frank (Jira)

unread,
Sep 25, 2020, 3:30:03 AM9/25/20
to puppe...@googlegroups.com
Frank created an issue
 
Puppet / Bug PUP-10678
Augeas fails with Postgresql 13
Issue Type: Bug Bug
Affects Versions: PUP 6.18.0
Assignee: Unassigned
Created: 2020/09/25 12:29 AM
Environment:

CentOS 7.8 64 Bit

Puppet Agent: puppet-agent-6.18.0-1.el7.x86_64

Priority: Critical Critical
Reporter: Frank

The augeas module of puppet can't parse the config file of PGSQL 13.
Using PGSQL 12 will work fine.

To reproduce:
/opt/puppetlabs/puppet/bin/augtool print /files/var/lib/pgsql/12/data/postgresql.conf

/files/var/lib/pgsql/12/data/postgresql.conf
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[1] = "-----------------------------"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[2] = "PostgreSQL configuration file"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[3] = "-----------------------------"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[4] = "This file consists of lines of the form:"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[5] = "name = value"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[6] = "(The \"=\" is optional.)  Whitespace may be used.  Comments are introduced with"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[7] = "\"#\" anywhere on a line.  The complete list of parameter names and allowed"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[8] = "values can be found in the PostgreSQL documentation."
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[9] = "The commented-out settings shown in this file represent the default values."
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[10] = "Re-commenting a setting is NOT sufficient to revert it to the default value;"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[11] = "you need to reload the server."
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[12] = "This file is read on server startup and when the server receives a SIGHUP"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[13] = "signal.  If you edit the file on a running system, you have to SIGHUP the"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[14] = "server for the changes to take effect, run \"pg_ctl reload\", or execute"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[15] = "\"SELECT pg_reload_conf()\".  Some parameters, which are marked below,"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[16] = "require a server shutdown and restart to take effect."
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[17] = "Any parameter can also be given as a command-line option to the server, e.g.,"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[18] = "\"postgres -c log_connections=on\".  Some parameters can be changed at run time"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[19] = "with the \"SET\" SQL command."
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[20] = "Memory units:  kB = kilobytes        Time units:  ms  = milliseconds"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[21] = "MB = megabytes                     s   = seconds"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[22] = "GB = gigabytes                     min = minutes"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[23] = "TB = terabytes                     h   = hours"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[24] = "d   = days"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[25] = "------------------------------------------------------------------------------"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[26] = "FILE LOCATIONS"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[27] = "------------------------------------------------------------------------------"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[28] = "The default values of these variables are driven from the -D command-line"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[29] = "option or PGDATA environment variable, represented here as ConfigDir."
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[30] = "data_directory = 'ConfigDir'\t\t# use data in another directory"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[31] = "(change requires restart)"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[32] = "hba_file = 'ConfigDir/pg_hba.conf'\t# host-based authentication file"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[33] = "(change requires restart)"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[34] = "ident_file = 'ConfigDir/pg_ident.conf'\t# ident configuration file"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[35] = "(change requires restart)"
/files/var/lib/pgsql/12/data/postgresql.conf/#comment[36] = "If external_pid_file is not explicitly set, no extra PID file is written."

/opt/puppetlabs/puppet/bin/augtool print /files/var/lib/pgsql/13/data/postgresql.conf

no result

using it in puppet it self:

Debug: Augeas[postgresql_conf](provider=augeas): /augeas/files/var/lib/pgsql/13/data/postgresql.conf/error = parse_failed
Debug: Augeas[postgresql_conf](provider=augeas): /augeas/files/var/lib/pgsql/13/data/postgresql.conf/error/pos = 3754
Debug: Augeas[postgresql_conf](provider=augeas): /augeas/files/var/lib/pgsql/13/data/postgresql.conf/error/line = 91
Debug: Augeas[postgresql_conf](provider=augeas): /augeas/files/var/lib/pgsql/13/data/postgresql.conf/error/char = 22
Debug: Augeas[postgresql_conf](provider=augeas): /augeas/files/var/lib/pgsql/13/data/postgresql.conf/error/lens = /opt/puppetlabs/puppet/share/augeas/lenses/dist/postgresql.aug:69.10-.46:
Debug: Augeas[postgresql_conf](provider=augeas): /augeas/files/var/lib/pgsql/13/data/postgresql.conf/error/message = Iterated lens matched less than it should

Line 91:

password_encryption = scram-sha-256             # md5 or scram-sha-256

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Frank (Jira)

unread,
Sep 25, 2020, 4:18:03 AM9/25/20
to puppe...@googlegroups.com
Frank commented on Bug PUP-10678
 
Re: Augeas fails with Postgresql 13

As an workaround:
modify

password_encryption = scram-sha-256 

to

password_encryption = 'scram-sha-256'

Josh Cooper (Jira)

unread,
Sep 28, 2020, 3:21:05 PM9/28/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10678

This seems like a bug in the augeas lenses shipped in puppet-agent. Moving to the PA project.

Reply all
Reply to author
Forward
0 new messages