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

changeprimary doesn't turn off SSL on primary_ssl: no #393

Closed
svenedge opened this issue Jun 7, 2022 · 3 comments · Fixed by #397
Closed

changeprimary doesn't turn off SSL on primary_ssl: no #393

svenedge opened this issue Jun 7, 2022 · 3 comments · Fixed by #397

Comments

@svenedge
Copy link

svenedge commented Jun 7, 2022

SUMMARY

Setting primary_ssl: no just doesn't add MASTER_SSL=1, rather than adding MASTER_SSL=0, meaning you can't turn off SSL if it's already turned on.

if primary_ssl:
chm.append("MASTER_SSL=1")

ISSUE TYPE
  • Bug Report
COMPONENT NAME
  community.mysql.mysql_replication:
    mode: changeprimary
ANSIBLE VERSION
ansible [core 2.12.5]
  config file = /Users/sven.edge/repos/devops-ansible-rmm/ansible.cfg
  configured module search path = ['/Users/sven.edge/repos/devops-ansible-rmm/library']
  ansible python module location = /usr/local/Cellar/ansible/5.8.0/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/sven.edge/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.4 (main, Apr 26 2022, 19:42:59) [Clang 13.1.6 (clang-1316.0.21.2)]
  jinja version = 3.1.2
  libyaml = True
COLLECTION VERSION
# /usr/local/Cellar/ansible/5.8.0/libexec/lib/python3.10/site-packages/ansible_collections
Collection      Version
--------------- -------
community.mysql 2.3.7
CONFIGURATION

n/a

OS / ENVIRONMENT

n/a

STEPS TO REPRODUCE
community.mysql.mysql_replication:
    mode: changeprimary
    login_host: 127.0.0.1
    login_port: 3306
    login_user: "{{ a }}"
    login_password: "{{ b }}"
    fail_on_error: yes

    primary_host: "{{ c }}"
    primary_port: "{{ d }}"
    primary_log_file: "{{ e.File }}"
    primary_log_pos: "{{ e.Position }}"
    primary_user: "{{ f }}"
    primary_password: "{{ g }}"
    primary_ssl: no
    check_hostname: no
EXPECTED RESULTS
mysql -Ee 'show slave status' | grep Master_SSL_Allowed
           Master_SSL_Allowed: Yes

run ansible

mysql -Ee 'show slave status' | grep Master_SSL_Allowed
           Master_SSL_Allowed: No
ACTUAL RESULTS
mysql -Ee 'show slave status' | grep Master_SSL_Allowed
           Master_SSL_Allowed: Yes
@Andersson007
Copy link
Collaborator

@svenedge hello, thanks for reporting the issue!
I created a PR #397, could you please take a look?

@svenedge
Copy link
Author

@Andersson007 Yep, that looks sensible to me. Thanks :)

@Andersson007
Copy link
Collaborator

@svenedge i merged the PR and the fixed version will be available in the next release of version 3 (i won't backport this particular fix to versions 2 and 1). Thanks for the contribution!

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

Successfully merging a pull request may close this issue.

2 participants