Skip to content

Docker 1.12 services - After Galera scale down maxscale's autodiscovery runs into trouble #1

@Franselbaer

Description

@Franselbaer

If you scale up and then scale down the galera cluster the auto discovery of maxscale runs into trouble.

The command used in entrypoint script:

getent hosts tasks.dbcluster

This delivers N cluster ip's from dbcluster correctly BUT:

If you do something like:

docker service scale dbcluster=10

and then:

docker service scale dbcluster=5

The instance list:

docker service ps dbcluster

shows something like:

ID                         NAME             IMAGE                    NODE     DESIRED STATE  CURRENT STATE          ERROR
0s4hgq9tm28xmp3padelhq258  dbcluster.1      toughiq/mariadb-cluster  doswa-5  Running        Running 17 hours ago
3f2b2q0rs4i2yzy92ohue7dlq  dbcluster.2      toughiq/mariadb-cluster  doswa-4  Running        Running 17 hours ago
2ks1kl7einrlnbzkh8aayz9oq   \_ dbcluster.2  toughiq/mariadb-cluster  doswa-4  Shutdown       Shutdown 17 hours ago
0xgbr3q3wavzkk5bvagby8xyu  dbcluster.3      toughiq/mariadb-cluster  doswa-4  Running        Running 17 hours ago
bdsbd10u203pjj2kyvawohw23   \_ dbcluster.3  toughiq/mariadb-cluster  doswa-3  Shutdown       Shutdown 17 hours ago
6m92mbed7hrc2w0cnwfn7c66d  dbcluster.4      toughiq/mariadb-cluster  doswa-5  Running        Running 17 hours ago
9ky7bh2wewsqgx0pptzjkpaqm   \_ dbcluster.4  toughiq/mariadb-cluster  doswa-5  Shutdown       Shutdown 17 hours ago
as90l1abljf8seojivtyu265y   \_ dbcluster.4  toughiq/mariadb-cluster  doswa-5  Shutdown       Shutdown 17 hours ago
2ms4ilr6hbh9fovjixc1a0npi  dbcluster.5      toughiq/mariadb-cluster  doswa-5  Shutdown       Shutdown 17 hours ago
aavba7zhv7y9z77vsgyaab03n   \_ dbcluster.5  toughiq/mariadb-cluster  doswa-4  Shutdown       Shutdown 17 hours ago
d1in2lunlab6qfj3p0kbks288  dbcluster.6      toughiq/mariadb-cluster  doswa-4  Shutdown       Shutdown 17 hours ago
btm75qwpa8oi1fg07qkvnpf9t   \_ dbcluster.6  toughiq/mariadb-cluster  doswa-4  Shutdown       Shutdown 17 hours ago
4ymbc2lwzf4dt1o7ooswilyrt  dbcluster.7      toughiq/mariadb-cluster  doswa-3  Running        Running 17 hours ago
c60ahb1mmtbjjzut0z31v2o3v  dbcluster.8      toughiq/mariadb-cluster  doswa-3  Shutdown       Shutdown 17 hours ago
1bk8o6eajfbwz668pkzv629g4   \_ dbcluster.8  toughiq/mariadb-cluster  doswa-5  Shutdown       Shutdown 17 hours ago
dc9j3annf9dn1aueo2n46i9lu  dbcluster.9      toughiq/mariadb-cluster  doswa-5  Shutdown       Shutdown 17 hours ago
5ke252yv31v9rajzsr3x8n9uc  dbcluster.10     toughiq/mariadb-cluster  doswa-4  Shutdown       Shutdown 17 hours ago

And the getent delivers in this case 5 cluster ip's also from instances in shutdown state.
Unfortunately docker swarm seems not to clean up shuttet down instances.
I'm currently not sure what is a good way around this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions