fix: add pgsql_servers_ssl_params to tablenames vector and fix monitor fallback

- Add pgsql_servers_ssl_params to pgsql_servers_tablenames so SAVE/LOAD
  PGSQL SERVERS TO/FROM DISK correctly persists and restores SSL params.
- Fix monitor SSL fallback to use per-server params directly (empty
  fields omitted) instead of per-field fallback to globals, matching
  the backend connection behavior.
pull/5583/head
Rahim Kanji 1 month ago
parent 7fa0e82bd7
commit 93d0ddf477

@ -452,11 +452,11 @@ vector<mon_srv_t> ext_srvs(const unique_ptr<SQLite3_result>& srvs_info) {
};
if (ssl_params != nullptr) {
return mon_srv_t::ssl_opts_t {
ssl_params->ssl_key.length() > 0 ? ssl_params->ssl_key : string { pgsql_thread___ssl_p2s_key ? pgsql_thread___ssl_p2s_key : "" },
ssl_params->ssl_cert.length() > 0 ? ssl_params->ssl_cert : string { pgsql_thread___ssl_p2s_cert ? pgsql_thread___ssl_p2s_cert : "" },
ssl_params->ssl_ca.length() > 0 ? ssl_params->ssl_ca : string { pgsql_thread___ssl_p2s_ca ? pgsql_thread___ssl_p2s_ca : "" },
ssl_params->ssl_crl.length() > 0 ? ssl_params->ssl_crl : string { pgsql_thread___ssl_p2s_crl ? pgsql_thread___ssl_p2s_crl : "" },
ssl_params->ssl_crlpath.length() > 0 ? ssl_params->ssl_crlpath : string { pgsql_thread___ssl_p2s_crlpath ? pgsql_thread___ssl_p2s_crlpath : "" }
ssl_params->ssl_key,
ssl_params->ssl_cert,
ssl_params->ssl_ca,
ssl_params->ssl_crl,
ssl_params->ssl_crlpath
};
}
}

@ -153,6 +153,7 @@ static const vector<string> pgsql_servers_tablenames = {
// "pgsql_galera_hostgroups",
// "pgsql_aws_aurora_hostgroups",
"pgsql_hostgroup_attributes",
"pgsql_servers_ssl_params",
};
static const vector<string> mysql_firewall_tablenames = {

Loading…
Cancel
Save