openstack-dashboard depends "apache2 | httpd" but uses a script on postinst not provided by all providers of httpd

Bug #1740300 reported by Brandon Whaley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
horizon (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

In the postinst script for openstack-dashboard, the script "/usr/share/apache2/apache2-maintscript-helper" is sourced with no checks to confirm it is there, resulting in an installation failure. I am using nginx as my web server, which the current requirements of "apache2 | httpd" for openstack-dashboard satisfies.

I don't know for sure whether updating the depends to remove httpd or having the postinst script test for the existence of /usr/share/apache2/apache2-maintscript-helper is the correct course of action. I'd prefer a test and printed warning if unable to enable a config for apache2.

The error:
  /var/lib/dpkg/info/openstack-dashboard.postinst: 42: .: Can't open /usr/share/apache2/apache2-maintscript-helper

The relevant code:
  # apache 2.4
  . /usr/share/apache2/apache2-maintscript-helper
  apache2_invoke enconf $CONF || exit $?

Description: Ubuntu 16.04.3 LTS
Release: 16.04
$ apt-cache policy openstack-dashboard
openstack-dashboard:
  Installed: 3:12.0.1-0ubuntu1~cloud0
  Candidate: 3:12.0.1-0ubuntu1~cloud0
  Version table:
 *** 3:12.0.1-0ubuntu1~cloud0 500
        500 http://ppa.launchpad.net/ubuntu-cloud-archive/pike-staging/ubuntu xenial/main amd64 Packages
        500 http://ppa.launchpad.net/ubuntu-cloud-archive/pike-staging/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status

Expected - openstack-dashboard installs with its stated dependencies satisfied
Instead - openstack-dashboard's post-install script failed due to an unmet dependency on apache2

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

Hi Brandon,

Thanks for reporting this. I don't think it should be a problem to add the check. We already do that in openstack-dashboard.postrm.

Corey

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

I've pushed a fix for this and it will be included in the next Queens upload.

Changed in horizon (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package horizon - 3:13.0.0-0ubuntu1

---------------
horizon (3:13.0.0-0ubuntu1) bionic; urgency=medium

  * New upstream release for OpenStack Queens.

 -- Corey Bryant <email address hidden> Wed, 28 Feb 2018 14:23:55 -0500

Changed in horizon (Ubuntu):
status: Fix Committed → Fix Released
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.