Skip to content
Snippets Groups Projects

Create a .pgpass file if gitlab_rails['db_password'] is not nil

Closed Ian Baum requested to merge 1392-honor-database-password into master
1 unresolved thread

I think this is good.

Still need to update https://gitlab.com/help/administration/high_availability/database.md as it's reference to postgresql['sql_password'] is not accurate

Fixes #1392 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • assigned to @ibaum

  • DJ Mountney removed assignee

    removed assignee

  • assigned to @ibaum

  • Ian Baum added 1 commit

    added 1 commit

    • 064ff0b9 - Fix chef failure when PostgreSQL user doesn't exist yet

    Compare with previous version

  • Ian Baum resolved all discussions

    resolved all discussions

  • assigned to @twk3

  • DJ Mountney
  • assigned to @ibaum

  • Ian Baum added 1 commit

    added 1 commit

    • 5e733595 - Move to using lazy loading for pgpass template instead of if statement

    Compare with previous version

  • Ian Baum resolved all discussions

    resolved all discussions

  • assigned to @twk3

  • DJ Mountney
    DJ Mountney @twk3 started a thread on the diff
  • 183 183 action :nothing
    184 184 not_if { !pg_helper.is_running? || pg_helper.is_slave? }
    185 185 end
    186
    187 template 'postgresql user pgpass' do
    188 path lazy { "#{node['etc']['passwd'][postgresql_user]['dir']}/.pgpass" }
    189 source 'pgpass.erb'
    190 owner postgresql_user
    191 mode '0600'
    192 not_if { node['gitlab']['gitlab-rails']['db_password'].nil? }
  • Contributor

    I built this (if you push your branch to dev, it will spit out builds you can test) and played with it a bit. And I don't think pgpass is a fix for the issue the customer was having. I've left a comment in the issue: https://gitlab.com/gitlab-org/omnibus-gitlab/issues/1392#note_20046720 and lets get some feedback from @marin

  • @twk3 @ibaum is there a use case where this would still be helpful to users?

  • Author Developer

    @marin Seeing as nobody else is asking for it, I think we should hold off on merging for now. It's not my first choice of authentication methods for #1807 (closed) but I can't rule it out quite yet.

    I vote we cancel the merge request, but leave the branch in place for now.

  • Sounds good @ibaum

  • Please register or sign in to reply
    Loading