1

Enviroment

I work for IBM and trying to prototype netboot (pxe) for ubuntu. This question is used to identify an issue that was encountered when using juju to deploy the https://jujucharms.com/u/openstack-charmers-next/openstack-base/40 bundle. The bundle deploys out all necessary services (openstack, rabbitmq, ceph, mysql (percona) and so on. Unfortunately the openstack 40 bundle out of the box fails during mysql/percona deployment.

Problem

When setting up percona for mysql it fails due to

Unable to set password for the Percona Server "root" user

The above message is seen in the log for mysql on the node/machine that is running the lxc container for mysql/percona.

If you use juju status will see this:

mysql:
charm: cs:~openstack-charmers-next/trusty/percona-cluster-7
exposed: false
service-status:
  current: error
  message: 'hook failed: "install"'   <=====================
  since: 14 Oct 2015 16:19:51Z
relations:
  cluster:
  - mysql
units:
  mysql/0:
    workload-status:
      current: error
      message: 'hook failed: "install"'  <=====================
      since: 14 Oct 2015 16:19:51Z
    agent-status:
      current: idle
      since: 14 Oct 2015 16:19:51Z
      version: 1.24.6
    agent-state: error
    agent-state-info: 'hook failed: "install"'

1 Answers1

1

Resolution

This shows example of how to fix it using a standalone bundle only for mysql (percona). Basically one has to allow openstack40 bundle to go to the point of mysql charm failure and then you have to fix up things. Below is the excercise we went through to make only mysql(percona) charm to work after it hit issue. Just change percona.yaml to openstack yaml you use. Note that for ppc64le you have to get the openstack 40 yaml and update it to arch=ppc64el since the charm store openstack 40 bundle is only x86 relevant.

  1. Deploy mysql / percona

     juju-deployer -c /root/.juju/bundles/percona.yaml -s 90 -d -v
    
  2. Hit the mysql password issue. The problem that is listed above.

  3. Set password in mysql container

    chroot /var/lib/lxc/juju-machine-0-lxc-1/rootfs/
    
     passwd root
    

    ---> for POC password: xxxxxxxx

     exit
    

    Note we list lxc machine juju-machine-0-lxc-1in example. It has to be the lxc that mysql is deploying to.

  4. Login to container

    lxc-console -n juju-machine-0-lxc-1
    
  5. Fix problem

    UPDATE mysql.user SET Password=PASSWORD('PASSW0RD') WHERE User='root';
    
    FLUSH PRIVILEGES;
    
    exit
    

    https://serverfault.com/questions/502840/percona-mysql-unable-to-start-error-the-server-quit-without-updating-pid-file

  6. Tell juju fixed charm

    juju resolved mysql/0 --retry  --show-log --debug
    
  7. Redrive, shows previous steps are deployed and continues from failed charm.

    juju-deployer -c /root/.juju/bundles/percona.yaml -s 90 -d -v