install hook failing on Xenial with unmet dependency on mysql-client

Bug #1571789 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
percona-cluster (Juju Charms Collection)
Fix Released
High
Ryan Beisner

Bug Description

This failure is being caused by a previous workaround in the charm for Utopic/Vivid where the mysql-client-5.6 package had to be explicitly installed.

On Xenial, a straight install of the percona-xtradb-cluster-server-5.6 pulls in the necessary dependencies.

ubuntu@xenial180820:~$ apt-cache policy mysql-client
mysql-client:
  Installed: 5.7.11-0ubuntu6
  Candidate: 5.7.11-0ubuntu6
  Version table:
 *** 5.7.11-0ubuntu6 500
        500 http://nova.clouds.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
     5.6.28-1ubuntu3 500
        500 http://nova.clouds.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

...

Install hook failing on Xenial with unmet dependency on mysql-client

2016-04-18 17:44:57 INFO install Reading package lists...
2016-04-18 17:44:58 INFO install Building dependency tree...
2016-04-18 17:44:58 INFO install Reading state information...
2016-04-18 17:44:58 INFO install Some packages could not be installed. This may mean that you have
2016-04-18 17:44:58 INFO install requested an impossible situation or if you are using the unstable
2016-04-18 17:44:58 INFO install distribution that some required packages have not yet been created
2016-04-18 17:44:58 INFO install or been moved out of Incoming.
2016-04-18 17:44:58 INFO install The following information may help to resolve the situation:
2016-04-18 17:44:58 INFO install
2016-04-18 17:44:58 INFO install The following packages have unmet dependencies:
2016-04-18 17:44:58 INFO install percona-xtradb-cluster-server-5.6 : Depends: mysql-client but it is not going to be installed
2016-04-18 17:44:58 INFO install E: Unable to correct problems, you have held broken packages.
2016-04-18 17:44:58 INFO install Traceback (most recent call last):
2016-04-18 17:44:58 INFO install File "/var/lib/juju/agents/unit-mysql-0/charm/hooks/install.real", line 686, in <module>
2016-04-18 17:44:58 INFO install main()
2016-04-18 17:44:58 INFO install File "/var/lib/juju/agents/unit-mysql-0/charm/hooks/install.real", line 679, in main
2016-04-18 17:44:58 INFO install hooks.execute(sys.argv)
2016-04-18 17:44:58 INFO install File "/var/lib/juju/agents/unit-mysql-0/charm/hooks/charmhelpers/core/hookenv.py", line 717, in execute
2016-04-18 17:44:58 INFO install self._hooks[hook_name]()
2016-04-18 17:44:58 INFO install File "/var/lib/juju/agents/unit-mysql-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 81, in _harden_inner2
2016-04-18 17:44:58 INFO install return f(*args, **kwargs)
2016-04-18 17:44:58 INFO install File "/var/lib/juju/agents/unit-mysql-0/charm/hooks/install.real", line 121, in install
2016-04-18 17:44:58 INFO install apt_install(determine_packages(), fatal=True)
2016-04-18 17:44:58 INFO install File "/var/lib/juju/agents/unit-mysql-0/charm/hooks/charmhelpers/fetch/__init__.py", line 199, in apt_install
2016-04-18 17:44:58 INFO install _run_apt_command(cmd, fatal)
2016-04-18 17:44:58 INFO install File "/var/lib/juju/agents/unit-mysql-0/charm/hooks/charmhelpers/fetch/__init__.py", line 453, in _run_apt_command
2016-04-18 17:44:58 INFO install result = subprocess.check_call(cmd, env=env)
2016-04-18 17:44:58 INFO install File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
2016-04-18 17:44:58 INFO install raise CalledProcessError(retcode, cmd)
2016-04-18 17:44:58 INFO install subprocess.CalledProcessError: Command '['apt-get', '--assume-yes', '--option=Dpkg::Options::=--force-confold', 'install', 'percona-xtradb-cluster-server-5.6', 'mysql-client-5.6']' returned non-zero exit status 100
2016-04-18 17:44:58 ERROR juju.worker.uniter.operation runhook.go:107 hook "install" failed: exit status 1

Tags: uosci
Ryan Beisner (1chb1n)
description: updated
Ryan Beisner (1chb1n)
Changed in percona-cluster (Juju Charms Collection):
assignee: nobody → Ryan Beisner (1chb1n)
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Ryan Beisner (1chb1n) wrote :

The original work-around in the charm was for Vivid and Utopic, which are both EOL.

A straight install of the percona-xtradb-cluster-server-5.6 package on fresh Wily and Xenial instances yields the mysql-client package, which was not the case in Vivid and Utopic.

It is now safe to yank that work-around from the charm to unblock Xenial.

Additionally, the lp:openstack-charm-testing bundles have included a mysql charm override (diaper) for >= Wily, and that should be removed. Same for Mojo spec tests in lp:~ost-maintainers/openstack-mojo-specs/mojo-openstack-specs.

FYI, from fresh instances, after apt installing just percona-xtradb-cluster-server-5.6:

#### Wily:
ubuntu@wily181605:~$ dpkg-query --show percona* mysql*
mysql-client-5.5
mysql-client-5.6 5.6.28-0ubuntu0.15.10.1
mysql-client-core-5.5
mysql-client-core-5.6 5.6.28-0ubuntu0.15.10.1
mysql-common 5.6.28-0ubuntu0.15.10.1
mysql-common-5.6
mysql-server
mysql-server-5.0
mysql-server-5.1
mysql-server-5.5
mysql-server-5.6
mysql-server-core-5.1
mysql-server-core-5.6
percona-galera-3 3.8-3390-0ubuntu5
percona-server-server-5.1
percona-server-server-5.5
percona-xtrabackup 2.2.3-2.1build1
percona-xtradb-cluster-common-5.5
percona-xtradb-cluster-galera-2.x
percona-xtradb-cluster-galera-25
percona-xtradb-cluster-galera-3.x
percona-xtradb-cluster-garbd-2.x
percona-xtradb-cluster-garbd-3.x
percona-xtradb-cluster-server-5.5
percona-xtradb-cluster-server-5.6 5.6.21-25.8-0ubuntu2
percona-xtradb-server-5.0

#### Xenial:
ubuntu@xenial180820:~$ dpkg-query --show percona* mysql*
mysql-client 5.7.11-0ubuntu6
mysql-client-5.5
mysql-client-5.6
mysql-client-5.7 5.7.11-0ubuntu6
mysql-client-core-5.5
mysql-client-core-5.6
mysql-client-core-5.7 5.7.11-0ubuntu6
mysql-common 5.7.11-0ubuntu6
mysql-common-5.6
mysql-server
mysql-server-5.0
mysql-server-5.1
mysql-server-5.5
mysql-server-5.6
mysql-server-core-5.1
mysql-server-core-5.6
percona-galera-3 3.8-3390-0ubuntu6
percona-server-server-5.1
percona-server-server-5.5
percona-xtrabackup 2.2.3-2.1build1
percona-xtradb-cluster-common-5.5
percona-xtradb-cluster-galera-2.x
percona-xtradb-cluster-galera-25
percona-xtradb-cluster-galera-3.x
percona-xtradb-cluster-garbd-2.x
percona-xtradb-cluster-garbd-3.x
percona-xtradb-cluster-server-5.5
percona-xtradb-cluster-server-5.6 5.6.21-25.8-0ubuntu3
percona-xtradb-server-5.0

Revision history for this message
Ryan Beisner (1chb1n) wrote :

For reference, the existing work-around was bug 1476845.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-percona-cluster (master)

Fix proposed to branch: master
Review: https://review.openstack.org/307414

Changed in percona-cluster (Juju Charms Collection):
status: Confirmed → In Progress
Ryan Beisner (1chb1n)
Changed in percona-cluster (Juju Charms Collection):
milestone: none → 16.04
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Since the percona-cluster amulet test really only exercises Trusty, this issue was not detected in CI. That also means that the CI gate tests won't confirm/deny resolution here. Bug 1546577 aims to address that test gap (eta 16.07).

Until then, here is proof of install hook success (with the proposed change), and failure (at master):

http://pastebin.ubuntu.com/15920050/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

FYI - The mysql-client-5.6 package apparently existing in Xenial until today, which is why we just noticed this breakage. http://pastebin.ubuntu.com/15921043/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-percona-cluster (master)

Reviewed: https://review.openstack.org/307414
Committed: https://git.openstack.org/cgit/openstack/charm-percona-cluster/commit/?id=324cdff5262907c6909f952682cab96ab72948c8
Submitter: Jenkins
Branch: master

commit 324cdff5262907c6909f952682cab96ab72948c8
Author: Ryan Beisner <email address hidden>
Date: Mon Apr 18 18:42:24 2016 +0000

    Update determine_packages to let package dependencies win

    A previous charm work-around for forcefully installing the
    mysql-client-5.6 package is no longer relevant, with
    Utopic and Vivid both EOL. Wily and Xenial package
    dependencies are in order for mysql-client.

    Change-Id: I6d8c0c34d3bb3c4d19b641086f70c197961c4ad4
    Closes-Bug: 1571789
    Related-Bug: 1476845

Changed in percona-cluster (Juju Charms Collection):
status: In Progress → Fix Committed
Revision history for this message
Ryan Beisner (1chb1n) wrote :
James Page (james-page)
Changed in percona-cluster (Juju Charms Collection):
status: Fix Committed → Fix Released
Revision history for this message
Tom (u-tom-w) wrote :

Just confirming that the fix works correctly. However, it has not rolled into the -next branch yet.

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.