pg.ddx.io  pgsql-pkg-debian@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problems upgrading postgresql-9.4 under Debian Jessie
5+ messages / 2 participants
[nested] [flat]

* Problems upgrading postgresql-9.4 under Debian Jessie
@ 2017-07-10 07:56  Justin Ossevoort <justin@quarantainenet.nl>
  0 siblings, 1 reply; 5+ messages in thread

From: Justin Ossevoort @ 2017-07-10 07:56 UTC (permalink / raw)
  To: pgsql-pkg-debian

Hello,

Lately we have encountered problems when upgrading the postgresql-9.4 
package from apt.postgresql.org under Debian Jessie:

   Preparing to unpack .../postgresql-9.4_9.4.12-1.pgdg80+1_i386.deb ...
   dpkg: warning: subprocess old pre-removal script returned error exit 
status 102
   dpkg: trying script from the new package instead ...
   dpkg: error processing archive 
/var/cache/apt/archives/postgresql-9.4_9.4.12-1.pgdg80+1_i386.deb 
(--unpack):
    subprocess new pre-removal script returned error exit status 102
   Errors were encountered while processing:
    /var/cache/apt/archives/postgresql-9.4_9.4.12-1.pgdg80+1_i386.deb
   E: Sub-process /usr/bin/dpkg returned an error code (1)

---

I suspect that the problem is probably related to these changes:

postgresql-common updated to version 183.pgdg+1:
   * debian/maintscripts-functions: Unconditionally call invoke-rc.d, 
and drop
     path names from program invocations (Standards-Version 4.0.0).
   * debian/maintscripts-functions: Use 'invoke-rc.d 
"postgresql(at)$ver-*" stop'
     to prevent upgrading/removing server packages from stopping other major
     version clusters when running systemd. (Closes: #809811)

---

Under Debian Jessie these cause the following test at line 467 of 
/usr/sbin/invoke-rc.d to fail:

         if [ -n "$is_upstart" ] || testexec 
"${INITDPREFIX}${INITSCRIPTID}" ; then

This line effectively checks if we're running upstart (no, we're using 
systemd) or if there is an executable in /etc/init.d. Adding a 'set -x' 
to the script shows us it checks:

   testexec /etc/init.d/postgresql@9.4-*

Which doesn't exist and this the program exists with code 102, causing 
the prerm scrip to fail in turn.

---

Running:

   touch '/etc/init.d/postgresql@9.4-*'
   chmod +X '/etc/init.d/postgresql@9.4-*'

Causes the upgrade to succeed.

Regards,

Justin Ossevoort


-- 
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian



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

* Re: Problems upgrading postgresql-9.4 under Debian Jessie
@ 2017-07-10 14:21  Christoph Berg <myon@debian.org>
  parent: Justin Ossevoort <justin@quarantainenet.nl>
  0 siblings, 1 reply; 5+ messages in thread

From: Christoph Berg @ 2017-07-10 14:21 UTC (permalink / raw)
  To: Justin Ossevoort <justin@quarantainenet.nl>; +Cc: pgsql-pkg-debian

Re: Justin Ossevoort 2017-07-10 <a11f802e-f4ca-91ac-122c-49be2bf6a1ed@quarantainenet.nl>
> This line effectively checks if we're running upstart (no, we're using
> systemd) or if there is an executable in /etc/init.d. Adding a 'set -x' to
> the script shows us it checks:
> 
>   testexec /etc/init.d/postgresql@9.4-*
> 
> Which doesn't exist and this the program exists with code 102, causing the
> prerm scrip to fail in turn.

Oh, ok. I tested several combinations of OS and with/without systemd,
but apparently missed jessie+systemd. Will investigate and publish a
fix.

Thanks for the report,
Christoph


-- 
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian



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

* Re: Problems upgrading postgresql-9.4 under Debian Jessie
@ 2017-07-11 18:38  Christoph Berg <myon@debian.org>
  parent: Christoph Berg <myon@debian.org>
  0 siblings, 1 reply; 5+ messages in thread

From: Christoph Berg @ 2017-07-11 18:38 UTC (permalink / raw)
  To: Justin Ossevoort <justin@quarantainenet.nl>; pgsql-pkg-debian

Re: To Justin Ossevoort 2017-07-10 <20170710142125.5tbderithauaiklb@msg.df7cb.de>
> Re: Justin Ossevoort 2017-07-10 <a11f802e-f4ca-91ac-122c-49be2bf6a1ed@quarantainenet.nl>
> > This line effectively checks if we're running upstart (no, we're using
> > systemd) or if there is an executable in /etc/init.d. Adding a 'set -x' to
> > the script shows us it checks:
> > 
> >   testexec /etc/init.d/postgresql@9.4-*
> > 
> > Which doesn't exist and this the program exists with code 102, causing the
> > prerm scrip to fail in turn.
> 
> Oh, ok. I tested several combinations of OS and with/without systemd,
> but apparently missed jessie+systemd. Will investigate and publish a
> fix.

Luckily the fix was pretty easy, namely using deb-systemd-invoke
instead of invoke-rc.d. New packages are available via the
*-pgdg-testing suites, it would be nice if you could give them a try.

I'll do some more testing tomorrow and then put them live.

https://anonscm.debian.org/cgit/pkg-postgresql/postgresql-common.git/commit/?id=1a2173a00f7296534d50...

Thanks again for the report and the analysis,
Christoph


-- 
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian



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

* Re: Problems upgrading postgresql-9.4 under Debian Jessie
@ 2017-07-12 07:22  Justin Ossevoort <justin@quarantainenet.nl>
  parent: Christoph Berg <myon@debian.org>
  0 siblings, 1 reply; 5+ messages in thread

From: Justin Ossevoort @ 2017-07-12 07:22 UTC (permalink / raw)
  To: Christoph Berg <myon@debian.org>; pgsql-pkg-debian

Hello Cristoph,

Thanks for the quick action.

I have installed postgresql-common and postgresql-client-common from 
pgdg-testing and made sure I had no lingering 
'/etc/init.d/postgresql@9.4-*' file.

I then succesfully downgraded and upgraded the postgresql-9.4 package 
without errors, so the fix appears to have solved our problems.

Regards,

Justin Ossevoort

On 11-07-17 20:38, Christoph Berg wrote:
> Re: To Justin Ossevoort 2017-07-10 <20170710142125.5tbderithauaiklb@msg.df7cb.de>
>> Re: Justin Ossevoort 2017-07-10 <a11f802e-f4ca-91ac-122c-49be2bf6a1ed@quarantainenet.nl>
>>> This line effectively checks if we're running upstart (no, we're using
>>> systemd) or if there is an executable in /etc/init.d. Adding a 'set -x' to
>>> the script shows us it checks:
>>>
>>>    testexec /etc/init.d/postgresql@9.4-*
>>>
>>> Which doesn't exist and this the program exists with code 102, causing the
>>> prerm scrip to fail in turn.
>>
>> Oh, ok. I tested several combinations of OS and with/without systemd,
>> but apparently missed jessie+systemd. Will investigate and publish a
>> fix.
> 
> Luckily the fix was pretty easy, namely using deb-systemd-invoke
> instead of invoke-rc.d. New packages are available via the
> *-pgdg-testing suites, it would be nice if you could give them a try.
> 
> I'll do some more testing tomorrow and then put them live.
> 
> https://anonscm.debian.org/cgit/pkg-postgresql/postgresql-common.git/commit/?id=1a2173a00f7296534d50...
> 
> Thanks again for the report and the analysis,
> Christoph
> 


-- 
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian



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

* Re: Problems upgrading postgresql-9.4 under Debian Jessie
@ 2017-07-12 09:19  Christoph Berg <myon@debian.org>
  parent: Justin Ossevoort <justin@quarantainenet.nl>
  0 siblings, 0 replies; 5+ messages in thread

From: Christoph Berg @ 2017-07-12 09:19 UTC (permalink / raw)
  To: Justin Ossevoort <justin@quarantainenet.nl>; +Cc: pgsql-pkg-debian

Re: Justin Ossevoort 2017-07-12 <825f8b83-d727-f79f-0a5e-173f499f78f1@quarantainenet.nl>
> Hello Cristoph,
> 
> Thanks for the quick action.
> 
> I have installed postgresql-common and postgresql-client-common from
> pgdg-testing and made sure I had no lingering '/etc/init.d/postgresql@9.4-*'
> file.
> 
> I then succesfully downgraded and upgraded the postgresql-9.4 package
> without errors, so the fix appears to have solved our problems.

Thanks for the test!

I just promoted the package, should hit the mirrors right now.

Christoph


-- 
Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-debian



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


end of thread, other threads:[~2017-07-12 09:19 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 07:56 Problems upgrading postgresql-9.4 under Debian Jessie Justin Ossevoort <justin@quarantainenet.nl>
2017-07-10 14:21 ` Christoph Berg <myon@debian.org>
2017-07-11 18:38   ` Christoph Berg <myon@debian.org>
2017-07-12 07:22     ` Justin Ossevoort <justin@quarantainenet.nl>
2017-07-12 09:19       ` Christoph Berg <myon@debian.org>

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