package openstack-dashboard-ubuntu-theme 2:9.0.0-0ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1574144 reported by ltore123
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
horizon (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

ı hate this bug and ubuntu theme always causing problems

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: openstack-dashboard-ubuntu-theme 2:9.0.0-0ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
Date: Sun Apr 24 05:19:10 2016
DuplicateSignature:
 Setting up openstack-dashboard-ubuntu-theme (2:9.0.0-0ubuntu2) ...
 Collecting and compressing static assets...
 apache2.service is not active, cannot reload.
 dpkg: error processing package openstack-dashboard-ubuntu-theme (--configure):
  subprocess installed post-installation script returned error exit status 1
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2016-04-23 (0 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageArchitecture: all
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1
 apt 1.2.10ubuntu1
SourcePackage: horizon
Title: package openstack-dashboard-ubuntu-theme 2:9.0.0-0ubuntu2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
ltore123 (leventtore) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in horizon (Ubuntu):
status: New → Confirmed
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

Has a workaround been identified for this?

Revision history for this message
Sean McGinnis (sean-mcginnis) wrote :

I was able to work around this. May be relative to running on the same host as keystone.

Running "service apache2 status" showed a port conflict and unable to bind on port 5000. I stopped keystone and verified the port was no longer in use, the started apache, reinstalled horizon, then started keystone again. Multiple checks of apache2 status along the way looked OK and after all of that was complete I was able to verify functionality.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi Sean, I'm still unable to reproduced this after installing keystone followed by openstack-dashboard. Do you happen to be running keystone API under apache2 with mod_wsgi? I know the xenial package doesn't do that by default, however in yakkety we're moving to do that by default.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Another work-around, and more realistic for production OpenStack deployments, is to not co-locate services. You can still do this on a single machine with kvm, lxc, lxd, etc to isolate services.

Changed in horizon (Ubuntu):
importance: Undecided → High
Changed in horizon (Ubuntu):
status: Confirmed → New
status: New → Confirmed
importance: High → Undecided
Changed in horizon (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Corey Bryant (corey.bryant) wrote :

I was able to recreate this with the following steps:

1) apt install apache2 libapache2-mod-wsgi
2) systemctl stop apache2
3) apt install openstack-dashboard

Changed in horizon (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Corey Bryant (corey.bryant) wrote :

The postinst scripts perform a reload of apache2 config files, and this will fail as the bug describes if apache2 is not running.

I think the postinst scripts could be smarter and handle the situation where apache2 is not already running. apache2 reload should be preferred vs apache2 restart to avoid interruption, but if apache2 isn't already running we should attempt to start it.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Looking into this some more, the maintainer scripts are following the Debian guidance for enabling config for Apache 2.4. For example, in openstack-dashboard.postinst we have:

if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
  # apache 2.4
  . /usr/share/apache2/apache2-maintscript-helper
  apache2_invoke enconf $CONF || exit $?
elif ...

which follows the guidance from: https://wiki.debian.org/Apache/PackagingFor24

This is intended to exit if the package's apache config can't be enabled when the package is installed, which is the case when apache2 is not running at package install time.

So we are doing the right thing to exit if config can't be enabled. However I wonder if we could help alleviate this bug by attempting to start apache2 if it's not already started. I'll consult with some fellow package maintainers and see what they think.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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