Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.
This repository was archived by the owner on May 28, 2021. It is now read-only.

mysql router cant connect to cluster outside of cluster namespace #244

Open
@adrianNEMO

Description

@adrianNEMO

Is this a BUG REPORT or FEATURE REQUEST?

Choose one: FEATURE REQUEST

Versions

MySQL Operator Version:

Environment:

  • Kubernetes version (use kubectl version): v1.11.3
  • Cloud provider or hardware configuration: Digitalocean
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Others:

What happened?

Using the mysql router in a different namespace from cluster

What you expected to happen?

The router should be able to connect to the cluster from a different namespace

How to reproduce it (as minimally and precisely as possible)?

Create a cluster. Create a deployment in a different namespace with the mysql router as sidecar (like in the wordpress example).

Anything else we need to know?

The router can connect to the master, but after the bootstrapping the router tries to connect to the mysql cluster node without the namespace appendix of the dns record.
The log from the router:

Succesfully contacted mysql server at mysql-wordpress-1.mysql-wordpress.mysql-cluster-test.svc.cluster.local. Checking for cluster state.
Succesfully contacted cluster with 3 members. Bootstrapping.
Please enter MySQL password for root:
Bootstrapping MySQL Router instance at '/tmp/mysqlrouter'...
Checking for old Router accounts
Creating account mysql_router7_izxrdpbopyx7@'%'
MySQL Router has now been configured for the InnoDB cluster 'Cluster'.
The following connection information can be used to connect to the cluster.
Classic MySQL protocol connections to cluster 'Cluster':
- Read/Write Connections: localhost:6446
- Read/Only Connections: localhost:6447
X protocol connections to cluster 'Cluster':
- Read/Write Connections: localhost:64460
- Read/Only Connections: localhost:64470
Starting mysql-router.
2018-12-12 17:10:50 main INFO [7f254112c880] Loading all plugins.
2018-12-12 17:10:50 main INFO [7f254112c880] plugin 'metadata_cache:Cluster' loading
2018-12-12 17:10:50 main INFO [7f254112c880] plugin 'routing:Cluster_default_ro' loading
2018-12-12 17:10:50 main INFO [7f254112c880] plugin 'routing:Cluster_default_rw' loading
2018-12-12 17:10:50 main INFO [7f254112c880] plugin 'routing:Cluster_default_x_ro' loading
2018-12-12 17:10:50 main INFO [7f254112c880] plugin 'routing:Cluster_default_x_rw' loading
2018-12-12 17:10:50 main INFO [7f254112c880] Initializing all plugins.
2018-12-12 17:10:50 main INFO [7f254112c880] plugin 'metadata_cache' initializing
2018-12-12 17:10:50 main INFO [7f254112c880] plugin 'routing' initializing
2018-12-12 17:10:50 main INFO [7f254112c880] Starting all plugins.
2018-12-12 17:10:50 main INFO [7f253cb29700] plugin 'metadata_cache:Cluster' starting
2018-12-12 17:10:50 main INFO [7f2537fff700] plugin 'routing:Cluster_default_ro' starting
2018-12-12 17:10:50 routing INFO [7f2537fff700] [routing:Cluster_default_ro] started: listening on 0.0.0.0:6447
2018-12-12 17:10:50 main INFO [7f25377fe700] plugin 'routing:Cluster_default_rw' starting
2018-12-12 17:10:50 routing INFO [7f25377fe700] [routing:Cluster_default_rw] started: listening on 0.0.0.0:6446
2018-12-12 17:10:50 main INFO [7f2536ffd700] plugin 'routing:Cluster_default_x_ro' starting
2018-12-12 17:10:50 routing INFO [7f2536ffd700] [routing:Cluster_default_x_ro] started: listening on 0.0.0.0:64470
2018-12-12 17:10:50 main INFO [7f25367fc700] plugin 'routing:Cluster_default_x_rw' starting
2018-12-12 17:10:50 main INFO [7f254112c880] Running.
2018-12-12 17:10:50 routing INFO [7f25367fc700] [routing:Cluster_default_x_rw] started: listening on 0.0.0.0:64460
2018-12-12 17:10:50 metadata_cache INFO [7f253cb29700] Starting Metadata Cache
2018-12-12 17:10:50 metadata_cache INFO [7f253cb29700] Connections using ssl_mode 'PREFERRED'
2018-12-12 17:10:50 metadata_cache WARNING [7f253cb29700] Failed connecting with Metadata Server mysql-wordpress-1.mysql-wordpress:3306: Unknown MySQL server host 'mysql-wordpress-1.mysql-wordpress' (2) (2005)
2018-12-12 17:10:50 metadata_cache ERROR [7f253cb29700] Failed to connect to metadata server
2018-12-12 17:10:50 metadata_cache WARNING [7f253cb29700] Failed connecting with Metadata Server mysql-wordpress-0.mysql-wordpress:3306: Unknown MySQL server host 'mysql-wordpress-0.mysql-wordpress' (2) (2005)
2018-12-12 17:10:50 metadata_cache ERROR [7f253cb29700] Failed to connect to metadata server
2018-12-12 17:10:50 metadata_cache WARNING [7f253cb29700] Failed connecting with Metadata Server mysql-wordpress-2.mysql-wordpress:3306: Unknown MySQL server host 'mysql-wordpress-2.mysql-wordpress' (2) (2005)
2018-12-12 17:10:50 metadata_cache ERROR [7f253cb29700] Failed to connect to metadata server
2018-12-12 17:10:50 metadata_cache ERROR [7f253cb29700] Failed connecting with any of the metadata servers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions