Comment 29 for bug 2003835

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

This can be recreated doing the following. I'd recommend doing this on a Jammy machine.

1) snap install lxd
2) snap install juju
3) Follow these steps up through the 'juju bootstrap localhost overlord') command: https://juju.is/docs/olm/lxd#heading--set-up-the-localhost-cloud
4) juju deploy ./jammy-yoga.yaml (see file contents below)
5) watch juju status (as soon as you see Agent column say "executing" you can ssh into the corresponding unit and add the security ppa)
6) (optional to add security ppa) add PPA to units - ssh to units as follows and run 'sudo add-apt-repository ppa:ubuntu-security-proposed/ppa --yes'
juju ssh keystone/0
juju ssh mysql-innodb-cluster/0
juju ssh mysql-innodb-cluster/1
juju ssh mysql-innodb-cluster/2
(you'll need to do this fairly quickly as the unit will start installing software soon)
7) The keystone unit is where mysql-router will get installed. /etc/keystone/keystone.conf will have the mysql credentials. /var/log/juju/unit-keystone-0.log will eventually show a Python traceback with a failing command that ends with:
subprocess.CalledProcessError: Command '['sudo', '-u', 'keystone', 'keystone-manage', 'db_sync']' returned non-zero exit status 1."

$ cat jammy-yoga.yaml
variables:
  source: &source proposed
  openstack-origin: &openstack-origin distro-proposed

series: &series jammy
applications:
  keystone:
    charm: ch:keystone
    num_units: 1
    options:
      admin-password: openstack
      openstack-origin: *openstack-origin
    constraints: mem=1024
    channel: yoga/edge
  keystone-mysql-router:
    charm: ch:mysql-router
    channel: 8.0/edge
  mysql-innodb-cluster:
    charm: ch:mysql-innodb-cluster
    num_units: 3
    constraints: mem=4096
    channel: 8.0/edge
relations:
- - keystone-mysql-router:db-router
  - mysql-innodb-cluster:db-router
- - keystone:shared-db
  - keystone-mysql-router:shared-db