Skip to content

Commit 3e393a5

Browse files
author
Yves Trudeau
committed
DISTMYSQL-185, removed the added return in the GTID section to avoid removing some normal behavior. The sub-errors are now collected in a strings and reported in the regular logic flow.
1 parent 3d9276f commit 3e393a5

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

docker/Dockerfile.system

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN echo "ci_env_repo: $ci_env_repo"
88
RUN echo "ci_env_branch: $ci_env_branch"
99

1010
RUN apt-get update -q -y
11-
RUN apt-get install -y sudo haproxy python git jq rsync libaio1 libnuma1 default-mysql-client bsdmainutils less vim
11+
RUN apt-get install -y sudo haproxy python git jq rsync libaio1 libnuma1 default-mysql-client bsdmainutils less vim libncurses5
1212

1313
RUN mkdir /orchestrator
1414
WORKDIR /orchestrator

go/inst/instance_topology.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2815,6 +2815,7 @@ func relocateReplicasInternal(replicas [](*Instance), instance, other *Instance)
28152815
}
28162816

28172817
// GTID
2818+
gtidErrorsMsg := ""
28182819
{
28192820

28202821
movedReplicas, unmovedReplicas, err, errs := moveReplicasViaGTID(replicas, other, nil)
@@ -2831,14 +2832,12 @@ func relocateReplicasInternal(replicas [](*Instance), instance, other *Instance)
28312832
if len(errs) > 0 {
28322833
// There are errors, maybe more than one. Let's concatenate them
28332834
// so they can be reported correctly in the UI
2834-
allErrors := "Error(s): "
2835+
gtidErrorsMsg = "Error(s): "
28352836

28362837
for _, err := range errs {
2837-
allErrors = fmt.Sprintf("%s; %v",allErrors,err)
2838+
gtidErrorsMsg = fmt.Sprintf("%s; %v",gtidErrorsMsg,err)
28382839
}
28392840

2840-
return movedReplicas, log.Errorf("Relocating %+v replicas of %+v below %+v failed %s", len(replicas), instance.Key, other.Key, allErrors), errs
2841-
28422841
}
28432842
// Otherwise nothing was moved via GTID. Maybe we don't have any GTIDs, we continue.
28442843
}
@@ -2863,7 +2862,7 @@ func relocateReplicasInternal(replicas [](*Instance), instance, other *Instance)
28632862
}
28642863

28652864
// Too complex
2866-
return nil, log.Errorf("Relocating %+v replicas of %+v below %+v turns to be too complex; please do it manually", len(replicas), instance.Key, other.Key), errs
2865+
return nil, log.Errorf("Relocating %+v replicas of %+v below %+v turns to be too complex; please do it manually. Additional Errors: %v", len(replicas), instance.Key, other.Key,gtidErrorsMsg), errs
28672866
}
28682867

28692868
// RelocateReplicas will attempt moving replicas of an instance indicated by instanceKey below another instance.

0 commit comments

Comments
 (0)