-
Notifications
You must be signed in to change notification settings - Fork 442
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
So I have a test like (with custom config since require_secure_transport=ON
)
#596
Comments
caused by #594 |
require-secure-transport on the server mandates that tls or unix socket be used. The healthcheck user doesn't have explict tls credentials, so would have failed. 11.4+ would have tls negiotated, except in MariaDB#594 it was disabled for people that didn't configure ssl-ca correctly. To resolve this _process_sql adds an explict --protocol socket to get around the default configuration of 'protocol=tcp' in .my-healthcheck.sh. The protocol=tcp was there to catch people who put `healthcheck.sh --innodb_initialized` to discover it checked that in the starting phase of the container, without a tcp connection being available, it still returned true. We work around this my making a connection test always occur in the healthcheck. Remove the protocol=tcp from the generation of .my-healthcheck.cnf files. --connect, as a method that requires to test the connection, we add a mechanims that examines @@skip_networking and considers that if false, the connection is viable. We made a unix socket connection to do the test, which is active the same time as tcp sockets are. This alternate --connect method would have only worked the credentials of the healthcheck user where valid. If it isn't fall back to looking for "Can't connect". Closes: MariaDB#596
require-secure-transport on the server mandates that tls or unix socket be used. The healthcheck user doesn't have explict tls credentials, so would have failed. 11.4+ would have tls negiotated, except in MariaDB#594 it was disabled for people that didn't configure ssl-ca correctly. To resolve this _process_sql adds an explict --protocol socket to get around the default configuration of 'protocol=tcp' in .my-healthcheck.sh. The protocol=tcp was there to catch people who put `healthcheck.sh --innodb_initialized` to discover it checked that in the starting phase of the container, without a tcp connection being available, it still returned true. We work around this my making a connection test always occur in the healthcheck. Remove the protocol=tcp from the generation of .my-healthcheck.cnf files. --connect, as a method that requires to test the connection, we add a mechanims that examines @@skip_networking and considers that if false, the connection is viable. We made a unix socket connection to do the test, which is active the same time as tcp sockets are. This alternate --connect method would have only worked the credentials of the healthcheck user where valid. If it isn't fall back to looking for "Can't connect". Closes: MariaDB#596
I am not sure I fully understand the description of the pull request, but if what it's changing is related to a workaround for incorrect TLS, then I am not sure this is correct approach. |
Am I missing the minimal case of what is the issue:
Seem to be healthy? Are you using TLS certs/keys as well? |
Contents of config are here,
In this case it works fine, but generates warnings in logs.
Fails because no TLS is used, and not setup in healthcheck.cnf generated on original container start |
Thanks for the clarification and I can immediately see that #594 caused this problem for you. There's a current problem with < 11.4 images which is:
This probably isn't a new problem, but using --require-secure-transport would make the healthchecks fails and it seems important to fix this at the same time. Because healthchecks are over tcp and with TLS disabled because of #594, the 11.4, similar thing with a better error message:
So its these two cases that is making the fix a little more extensive that originally envisioned. The alternate is using tcp and creating tls certs and keys for a local connection. The unix socket counts as a secure transport, but the determination of |
And it's spamming a lot of warnings like
And looks like it's spamming this specifically if there is a
--connect
argument, even though validation succeeds. I tested this specifically spamming the respective command manually on the container.I understand that this is "kind of" normal, since
--connect
is expected to just try to establish TCP connection, not authenticate, but can we somehow suppress the warnings for the check? The settings in manual do suggest using 10s interval, but then it means spamming the false-positive warning every 10 seconds, even when connection is technically established.Or am I doing something wrong?
Originally posted by @Simbiat in #573 (comment)
The text was updated successfully, but these errors were encountered: