Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Oct 2020 17:43:11 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 250186] sysutils/py-salt Postgres using hardcoded unknown user
Message-ID:  <bug-250186-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250186

            Bug ID: 250186
           Summary: sysutils/py-salt Postgres using hardcoded unknown user
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: danmcgrath.ca@gmail.com
                CC: christer.edwards@gmail.com
                CC: christer.edwards@gmail.com
             Flags: maintainer-feedback?(christer.edwards@gmail.com)

Hi,

It would seem that when I tried to put some credentials for postgres into my
/usr/local/etc/salt/minion.d/postgres.conf as follows:

  postgres.host: '/tmp'  # to use a socket
  postgres.port: '5432'
  postgres.user: 'postgres'
  postgres.pass: ''
  postgres.maintenance_db: 'postgres'

Trying to run a `salt-call postgres.db_list` (or anything) would fail,
complaining that the user "pgsql" doesn't exist.

A quick check in the file
/usr/local/lib/python3.7/site-packages/salt/modules/postgres.py around line=
 163
shows that there is a check for FreeBSD that sets the `runas =3D "pgsql"`, =
which
a few lines below ultimately sets the `user =3D runas`.

If I change this to `runas =3D "postgres"` to match the system user id, the=
 state
modules run fine.

Seeing as how runas is a param for seemingly everything (see
https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.postgres.=
html),
I suppose it is less critical, but I am thinking this is indeed a bug as it
totally ignores the config file values that I specified when called via
salt-call on the minion, but I defer to the experts!

Thanks o/

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250186-7788>