public inbox for [email protected]  
help / color / mirror / Atom feed
Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0
4+ messages / 2 participants
[nested] [flat]

* Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0
@ 2022-05-11 14:07 Tomas Pospisek <[email protected]>
  2022-05-11 14:34 ` Re: Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Christoph Berg <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Tomas Pospisek @ 2022-05-11 14:07 UTC (permalink / raw)
  To: [email protected]

Dear packagers,

Due to the change of user under which pgbouncer runs (before: user 
pgbouncer, new: user postgres), an upgrade from 1.16.1 to 1.17.0 will 
break systems.

     # cat /var/log/apt/history.log
     [...]
     Upgrade: pgbouncer:amd64 (1.16.1-1.pgdg20.04+1,
              1.17.0-3.pgdg20.04+1)

     # cat /etc/apt/sources.list.d/apt_postgresql_org_pub_repos_apt.list
     deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main

Workaround:

     # chown postgres.postgres /etc/pgbouncer/*
     # # the next line depends on where pgbouncer is set up to save
     # # its logs go - see /etc/pgbouncer/pgbouncer.ini
     # chown -R postgres.postgres /var/log/pgbouncer/
     # # see preceeding comment
     # chown postgres.postgres /var/log/postgres/pgbouncer*
     # chown -R postgres.postgres /var/run/pgbouncer

I've originally reported that [here] and was redirected to this mailing 
list.

Thanks a lot for the packages & greetings,
*t

[here](https://github.com/pgbouncer/pgbouncer/issues/716)





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0
  2022-05-11 14:07 Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Tomas Pospisek <[email protected]>
@ 2022-05-11 14:34 ` Christoph Berg <[email protected]>
  2022-05-12 08:46   ` Re: Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Tomas Pospisek <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Christoph Berg @ 2022-05-11 14:34 UTC (permalink / raw)
  To: Tomas Pospisek <[email protected]>; +Cc: [email protected]

Re: Tomas Pospisek
> Due to the change of user under which pgbouncer runs (before: user
> pgbouncer, new: user postgres), an upgrade from 1.16.1 to 1.17.0 will break
> systems.

Hi Tomas,

the Debian pgbouncer package has always been using the postgres user:

$ grep USER debian/init
RUNASUSER="postgres"
    $SSD --start --chuid $RUNASUSER --oknodo -- $OPTS 2> /dev/null
        su -c "$DAEMON -R $OPTS 2> /dev/null" - ${RUNASUSER%:*}

Maybe you were editing the init.d or defaults file before?

>     Upgrade: pgbouncer:amd64 (1.16.1-1.pgdg20.04+1,
>              1.17.0-3.pgdg20.04+1)

The effective change between these versions is that we are now
shipping a .service file.

Christoph





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0
  2022-05-11 14:07 Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Tomas Pospisek <[email protected]>
  2022-05-11 14:34 ` Re: Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Christoph Berg <[email protected]>
@ 2022-05-12 08:46   ` Tomas Pospisek <[email protected]>
  2022-05-12 09:23     ` Re: Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Christoph Berg <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: Tomas Pospisek @ 2022-05-12 08:46 UTC (permalink / raw)
  To: Christoph Berg <[email protected]>; +Cc: [email protected]

Hi Christoph,

before anything: thanks a lot for your reply and thanks a lot for your 
OSS work <3 !!! Am very thankful for that!

On 11.05.22 16:34, Christoph Berg wrote:
> Re: Tomas Pospisek
>> Due to the change of user under which pgbouncer runs (before: user
>> pgbouncer, new: user postgres), an upgrade from 1.16.1 to 1.17.0 will break
>> systems.
> 
> Hi Tomas,
> 
> the Debian pgbouncer package has always been using the postgres user:
> 
> $ grep USER debian/init
> RUNASUSER="postgres"
>      $SSD --start --chuid $RUNASUSER --oknodo -- $OPTS 2> /dev/null
>          su -c "$DAEMON -R $OPTS 2> /dev/null" - ${RUNASUSER%:*}
> 
> Maybe you were editing the init.d or defaults file before?

indeed my /etc/default/pgbouncer contains `RUNASUSER="pgbouncer"`. I do 
set that explicitly via ansible. However I'm not sure where that line 
originated from. I am quite sure that it's not me who came up with the 
idea of running the daemon as `pgbouncer`, but instead that came from 
the package (which package - if from Debian or from pgdg - I don't know 
I would have to dig further, but maybe I could figure it out).

>>      Upgrade: pgbouncer:amd64 (1.16.1-1.pgdg20.04+1,
>>               1.17.0-3.pgdg20.04+1)
> 
> The effective change between these versions is that we are now
> shipping a .service file.

So what is happening after the introduction of the `.service` file is 
that either `/etc/default/pgbouncer` is now beeing ignored or it is 
being overriden. That breaks installations that had 
`RUNASUSER="pgbouncer"` set in `/etc/default/pgbouncer` when upgrading 
to 1.17.x.

Do you concur with that conclusion?

*t





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0
  2022-05-11 14:07 Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Tomas Pospisek <[email protected]>
  2022-05-11 14:34 ` Re: Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Christoph Berg <[email protected]>
  2022-05-12 08:46   ` Re: Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Tomas Pospisek <[email protected]>
@ 2022-05-12 09:23     ` Christoph Berg <[email protected]>
  0 siblings, 0 replies; 4+ messages in thread

From: Christoph Berg @ 2022-05-12 09:23 UTC (permalink / raw)
  To: Tomas Pospisek <[email protected]>; +Cc: [email protected]

Re: Tomas Pospisek
> indeed my /etc/default/pgbouncer contains `RUNASUSER="pgbouncer"`. I do set
> that explicitly via ansible. However I'm not sure where that line originated
> from. I am quite sure that it's not me who came up with the idea of running
> the daemon as `pgbouncer`, but instead that came from the package (which
> package - if from Debian or from pgdg - I don't know I would have to dig
> further, but maybe I could figure it out).

Hi Tomas,

It's true that the upstream pgbouncer default is to use "pgbouncer"
instead of "postgres", but Debian's /etc/init.d/pgbouncer has had
RUNASUSER="postgres" since 2012, and /etc/default/pgbouncer has not
been changed since 2008.

> So what is happening after the introduction of the `.service` file is that
> either `/etc/default/pgbouncer` is now beeing ignored or it is being
> overriden. That breaks installations that had `RUNASUSER="pgbouncer"` set in
> `/etc/default/pgbouncer` when upgrading to 1.17.x.
> 
> Do you concur with that conclusion?

Yes, but TBH I'd rather not reintroduce the usage of /etc/default in a
.service file when everyone else is moving away from that schema.

To override the settings from the package .service file, do this:

/etc/systemd/system/pgbouncer.service.d/user.conf:
[Service]
User=pgbouncer


Christoph






^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2022-05-12 09:23 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 14:07 Breakage: pgbouncer has changed the user under which it runs between 1.16.1 and 1.17.0 Tomas Pospisek <[email protected]>
2022-05-11 14:34 ` Christoph Berg <[email protected]>
2022-05-12 08:46   ` Tomas Pospisek <[email protected]>
2022-05-12 09:23     ` Christoph Berg <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox