galera-cluster charm will not install for bundle file with override for source

Bug #1494406 reported by Larry Michel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
galera-cluster (Juju Charms Collection)
Fix Released
High
Larry Michel

Bug Description

We are running into limitation for deploying the galera-cluster using an OpenStack bundle file that have source overrides. The source overrides are needed for making sure all the charms point to the right cloud archive. For example,

overrides:
    openstack-origin: cloud:trusty-juno
    source: cloud:trusty-updates/juno

The galera-cluster charm is checking source and is only setting the repo to whatever source is set to. However, cloud:trusty-updates/juno does not have the galera bits and so the charm will fail to install:

2015-08-25 13:45:11 INFO install Reading package lists...
2015-08-25 13:45:11 INFO install Building dependency tree...
2015-08-25 13:45:11 INFO install Reading state information...
2015-08-25 13:45:11 INFO install E: Unable to locate package mysql-wsrep-server-5.6
2015-08-25 13:45:11 INFO install E: Couldn't find any package by regex 'mysql-wsrep-server-5.6'
2015-08-25 13:45:11 INFO install E: Unable to locate package mysql-wsrep-client-5.6
2015-08-25 13:45:11 INFO install E: Couldn't find any package by regex 'mysql-wsrep-client-5.6'
2015-08-25 13:45:11 INFO install E: Unable to locate package galera-3
2015-08-25 13:45:11 INFO worker.uniter.jujuc server.go:158 running hook tool "juju-log" ["Couldn't acquire DPKG lock. Will retry in 10 seconds."]
2015-08-25 13:45:11 DEBUG worker.uniter.jujuc server.go:159 hook context id "galera-cluster/0-install-6618307529263305669"; dir "/var/lib/juju/agents/unit-galera-cluster-0/charm"
2015-08-25 13:45:11 INFO juju-log Couldn't acquire DPKG lock. Will retry in 10 seconds.
2015-08-25 13:45:21 INFO install Reading package lists...
2015-08-25 13:45:22 INFO install Building dependency tree...
2015-08-25 13:45:22 INFO install Reading state information...
2015-08-25 13:45:22 INFO install E: Unable to locate package mysql-wsrep-server-5.6
2015-08-25 13:45:22 INFO install E: Couldn't find any package by regex 'mysql-wsrep-server-5.6'
2015-08-25 13:45:22 INFO install E: Unable to locate package mysql-wsrep-client-5.6
2015-08-25 13:45:22 INFO install E: Couldn't find any package by regex 'mysql-wsrep-client-5.6'
2015-08-25 13:45:22 INFO install E: Unable to locate package galera-3
2015-08-25 13:45:22 INFO worker.uniter.jujuc server.go:158 running hook tool "juju-log" ["Couldn't acquire DPKG lock. Will retry in 10 seconds."]
2015-08-25 13:45:22 DEBUG worker.uniter.jujuc server.go:159 hook context id "galera-cluster/0-install-6618307529263305669"; dir "/var/lib/juju/agents/unit-galera-cluster-0/charm"
2015-08-25 13:45:22 INFO juju-log Couldn't acquire DPKG lock. Will retry in 10 seconds.
2015-08-25 13:45:32 INFO install Reading package lists...
2015-08-25 13:45:32 INFO install Building dependency tree...
2015-08-25 13:45:32 INFO install Reading state information...
2015-08-25 13:45:32 INFO install E: Unable to locate package mysql-wsrep-server-5.6
2015-08-25 13:45:32 INFO install E: Couldn't find any package by regex 'mysql-wsrep-server-5.6'
2015-08-25 13:45:32 INFO install E: Unable to locate package mysql-wsrep-client-5.6
2015-08-25 13:45:32 INFO install E: Couldn't find any package by regex 'mysql-wsrep-client-5.6'
2015-08-25 13:45:32 INFO install E: Unable to locate package galera-3
2015-08-25 13:45:32 INFO worker.uniter.jujuc server.go:158 running hook tool "juju-log" ["Couldn't acquire DPKG lock. Will retry in 10 seconds."]
2015-08-25 13:45:32 DEBUG worker.uniter.jujuc server.go:159 hook context id "galera-cluster/0-install-6618307529263305669"; dir "/var/lib/juju/agents/unit-galera-cluster-0/charm"
2015-08-25 13:45:32 INFO juju-log Couldn't acquire DPKG lock. Will retry in 10 seconds.
2015-08-25 13:45:36 DEBUG juju.worker.leadership tracker.go:138 galera-cluster/0 renewing lease for galera-cluster leadership
2015-08-25 13:45:36 DEBUG juju.worker.leadership tracker.go:165 checking galera-cluster/0 for galera-cluster leadership
2015-08-25 13:45:36 DEBUG juju.worker.leadership tracker.go:180 galera-cluster/0 confirmed for galera-cluster leadership until 2015-08-25 13:46:36.103860179 +0000 UTC
2015-08-25 13:45:36 INFO juju.worker.leadership tracker.go:182 galera-cluster/0 will renew galera-cluster leadership at 2015-08-25 13:46:06.103860179 +0000 UTC
2015-08-25 13:45:42 INFO install Reading package lists...
2015-08-25 13:45:42 INFO install Building dependency tree...
2015-08-25 13:45:42 INFO install Reading state information...
2015-08-25 13:45:42 INFO install E: Unable to locate package mysql-wsrep-server-5.6
2015-08-25 13:45:42 INFO install E: Couldn't find any package by regex 'mysql-wsrep-server-5.6'
2015-08-25 13:45:42 INFO install E: Unable to locate package mysql-wsrep-client-5.6
2015-08-25 13:45:42 INFO install E: Couldn't find any package by regex 'mysql-wsrep-client-5.6'
2015-08-25 13:45:42 INFO install E: Unable to locate package galera-3
2015-08-25 13:45:42 INFO install Traceback (most recent call last):
2015-08-25 13:45:42 INFO install File "/var/lib/juju/agents/unit-galera-cluster-0/charm/hooks/install", line 441, in <module>
2015-08-25 13:45:42 INFO install main()
2015-08-25 13:45:42 INFO install File "/var/lib/juju/agents/unit-galera-cluster-0/charm/hooks/install", line 435, in main
2015-08-25 13:45:42 INFO install hooks.execute(sys.argv)
2015-08-25 13:45:42 INFO install File "/var/lib/juju/agents/unit-galera-cluster-0/charm/hooks/charmhelpers/core/hookenv.py", line 544, in execute
2015-08-25 13:45:42 INFO install self._hooks[hook_name]()
2015-08-25 13:45:42 INFO install File "/var/lib/juju/agents/unit-galera-cluster-0/charm/hooks/install", line 94, in install
2015-08-25 13:45:42 INFO install apt_install(PACKAGES, fatal=True)
2015-08-25 13:45:42 INFO install File "/var/lib/juju/agents/unit-galera-cluster-0/charm/hooks/charmhelpers/fetch/__init__.py", line 183, in apt_install
2015-08-25 13:45:42 INFO install _run_apt_command(cmd, fatal)
2015-08-25 13:45:42 INFO install File "/var/lib/juju/agents/unit-galera-cluster-0/charm/hooks/charmhelpers/fetch/__init__.py", line 428, in _run_apt_command
2015-08-25 13:45:42 INFO install result = subprocess.check_call(cmd, env=env)
2015-08-25 13:45:42 INFO install File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
2015-08-25 13:45:42 INFO install raise CalledProcessError(retcode, cmd)
2015-08-25 13:45:42 INFO install subprocess.CalledProcessError: Command '['apt-get', '--assume-yes', '--option=Dpkg::Options::=--force-confold', 'install', 'mysql-wsrep-server-5.6', 'mysql-wsrep-client-5.6', 'galera-3']' returned non-zero exit status 100
2015-08-25 13:45:43 INFO juju.worker.uniter.context context.go:543 handling reboot
2015-08-25 13:45:43 ERROR juju.worker.uniter.operation runhook.go:103 hook "install" failed: exit status 1
2015-08-25 13:45:43 DEBUG juju.worker.uniter modes.go:31 [AGENT-STATUS] failed: run install hook
2015-08-25 13:45:43 INFO juju.worker.uniter modes.go:543 ModeContinue exiting
2015-08-25 13:45:43 INFO juju.worker.uniter modes.go:541 ModeHookError starting

The galera-cluster charm needs to have an option that does not conflict source so the galera package location can be passed in.

Tags: oil

Related branches

Revision history for this message
Larry Michel (lmic) wrote :

I tested a branch lp:~lmic/charms/trusty/galera-cluster/galera-cluster+source-galera-config-option where I added source-galera config option so that a galera specific repository can always be set regardless of source, and it worked. The old behavior with source remains the same.

  galera-cluster:
    charm: local:trusty/galera-cluster-45
    exposed: false
    relations:
      cluster:
      - galera-cluster
      shared-db:
      - cinder
      - glance
      - heat
      - keystone
      - neutron-api
      - neutron-gateway
      - nova-cloud-controller
    service-status:
      current: unknown
      since: 10 Sep 2015 16:32:21Z
    units:
      galera-cluster/0:
        agent-state: started
        agent-status:
          current: idle
          since: 10 Sep 2015 16:48:33Z
          version: 1.24.5
        agent-version: 1.24.5
        machine: '4'
        open-ports:
        - 3306/tcp
        public-address: flaglervm05.oilstaging
        workload-status:
          current: unknown
          since: 10 Sep 2015 16:32:21Z

Larry Michel (lmic)
Changed in galera-cluster (Juju Charms Collection):
status: New → In Progress
Larry Michel (lmic)
Changed in galera-cluster (Juju Charms Collection):
importance: Undecided → High
assignee: nobody → Larry Michel (lmic)
Larry Michel (lmic)
Changed in galera-cluster (Juju Charms Collection):
status: In Progress → Fix Committed
Larry Michel (lmic)
Changed in galera-cluster (Juju Charms Collection):
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.