Handle mismatched spaces

Bug #1917357 reported by David Ames
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Router Charm
Fix Released
Medium
Peter Matulis

Bug Description

While testing converged networking I hit the following with nova-cloud-controller:

subprocess.CalledProcessError: Command '['nova-manage', 'cell_v2', 'map_cell0']' returned non-zero exit status 255.

The issue was mismatched spaces:

  nova-cloud-controller:
    bindings:
      "": *public-space
      public: public
      internal: internal
      admin: admin

  nova-mysql-router:
    bindings:
      "": *public-space
      db-router: internal

This resulted in the mysql-router using the internal space for db-router but the implicit shared-db binding for nova-cloud-controller used the default: *public-space.

This led to a mismatch of which address was expected:

juju-exec nova-mysql-router/0 -- "relation-get -r db-router:53 - nova-mysql-router/0"
egress-subnets: 172.16.200.14/32
ingress-address: 172.16.200.14
mysqlrouter_hostname: 172.16.200.14
mysqlrouter_username: mysqlrouteruser
nova_database: nova
nova_hostname: 192.168.151.96
nova_username: nova
novaapi_database: nova_api
novaapi_hostname: 192.168.151.96
novaapi_username: nova
novacell0_database: nova_cell0
novacell0_hostname: 192.168.151.96
novacell0_username: nova
private-address: 172.16.200.14

This happens because proxy_db_and_user_requests blindly repeats what it receives over the shared-db relation (from the client) to the db-router relation (to the server).

We may want the mysql-router charm to intervene and force the *_hostname values to the bound db-router IP.

WORKAROUND:

Explicitly set nova-cloud-controller's (and potentially others') shared-db to the same binding the nova-cloud-controller-mysql-router's db-router is bound to. i.e.

  nova-cloud-controller:
    bindings:
      "": *public-space
      public: public
      internal: internal
      admin: admin
      shared-db: internal

  nova-mysql-router:
    bindings:
      "": *public-space
      db-router: internal

Changed in charm-mysql-router:
status: New → Triaged
importance: Undecided → High
Revision history for this message
David Ames (thedac) wrote :

After discussing with the team, having the subordinate force the binding of the primary charm seems incorrect.

Therefore, this is now a documentation bug.

In general the following bindings need to be on the same space:

mysql-innodb-cluster: db-router and cluster bindings
mysql-router: db-router binding
primary charm: shared-db

i.e. All of these bindings use the "internal" binding bellow:

  nova-cloud-controller:
    bindings:
      "": *public-space
      public: public
      internal: internal
      admin: admin
      shared-db: internal

  nova-mysql-router:
    bindings:
      "": *public-space
      db-router: internal

  mysql-innodb-cluster:
    "": *public-space
    db-router: internal
    cluster: internal

Changed in charm-mysql-router:
importance: High → Medium
Revision history for this message
Peter Matulis (petermatulis) wrote :

The documentation aspect was fixed in the READMEs for both the mysql-router and mysql-innodb-cluster charms.

Changed in charm-mysql-router:
assignee: nobody → Peter Matulis (petermatulis)
status: Triaged → Fix Released
no longer affects: charm-deployment-guide
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.