Skip to content

Commit 3ef50fb

Browse files
committed
Fix failed tests due to mismatch traces on ARM builds.
This patch makes sure that arguments are called in order to maintain build traces order consistency. Change-Id: I1f701e1ca7d1c689ec5fe728f85f6eef692fc48d
1 parent 244e5d0 commit 3ef50fb

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

modules/adminapi/cluster/add_instance.cc

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -431,19 +431,24 @@ void Add_instance::prepare(checks::Check_type check_type,
431431
current_console()->print_info(
432432
"* Checking connectivity and SSL configuration...");
433433

434-
std::string cert_issuer =
435-
m_cluster_impl->query_cluster_auth_cert_issuer();
434+
auto cert_issuer = m_cluster_impl->query_cluster_auth_cert_issuer();
435+
auto instance_cert_subject =
436+
m_cluster_impl->query_cluster_instance_auth_cert_subject(
437+
m_primary_instance->get_uuid());
438+
439+
auto gr_local_address =
440+
m_primary_instance
441+
->get_sysvar_string("group_replication_local_address")
442+
.value_or("");
443+
436444
mysqlshdk::mysql::Set_variable disable_sro(
437445
*m_target_instance, "super_read_only", false, true);
446+
438447
test_peer_connection(
439448
*m_target_instance, m_gr_opts.local_address.value_or(""),
440-
m_options.cert_subject, *m_primary_instance,
441-
m_primary_instance
442-
->get_sysvar_string("group_replication_local_address")
443-
.value_or(""),
444-
m_cluster_impl->query_cluster_instance_auth_cert_subject(
445-
m_primary_instance->get_uuid()),
446-
m_gr_opts.ssl_mode, auth_type, cert_issuer, m_comm_stack);
449+
m_options.cert_subject, *m_primary_instance, gr_local_address,
450+
instance_cert_subject, m_gr_opts.ssl_mode, auth_type, cert_issuer,
451+
m_comm_stack);
447452

448453
current_console()->print_info();
449454
}

modules/adminapi/cluster_set/cluster_set_impl.cc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,6 @@ Cluster_set_impl::refresh_cluster_replication_user(Cluster_impl *cluster,
276276
std::tie(repl_user, repl_user_host) = get_cluster_repl_account(cluster);
277277

278278
try {
279-
auto console = mysqlsh::current_console();
280-
281279
log_info("Resetting password for %s@%s at %s", repl_user.c_str(),
282280
repl_user_host.c_str(), primary->descr().c_str());
283281
// re-create replication with a new generated password
@@ -639,7 +637,11 @@ void ensure_no_router_uses_cluster(const std::vector<Router_metadata> &routers,
639637

640638
Cluster_global_status Cluster_set_impl::get_cluster_global_status(
641639
Cluster_impl *cluster) const {
642-
assert(cluster->is_cluster_set_member());
640+
{
641+
auto cluster_set_member = cluster->is_cluster_set_member();
642+
assert(cluster_set_member);
643+
if (!cluster_set_member) return Cluster_global_status::UNKNOWN;
644+
}
643645

644646
if (cluster->is_invalidated()) return Cluster_global_status::INVALIDATED;
645647

@@ -1865,7 +1867,6 @@ void Cluster_set_impl::update_replica(
18651867
bool dry_run) {
18661868
log_info("Updating replication source at %s", replica->descr().c_str());
18671869

1868-
auto console = current_console();
18691870
auto repl_options = ar_options;
18701871

18711872
try {
@@ -1883,8 +1884,9 @@ void Cluster_set_impl::update_replica(
18831884
log_info("Replication source changed for %sinstance %s",
18841885
(primary_instance ? "primary " : ""), replica->descr().c_str());
18851886
} catch (...) {
1886-
console->print_error("Error updating replication source for " +
1887-
replica->descr() + ": " + format_active_exception());
1887+
current_console()->print_error("Error updating replication source for " +
1888+
replica->descr() + ": " +
1889+
format_active_exception());
18881890

18891891
throw shcore::Exception(
18901892
"Could not update replication source of " + replica->descr(),

0 commit comments

Comments
 (0)