Skip to content

Disable user management on slave nodes

Richard Clamp requested to merge 2981-no-modify-on-secondary into master

When a node is running as a slave, it cannot make changes to any tables, attempts to manage the password result in an error about being in a read-only transaction:

  Recipe: repmgr::enable
    * template[/var/opt/gitlab/postgresql/repmgr.conf] action create (up to date)
    * postgresql_user[gitlab_repmgr] action create
      * execute[create gitlab_repmgr postgresql user] action run (skipped due to not_if)
      * execute[set password for gitlab_repmgr postgresql user] action run
        [execute] ERROR:  cannot execute ALTER ROLE in a read-only transaction

Here we fix a usage of postgresql_user in the repmgr::enable recipe, which was provoking that error.

Closes #2981 (closed)

Edited by GitLab Release Tools Bot

Merge request reports