package bacula-director-pgsql 7.0.5+dfsg-4ubuntu0.1 failed to install/upgrade: sub-processo script post-installation instalado retornou estado de saída de erro 1

Bug #1729064 reported by dacio
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bacula (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

In a bacula + postgresql installation, it was not possible to create the bacula bank automatically.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: bacula-director-pgsql 7.0.5+dfsg-4ubuntu0.1
ProcVersionSignature: Ubuntu 4.4.0-98.121-generic 4.4.90
Uname: Linux 4.4.0-98-generic i686
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: i386
Date: Mon Oct 30 20:37:55 2017
ErrorMessage: sub-processo script post-installation instalado retornou estado de saída de erro 1
InstallationDate: Installed on 2013-07-03 (1580 days ago)
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.2
 apt 1.2.20
SourcePackage: bacula
Title: package bacula-director-pgsql 7.0.5+dfsg-4ubuntu0.1 failed to install/upgrade: sub-processo script post-installation instalado retornou estado de saída de erro 1
UpgradeStatus: Upgraded to xenial on 2016-08-03 (453 days ago)

Revision history for this message
dacio (daciogs) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu.

I was able to confirm the problem on a fresh xenial container by just running:

sudo apt install bacula-director-pgsql

That pulls in the postgresql 9.5 server.

What happens is that bacula tries to reach out to postgresql on the localhost (if you accepted all bacula defaults), but postgresql is being installed in the same transaction and isn't ready yet. There isn't even a postgres user at that time. So things fail.

A couple work arounds:
a) first install postgresql-9.5, then bacula-director-pgsql
b) when bacula complains about the database, select abort, and then do "sudo apt install bacula-director-pgsql --reinstall". This time it should finish.

I believe in your case you can just run "sudo apt install --reinstall bacula-director-pgsql". I would also suggest a "sudo apt install -f" to be sure there are no remaining errors.

Changed in bacula (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

It worked out of the box in artful, so the fix is somewhere in between xenial and artful.

Revision history for this message
Nish Aravamudan (nacc) wrote : Re: [Bug 1729064] Re: package bacula-director-pgsql 7.0.5+dfsg-4ubuntu0.1 failed to install/upgrade: sub-processo script post-installation instalado retornou estado de saída de erro 1

On Wed, Nov 1, 2017 at 7:26 AM, Andreas Hasenack <email address hidden> wrote:
> It worked out of the box in artful, so the fix is somewhere in between
> xenial and artful.

I would check the changes in 7.4.1~dfsg-1 or 7.4.2+dfsg-1 or 7.4.3+dfsg-1.

Also, iirc (only vaguely possibly true), bacula-director-pgsql only
depends on a postgres client, not on a postgres server. So is this
with an --install-recommends installation?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Yes, recommends are installed by default in this out-of-the box xenial container I used. And yes, postgresql (server) is a recommends only.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.