Commit 1a1faf9
committed
DISTMYSQL-208: Orchestrator GUI incorrectly shows recovery option for
intermediate database in chained replication
https://jira.percona.com/browse/DISTMYSQL-208
Problem:
If we've got replication chain A->B->C, and C is down, GUI shows
'Recover' dropdown for node B, but there is no possible recovery action
available in such a case.
The problem is well visible on upstream and Percona Orchestrator up to
version v3.2.6-3. For next versions it is still there, but is hard to
reproduce.
Cause:
The cause for hard reproduction on versions > v3.2.6-6 is caused by fix
for DISTMYSQL-182. In case of the instance being unreachable, it causes
skip of instance.Key storing, which is later needed for Orchestrator's
backend update. This caused that 'last_checked' and 'last_seen'
timestamps were updated incorrectly.
The root cause of the main problem is the analysis logic in
Analysis_dao.go:GetReplicationAnalysis(). The condition for setting
AllIntermediateMasterReplicasNotReplicating does not check if there are
any replicas reachable. So the case when all replicas are dead
(no recovery action possible) and the case when some replicas are still
reachable, but are not replicating (recovery action possible) are
undistingushable.
Solution:
1. Move instance.Key assignment before Ping
2. Improve the analysis logic. Report
AllIntermediateMasterReplicasNotReplicating only if all replicas are not
replicating, but there are still some reachable replicas.1 parent 76a7e20 commit 1a1faf9
File tree
10 files changed
+28
-7
lines changed- go/inst
- tests/system
- intermediate-master-replica-failure
- 01-relocate
- 02-down-slave-3
10 files changed
+28
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
| 611 | + | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
384 | 384 | | |
385 | 385 | | |
386 | 386 | | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
387 | 392 | | |
388 | 393 | | |
389 | 394 | | |
390 | 395 | | |
391 | 396 | | |
392 | 397 | | |
393 | | - | |
394 | | - | |
395 | 398 | | |
396 | 399 | | |
397 | 400 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Whitespace-only changes.
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
0 commit comments