Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to define a host in 2 different hostgroups #89

Open
CyberLine opened this issue Feb 5, 2019 · 2 comments
Open

Impossible to define a host in 2 different hostgroups #89

CyberLine opened this issue Feb 5, 2019 · 2 comments

Comments

@CyberLine
Copy link
Contributor

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.0
  • Ruby: 2.1.5p273
  • Distribution: Debian
  • Module version: 2.0.0

How to reproduce (e.g Puppet code you use)

yaml:

test::services::proxysql::servers:
  - "10.60.6.21:3306-5":
      hostname: 10.60.6.21
      port: 3306
      hostgroup_id: 5
  - "10.60.6.21:3306-10":
      hostname: 10.60.6.21
      port: 3306
      hostgroup_id: 10
  - "10.60.6.31:3306-15":
      hostname: 10.60.6.31
      port: 3306
      hostgroup_id: 15
  - "10.60.6.31:3306-20":
      hostname: 10.60.6.31
      port: 3306
      hostgroup_id: 20

then, in the manifest:
create_resources(proxy_mysql_server, $servers)

What are you seeing

Notice: /Stage[main]/Test::Services::Proxysql/Proxy_mysql_server[10.60.6.21:3306-5]/ensure: created
Notice: /Stage[main]/Test::Services::Proxysql/Proxy_mysql_server[10.60.6.21:3306-10]/ensure: created
Notice: /Stage[main]/Test::Services::Proxysql/Proxy_mysql_server[10.60.6.31:3306-15]/ensure: created
Notice: /Stage[main]/Test::Services::Proxysql/Proxy_mysql_server[10.60.6.31:3306-20]/ensure: created
Admin> SELECT * FROM mysql_servers;
+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| hostgroup_id | hostname   | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |
+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| 20           | 10.60.6.31 | 3306 | ONLINE | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
| 10           | 10.60.6.21 | 3306 | ONLINE | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+

What behaviour did you expect instead

Admin> SELECT * FROM mysql_servers;
+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| hostgroup_id | hostname   | port | status | weight | compression | max_connections | max_replication_lag | use_ssl | max_latency_ms | comment |
+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+
| 15           | 10.60.6.31 | 3306 | ONLINE | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
| 20           | 10.60.6.31 | 3306 | ONLINE | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
| 5            | 10.60.6.21 | 3306 | ONLINE | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
| 10           | 10.60.6.21 | 3306 | ONLINE | 1      | 0           | 1000            | 0                   | 0       | 0              |         |
+--------------+------------+------+--------+--------+-------------+-----------------+---------------------+---------+----------------+---------+

Any additional information you'd like to impart

as the template splits each host in host, port e.g. it seems impossible to define a host in multiple hostgroups at this time.

@CyberLine CyberLine changed the title Impossible to define a Hhost in 2 different hostgroups Impossible to define a host in 2 different hostgroups Feb 5, 2019
@CyberLine
Copy link
Contributor Author

Additional Info: this seems to be only a problem, if its not the initial provisioning of the proxy ...
On hosts running the manifest for the first time, all servers are created ...

@alexjfisher
Copy link
Member

#84 looks like it might be related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants