Skip to content

Bootstrap failures with read-only simp_puppetdb grants and puppetlabs/puppetdb 7.9.0+ #843

Description

@op-ct

During a SIMP EE install, @AndyAdrian-OP ran into some Postgresql errors failures during simp-bootstrap with puppetlabs/puppetlabs-puppetdb 7.10.1.

Debug: Executing with uid=postgres gid=postgres: 'psql -d puppetdb -t -X -c "SELECT COUNT(*) FROM (SELECT
                  ns.nspname,
                  acl.defaclobjtype,
                  acl.defaclacl
                FROM pg_default_acl acl
                JOIN pg_namespace ns ON acl.defaclnamespace=ns.oid
                WHERE acl.defaclacl::text ~ '.*\\\"simp_puppetdb\\\"=X/puppetdb\\".*'
                AND nspname = 'public') count"'[0m

Error: /Stage[main]/Puppetdb::Database::Postgresql/Puppetdb::Database::Read_only_user[simp_puppetdb]/Puppetdb::Database::Default_read_grant[puppetdb grant read permission on new objects from puppetdb to simp_puppetdb]/Postgresql_psql[grant default select permission for simp_puppetdb]: Could not evaluate: Error evaluating 'unless' clause, returned pid 2950 exit 1: 'sh: -c: line 7: unexpected EOF while looking for matching `''
sh: -c: line 8: syntax error: unexpected end of file

Among other things, these failures prevented the catalog from installing the puppetdb package (which provides the puppetdb user) resulting in many other apparently unrelated file permissions failures related to PuppetDB (this should probably be prevented by resource-ordering in the puppetlabs/puppetlabs-puppetdb module).

Related upstream issues:

Relevant discussions:

@AndyAdrian-OP implemented the proposed alternative fix in puppetlabs/puppetdb#339, but ran into other problems:

that fix gets past that issue, but then we get errors enabling SSL in postgresql (and a bunch of option deprecations). I've asked Brandon to use puppetdb 7.8.0 and rebuild

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions