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

Fixed MariaDB template evaluation used for TLS #45

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

WillDyson
Copy link
Contributor

Originally, for MariaDB, the playbook wrote the evaluated template cloudera.cnf.j2 to /tmp/cloudera.cnf on the database hosts. The MariaDB collection would then search for this file on the ansible controller – causing an error in most cases.
As the RDBMS collection already calls template when copying this file, we do not need to evaluate it eagerly.
This PR removes the evaluation of the template and fixes the bug described above.

@WillDyson
Copy link
Contributor Author

PLAY RECAP *******************************************************************************************************************************************
host-1.example.com : ok=4    changed=2    unreachable=0    failed=0    skipped=4    rescued=0    ignored=0
host-2.example.com : ok=7    changed=2    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0
host-3.example.com : ok=7    changed=2    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0
host-4.example.com : ok=7    changed=2    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0
host-5.example.com : ok=49   changed=14   unreachable=0    failed=0    skipped=18   rescued=0    ignored=0
localhost                  : ok=45   changed=5    unreachable=0    failed=0    skipped=39   rescued=0    ignored=0

@WillDyson
Copy link
Contributor Author

[root@host-5 ~]# cat /etc/my.cnf.d/cloudera.cnf
[mysqld]
log_bin_trust_function_creators = 1
# SSL configuration
ssl_ca = /opt/cloudera/security/pki/chain.pem
ssl_cert = /opt/cloudera/security/pki/host.pem
ssl_key = /opt/cloudera/security/pki/host.key.unenc

@WillDyson
Copy link
Contributor Author

[root@host-5 ~]# mysql -u root
MariaDB [(none)]> create database test;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> use test;
Database changed
ERROR: No query specified

MariaDB [test]> create table test(a TEXT);
Query OK, 0 rows affected (0.01 sec)

… this for us

Signed-off-by: William Dyson <wdyson@cloudera.com>
@tmgstevens tmgstevens changed the base branch from main to devel March 25, 2022 11:01
@tmgstevens tmgstevens merged commit e60261d into cloudera-labs:devel Mar 25, 2022
WillDyson added a commit to WillDyson/cloudera.cluster that referenced this pull request Jul 15, 2022
… this for us (cloudera-labs#45)

Signed-off-by: William Dyson <wdyson@cloudera.com>

Co-authored-by: William Dyson <wdyson@cloudera.com>
Signed-off-by: William Dyson <wdyson@cloudera.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants