@@ -134,7 +134,7 @@ def wait_until_mysql_connection(self) -> None:
134
134
# Increment this major API version when introducing breaking changes
135
135
LIBAPI = 0
136
136
137
- LIBPATCH = 77
137
+ LIBPATCH = 79
138
138
139
139
UNIT_TEARDOWN_LOCKNAME = "unit-teardown"
140
140
UNIT_ADD_LOCKNAME = "unit-add"
@@ -1003,10 +1003,11 @@ def render_mysqld_configuration( # noqa: C901
1003
1003
"innodb_buffer_pool_size" : str (innodb_buffer_pool_size ),
1004
1004
"log_error_services" : "log_filter_internal;log_sink_internal" ,
1005
1005
"log_error" : f"{ snap_common } /var/log/mysql/error.log" ,
1006
- "general_log" : "ON " ,
1006
+ "general_log" : "OFF " ,
1007
1007
"general_log_file" : f"{ snap_common } /var/log/mysql/general.log" ,
1008
- "slow_query_log_file" : f"{ snap_common } /var/log/mysql/slowquery .log" ,
1008
+ "slow_query_log_file" : f"{ snap_common } /var/log/mysql/slow .log" ,
1009
1009
"binlog_expire_logs_seconds" : f"{ binlog_retention_seconds } " ,
1010
+ "loose-audit_log_filter" : "OFF" ,
1010
1011
"loose-audit_log_policy" : "LOGINS" ,
1011
1012
"loose-audit_log_file" : f"{ snap_common } /var/log/mysql/audit.log" ,
1012
1013
}
@@ -2281,28 +2282,6 @@ def set_cluster_primary(self, new_primary_address: str) -> None:
2281
2282
logger .exception ("Failed to set cluster primary" )
2282
2283
raise MySQLSetClusterPrimaryError (e .message )
2283
2284
2284
- def get_cluster_members_addresses (self ) -> Optional [Iterable [str ]]:
2285
- """Get the addresses of the cluster's members."""
2286
- get_cluster_members_commands = (
2287
- f"shell.connect('{ self .instance_def (self .server_config_user )} ')" ,
2288
- f"cluster = dba.get_cluster('{ self .cluster_name } ')" ,
2289
- "members = ','.join((member['address'] for member in cluster.describe()['defaultReplicaSet']['topology']))" ,
2290
- "print(f'<MEMBERS>{members}</MEMBERS>')" ,
2291
- )
2292
-
2293
- try :
2294
- output = self ._run_mysqlsh_script ("\n " .join (get_cluster_members_commands ))
2295
- except MySQLClientError as e :
2296
- logger .warning ("Failed to get cluster members addresses" , exc_info = e )
2297
- raise MySQLGetClusterMembersAddressesError (e .message )
2298
-
2299
- matches = re .search (r"<MEMBERS>(.+)</MEMBERS>" , output )
2300
-
2301
- if not matches :
2302
- return None
2303
-
2304
- return set (matches .group (1 ).split ("," ))
2305
-
2306
2285
def verify_server_upgradable (self , instance : Optional [str ] = None ) -> None :
2307
2286
"""Wrapper for API check_for_server_upgrade."""
2308
2287
# use cluster admin user to enforce standard port usage
@@ -2446,14 +2425,6 @@ def is_cluster_replica(self, from_instance: Optional[str] = None) -> Optional[bo
2446
2425
2447
2426
return cs_status ["clusters" ][self .cluster_name .lower ()]["clusterrole" ] == "replica"
2448
2427
2449
- def cluster_set_cluster_count (self , from_instance : Optional [str ] = None ) -> int :
2450
- """Get the number of clusters in the cluster set."""
2451
- cs_status = self .get_cluster_set_status (extended = 0 , from_instance = from_instance )
2452
- if not cs_status :
2453
- return 0
2454
-
2455
- return len (cs_status ["clusters" ])
2456
-
2457
2428
def get_cluster_set_name (self , from_instance : Optional [str ] = None ) -> Optional [str ]:
2458
2429
"""Get cluster set name."""
2459
2430
cs_status = self .get_cluster_set_status (extended = 0 , from_instance = from_instance )
0 commit comments