MariaDB / mariadb-docker

Docker Official Image packaging for MariaDB
https://mariadb.org
GNU General Public License v2.0
755 stars 436 forks source link

remove host-cache-size=0/skip-name-resolve #509

Open grooverdan opened 1 year ago

grooverdan commented 1 year ago

Container environment can depend on a HOSTNAME of the source container being resolvable. The resolution is cached so shouldn't be an impact.

@mmontes11 thoughts?

mmontes11 commented 1 year ago

thanks for bringing this up. It shouldn't be an issue for the Kubernetes DNS resolution perspective

grooverdan commented 1 year ago

Is it actually useful? MARIADB_ROOT_HOST of a hostname like 'monitor' would enable the monitor container access to the server as root, regardless of IP of the 'monitor' container (with this merged).

Speed of DNS resolution, is cited as the reason for this setting, however I think container environment will only have a limited number of hosts connecting, well within the default host_cache_size. These values are cached. Resolution is through getnameinfo, consulting the /etc/hosts before DNS (per /etc/nsswitch.conf). From what I've seen container runtimes implement the reverse DNS ok, so this should be ok.

Part of the goal here is just returning the container to the default configuration of the server as much as possible.

grooverdan commented 1 year ago

Server task to reduce possible impacts of this, particularly on users with IP or wildcard to not required DNS lookups - https://jira.mariadb.org/browse/MDEV-31323. So I'm going to treat this as a pre-req.