requested to merge 2353-add-ability-to-configure-tls-for-mysql-in-hammer into master
Closes #2353 (closed).
./hammer.py prepare-system -p local -w mysql,tlsshould now configure TLS for MySQL.
./hammer.py prepare-system -p local -w mysqlexplicitly removes TLS support in MySQL because I thought this ability is nice to have, but I understand how this could be undesired, so leave your opinion. Out of the systems I tested, after preparing the system, unit tests on Alpine-3.13, CentOS 7, Debian 11, Fedora 34, Ubuntu 20.04 work both with and without TLS. Unit tests run with disabled TLS even after preparing on Debian 9, Debian 10 because of
SSL error: Unable to get private key from '/etc/mysql/ssl/kea-server.keyor if certificates and keys are regenerated,
SSL connection error: self signed certificate in certificate chain.
regenerate.shto automatically regenerate of certificates and keys without password or subject input.
Hammer now also configures MySQL to open a listening socket on TCP port 3306 if it is not already configured to do so. It should fix some Alpine unit tests in Jenkins.
Solved some pylint warnings in hammer.py. The one about the dangerous
mysql_connection_unittest.ccto help me debug some problems I had while developing this.