Missing dependencies

Bug #1577916 reported by Jacob
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ganglia-web (Debian)
Fix Released
Unknown
ganglia-web (Ubuntu)
Fix Released
Low
Nish Aravamudan
Xenial
Fix Released
Low
Nish Aravamudan

Bug Description

[Impact]

 * After installing ganglia-webfrontend, no frontend displays at http://<ip>/ganglia even if the instructions in /usr/share/doc/ganglia-webfrontend/README.Debian are followed.

 * On 16.04, php-fpm is the first listed dependency for the php metapackage. There is no FPM configuration for ganglia and in fact it is only designed to work with libapache2-mod-php from apache (as far as I can tell). Indicate this in the dependencies. In 16.10, for reference, the php dependency order has changed (so libapache2-mod-php is preferred).

 * Also, php-xml is now split out from the core and ganglia-webfrontend needs to explicitly indicate this dependency.

[Test Case]

 * Install ganglia-webfrontend. Follow the instructions at /usr/share/doc/ganglia-webfrontend/README.Debian to enable the apache configuration.

 * Navigate to http://<ip>/ganglia

 * Without the fixes, raw PHP is displayed (as php-fpm is being used to service PHP requests instead of mod_php7.0). With the fixes, the ganglia web interface is displayed.

[Regression Potential]

 * The php-xml change has no chance of regression, as the current package errors out otherwise.

 * The dependency order change might have some chance of regression, *if* a user has configured php-fpm correctly to service ganglia-webfrontend. However, this is non-standard and probably implies that user is not using the Debian-provided configuration. In that specific case, as well, I believe installing this newer package will have no impact to their base, as php7.0-fpm satisfies php7.0 satisfies php (which is still an alternative in the affected Depends line).

ganglia-webfrontend depends on libapache2-mod-php7.0 and on php7.0-xml but it is not in the Depends: section in control.

This leads to errors `Sorry, you do not have access to this resource. "); } try { $dwoo = new Dwoo($conf['dwoo_compiled_dir'], $conf['dwoo_cache_dir']); } catch (Exception $e) { print " ...`

Installing these 2 dependencies fixes it.

1) lsb_release -rd
Description: Ubuntu 16.04 LTS
Release: 16.04

2) apt-cache policy ganglia-webfrontend
ganglia-webfrontend:
  Installed: 3.6.1-1ubuntu1
  Candidate: 3.6.1-1ubuntu1
  Version table:
 *** 3.6.1-1ubuntu1 500
        500 http://ubuntu.thayer.dartmouth.edu xenial/universe amd64 Packages
        500 http://ubuntu.thayer.dartmouth.edu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

3) I expected the dependencies to be installed

4) The dependencies were missing, it was difficult for me to debug because I am not a php guy. Got help from 'vvuksan' on irc.

Jeremy Bícha (jbicha)
tags: added: php7
Revision history for this message
Nish Aravamudan (nacc) wrote :

Hi Jacob,

Thank you very much for filing this bug!

The way most web frameworks work (as I understand them), is that if you want to use apache with them, you need to tell apt that. In particular, in this case, ganglia-webfrontend in both Debian & Ubuntu has:

Depends: debconf (>= 0.5), apache | apache-ssl | apache-perl | apache2 | httpd-cgi, php | php-cgi | libapache2-mod-php, rrdtool

So, in fact, libapache2-mod-php is a stated dependency, but the way dependency resolution works, the first one is taken if not further specified.

We are discussing elsewhere (https://bugs.launchpad.net/ubuntu/+source/drupal7/+bug/1582340/comments/6) what the right way to deal with this dependency resolution should be (as php will install php-fpm by default). If we go that route and switch the PHP dependencies around, you'd get apache by default.

It is valid to have php-xml explicitly listed as a dependency. However, this seems like a bug in Debian too, would you be willing to file a bug there (Yakkety is currently in sync).

Thanks,
Nish

Changed in ganglia-web (Ubuntu):
assignee: nobody → Nish Aravamudan (nacc)
Revision history for this message
Nish Aravamudan (nacc) wrote :
Revision history for this message
Nish Aravamudan (nacc) wrote :
Revision history for this message
Nish Aravamudan (nacc) wrote :

The version of 'php' in Yakkety now prefers libapache2-mod-php over php-fpm, so that is no longer necessary to fix there (although a fix is needed for 16.04). Both versions need the php-xml dependency (and I've submitted the same to Debian).

Nish Aravamudan (nacc)
description: updated
Nish Aravamudan (nacc)
Changed in ganglia-web (Ubuntu Xenial):
assignee: nobody → Nish Aravamudan (nacc)
Changed in ganglia-web (Ubuntu):
status: New → In Progress
Changed in ganglia-web (Ubuntu Xenial):
status: New → In Progress
Revision history for this message
Jeremy Bícha (jbicha) wrote :

nacc, why didn't you make libapache2-mod-php preferred in the latest php7.0 upload for xenial?

How many php apps does the libapache issue affect? If it's a lot (or most or all), shouldn't the change just be made in php7.0?

Because for drupal I added a dependency on php-xml (just like here) but did not add the libapache2 dependency.

Revision history for this message
Nish Aravamudan (nacc) wrote : Re: [Bug 1577916] Re: Missing dependencies

On 30.06.2016 [22:17:28 -0000], Jeremy Bicha wrote:
> nacc, why didn't you make libapache2-mod-php preferred in the latest
> php7.0 upload for xenial?
>
> How many php apps does the libapache issue affect? If it's a lot (or
> most or all), shouldn't the change just be made in php7.0?
>
> Because for drupal I added a dependency on php-xml (just like here) but
> did not add the libapache2 dependency.

Well, here's the thing, there's not a good answer, afaict. Debian (and
16.10) have changed the order around. Maybe that would be the principle
of least surprise. But then we'll immediately get complaints from the
nginx crowd that installing 'php' pulls in apache2 by default (simple
workaround there, just like here, is to specify 'php php-fpm' during
installation and use nginx with FPM).

I'm not sure how many applications the change of default affects. I was
trying to focus on getting known bugfixes through, and changing the
packaging in a release version of Ubuntu was riskier than I could
justify immediately. In particular, I need to think about what might
break (I don't think anything) for those people already running 16.04.
Beause what might happen if we change the order is that upgraders and
fresh installers will have different configurations and that will result
in its own set of bugs.

-Nish

Changed in ganglia-web (Debian):
status: Unknown → New
Mathew Hodson (mhodson)
Changed in ganglia-web (Ubuntu):
importance: Undecided → Low
Changed in ganglia-web (Ubuntu Xenial):
importance: Undecided → Low
tags: added: packaging
Changed in ganglia-web (Debian):
status: New → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

I get a merge conflict applying your Yakkety debdiff. Looks like this was fixed in Debian and auto-synced to Yakkety with exactly the same change, so an upload to Yakkety is no longer needed.

SRU uploaded to Xenial. Thanks!

Changed in ganglia-web (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Jacob, or anyone else affected,

Accepted ganglia-web into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ganglia-web/3.6.1-1ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in ganglia-web (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : [ganglia-web/xenial] verification still needed

The fix for this bug has been awaiting testing feedback in the -proposed repository for xenial for more than 90 days. Please test this fix and update the bug appropriately with the results. In the event that the fix for this bug is still not verified 15 days from now, the package will be removed from the -proposed repository.

tags: added: removal-candidate
Revision history for this message
Nish Aravamudan (nacc) wrote :

Verified in 3.6.1-1ubuntu1.1.

Note that this does possibly violate the principle of least surprise for end-users upgrading from 16.04 through -updates. That is, the existing ganglia-webfrontend package pulled in php-fpm by default (via php -> php7.0 -> php7.0-fpm being listed first). When the -updates version gets installed, the end user would need to specify manually to install libapache2-mod-php. This is because even with the -updates version listing libapache2-mod-php preferentially as a dependency, it will already be satisifed by php (via php7.0 <- php7.0-fpm) from the broken package.

I'm not sure how to resolve this properly, as it *can* be correct to use php-fpm with ganglia (as nginx provides httpd-cgi), but requires manual managing of the nginx configuration.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ganglia-web - 3.6.1-1ubuntu1.1

---------------
ganglia-web (3.6.1-1ubuntu1.1) xenial; urgency=medium

  * ganglia-webfrontend: Indicate libapache2-mod-php is the preferred
    alternative, as the provided configuration is only designed to work
    with apache and php installs php-fpm preferentially (LP: #1577916).
  * ganglia-webfrontend: Add run-time dependency on php-xml as the code
    calls xml_parser_create(), etc (LP: #1577916).

 -- Nishanth Aravamudan <email address hidden> Wed, 29 Jun 2016 10:28:06 -0700

Changed in ganglia-web (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for ganglia-web has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.