将设为首页浏览此站
开启辅助访问 天气与日历 收藏本站联系我们切换到窄版

易陆发现论坛

 找回密码
 开始注册
查看: 198|回复: 1
收起左侧

记一次mysq(mariadb)l数据库恢复成功过程 recover参数,rsync数据同步,数据恢复失败后重新覆盖文件恢复

[复制链接]
发表于 2021-10-18 11:03:46 | 显示全部楼层 |阅读模式
购买主题 本主题需向作者支付 2 金钱 才能浏览
 楼主| 发表于 2021-10-18 11:12:53 | 显示全部楼层
[root@controller1 _data]# kolla-ansible -i multinode mariadb_recovery
% e/ G2 `9 S  @( a4 _Attempting to restart mariadb cluster : ansible-playbook -i multinode -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla  -e action=deploy -e common_run=true /usr/share/kolla-ansible/ansible/mariadb_recovery.yml
5 ]2 i. R" t! f$ R/ g. u/ }/usr/lib/python2.7/site-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.: W" i: _& u1 c( Y  J
  from cryptography.exceptions import InvalidSignature
' X* D% m9 p; ^8 O3 m( w[WARNING]: Unable to parse /var/lib/docker/volumes/mariadb/_data/multinode as an inventory source% u5 ^% N5 v/ A. ]3 m
[WARNING]: No inventory was parsed, only implicit localhost is available
- `% Q  o( e$ o6 v: f[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
6 u; C2 [9 M" c  @[WARNING]: Could not match supplied host pattern, ignoring: mariadb
; I/ U, \+ @9 j% l  n6 J2 T+ }
PLAY [Detect openstack_release variable] **************************************************************************************************************************
; J" H  H. L* P* z7 M' b; ^skipping: no hosts matched
/ v9 L; G! {5 [1 K- V+ m: RPLAY [Recover mariadb] ********************************************************************************************************************************************$ ^. s/ u! s$ W1 ~
skipping: no hosts matched
" L# D+ F: o5 @- s4 i- O6 u+ E) q7 aPLAY RECAP ********************************************************************************************************************************************************
) j, O+ W8 d1 B[root@controller1 _data]# cd
$ o- e& x# \! a9 ?8 X1 w[root@controller1 ~]# kolla-ansible -i multinode mariadb_recovery: x$ I; p8 R4 p: C  E! ~# l; u
Attempting to restart mariadb cluster : ansible-playbook -i multinode -e @/etc/kolla/globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla  -e action=deploy -e common_run=true /usr/share/kolla-ansible/ansible/mariadb_recovery.yml
7 I* w3 }/ j# c* c- q: F/ t: m/usr/lib/python2.7/site-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.6 K1 v9 X$ c" k* f) \  |
  from cryptography.exceptions import InvalidSignature
- N  e2 P  R" t[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details/ t0 T5 v4 U' w. |$ D2 W9 c
[WARNING]: Found variable using reserved name: action  x% b) u4 |2 `

$ {  p. h9 n8 yPLAY [Detect openstack_release variable] **************************************************************************************************************************  O( U. |5 F' F
TASK [Get current kolla-ansible version number] *******************************************************************************************************************! ~( @( M1 L' c
skipping: [controller1]
# ]0 ^  A+ k4 c1 B# |+ K. askipping: [controller2]
' N& C/ X, a& R  @% Uskipping: [controller3]
& g) X; z! M/ [' yTASK [Set openstack_release variable] *****************************************************************************************************************************" e$ u8 W( J! J  r4 A/ H
skipping: [controller1]6 w+ s2 w( P; ^
skipping: [controller2]/ j! i6 Q# R# U  Y: K4 U# m% S+ k
skipping: [controller3]
+ `" I7 K: U4 t( ^. vPLAY [Recover mariadb] ********************************************************************************************************************************************
$ ?+ ~$ C3 G$ h, w0 J( L# D' i8 lTASK [Gathering Facts] ********************************************************************************************************************************************
# y' g7 S# e/ P! P  G# Uok: [controller1]
- i% \- ?2 D" Iok: [controller3]
- r' z; P' ]6 {8 E; Wok: [controller2]$ t& i& {0 Z8 z
TASK [common : include] *******************************************************************************************************************************************
) Y% ?- `3 r6 `* X% o, l* g& tskipping: [controller1]9 \9 A% Z1 |2 {" @+ _
skipping: [controller2]
4 N% }- x2 t0 D2 p# S* vskipping: [controller3]" w6 X; \0 n+ G2 v  ?. F, \% h! b
TASK [common : Registering common role has run] *******************************************************************************************************************# U2 A% k$ v  u; F9 |, a
skipping: [controller1]' Q4 \3 V; R( W% `! `- [6 Y
skipping: [controller2]: l8 p: G" c2 F0 T% z5 k* d" k* n9 }
skipping: [controller3]. e  t$ m% b! K
TASK [mariadb : include] ******************************************************************************************************************************************
$ h4 q9 @2 J- }included: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/deploy.yml for controller1, controller2, controller3
7 ^! T  e9 _4 S- q6 q: J: S# z7 BTASK [mariadb : include] ******************************************************************************************************************************************1 S0 c; U) d& |2 d' v! q2 B
included: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/config.yml for controller1, controller2, controller31 h/ d/ w. [! H! Z
TASK [mariadb : Ensuring config directories exist] ****************************************************************************************************************
: E2 H* V4 }" N$ g; `- Fok: [controller2] => (item={'value': {u'enabled': True, u'image': u'kolla/centos-binary-mariadb:queens', u'group': u'mariadb', u'volumes': [u'/etc/kolla//mariadb/:/var/lib/kolla/config_files/:ro', u'/etc/localtime:/etc/localtime:ro', u'mariadb:/var/lib/mysql', u'kolla_logs:/var/log/kolla/'], u'container_name': u'mariadb'}, 'key': u'mariadb'})
% ?5 f9 F! _+ j0 G' T* Xok: [controller3] => (item={'value': {u'enabled': True, u'image': u'kolla/centos-binary-mariadb:queens', u'group': u'mariadb', u'volumes': [u'/etc/kolla//mariadb/:/var/lib/kolla/config_files/:ro', u'/etc/localtime:/etc/localtime:ro', u'mariadb:/var/lib/mysql', u'kolla_logs:/var/log/kolla/'], u'container_name': u'mariadb'}, 'key': u'mariadb'})! e" E$ n3 u& Q' k& j! Q6 J* a# B
ok: [controller1] => (item={'value': {u'enabled': True, u'image': u'kolla/centos-binary-mariadb:queens', u'group': u'mariadb', u'volumes': [u'/etc/kolla//mariadb/:/var/lib/kolla/config_files/:ro', u'/etc/localtime:/etc/localtime:ro', u'mariadb:/var/lib/mysql', u'kolla_logs:/var/log/kolla/'], u'container_name': u'mariadb'}, 'key': u'mariadb'})" Q" f  v+ k  o! M6 s  m
TASK [mariadb : Copying over config.json files for services] ******************************************************************************************************
' Q" x6 L' A5 f, S4 i5 A) Iok: [controller2]
! U) I  e* t* t9 e, Dok: [controller3]+ U% B% K- ]$ S. f
ok: [controller1]
/ F8 C" A' q: o' Q( t4 r0 g! wTASK [mariadb : Copying over galera.cnf] **************************************************************************************************************************
* _& _0 T, D, y0 ]. v; e1 j[WARNING]: _execute_module no longer honors the tmp parameter. Action plugins should set self._connection._shell.tmpdir to share the tmpdir9 H" r% x, l% Z6 F  l8 k
[WARNING]: _execute_module no longer honors the tmp parameter. Action plugins should set self._connection._shell.tmpdir to share the tmpdir
7 O6 V6 E/ M. i& q, y: v[WARNING]: _execute_module no longer honors the tmp parameter. Action plugins should set self._connection._shell.tmpdir to share the tmpdir
/ l" B+ S& U2 {ok: [controller3]) A5 y7 d+ B! f* J/ M
ok: [controller2]3 o1 T" K0 v% [" Z, m2 H
ok: [controller1]
& e  y$ ~: Z  BTASK [mariadb : Copying over wsrep-notify.sh] *********************************************************************************************************************- ?8 ~* d! V* d% y7 U7 r
ok: [controller2] => (item={'value': {u'enabled': True, u'image': u'kolla/centos-binary-mariadb:queens', u'group': u'mariadb', u'volumes': [u'/etc/kolla//mariadb/:/var/lib/kolla/config_files/:ro', u'/etc/localtime:/etc/localtime:ro', u'mariadb:/var/lib/mysql', u'kolla_logs:/var/log/kolla/'], u'container_name': u'mariadb'}, 'key': u'mariadb'})
( v. E3 H3 i( m$ Z9 i* kok: [controller1] => (item={'value': {u'enabled': True, u'image': u'kolla/centos-binary-mariadb:queens', u'group': u'mariadb', u'volumes': [u'/etc/kolla//mariadb/:/var/lib/kolla/config_files/:ro', u'/etc/localtime:/etc/localtime:ro', u'mariadb:/var/lib/mysql', u'kolla_logs:/var/log/kolla/'], u'container_name': u'mariadb'}, 'key': u'mariadb'})3 i# B8 q5 k& w  G, N
ok: [controller3] => (item={'value': {u'enabled': True, u'image': u'kolla/centos-binary-mariadb:queens', u'group': u'mariadb', u'volumes': [u'/etc/kolla//mariadb/:/var/lib/kolla/config_files/:ro', u'/etc/localtime:/etc/localtime:ro', u'mariadb:/var/lib/mysql', u'kolla_logs:/var/log/kolla/'], u'container_name': u'mariadb'}, 'key': u'mariadb'})& S: I6 q+ n! U6 {
TASK [mariadb : Check mariadb containers] *************************************************************************************************************************
! z7 k( t0 S' |& ychanged: [controller3] => (item={'value': {u'enabled': True, u'image': u'kolla/centos-binary-mariadb:queens', u'group': u'mariadb', u'volumes': [u'/etc/kolla//mariadb/:/var/lib/kolla/config_files/:ro', u'/etc/localtime:/etc/localtime:ro', u'mariadb:/var/lib/mysql', u'kolla_logs:/var/log/kolla/'], u'container_name': u'mariadb'}, 'key': u'mariadb'})
1 e9 r1 q- ]3 |; V( q7 c8 J( Rchanged: [controller1] => (item={'value': {u'enabled': True, u'image': u'kolla/centos-binary-mariadb:queens', u'group': u'mariadb', u'volumes': [u'/etc/kolla//mariadb/:/var/lib/kolla/config_files/:ro', u'/etc/localtime:/etc/localtime:ro', u'mariadb:/var/lib/mysql', u'kolla_logs:/var/log/kolla/'], u'container_name': u'mariadb'}, 'key': u'mariadb'})0 n( y+ W, Y4 Z: F' u
changed: [controller2] => (item={'value': {u'enabled': True, u'image': u'kolla/centos-binary-mariadb:queens', u'group': u'mariadb', u'volumes': [u'/etc/kolla//mariadb/:/var/lib/kolla/config_files/:ro', u'/etc/localtime:/etc/localtime:ro', u'mariadb:/var/lib/mysql', u'kolla_logs:/var/log/kolla/'], u'container_name': u'mariadb'}, 'key': u'mariadb'})& b4 E' I, z# H" w3 n' b9 Q
TASK [mariadb : include] ******************************************************************************************************************************************
+ R- m$ E7 J1 n  nincluded: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/bootstrap.yml for controller1, controller2, controller3
# Z8 |9 |( Y* C* b% [0 [' QTASK [mariadb : set_fact] *****************************************************************************************************************************************
" J* X! U# `" ^' _0 ^' xok: [controller1]# q3 ^) W5 W* b
ok: [controller2]9 Y: K6 j; t3 q3 S# h7 ?- p
ok: [controller3]! e- D7 M/ t$ k: P. {( r4 {" R: a1 z3 T
TASK [mariadb : include] ******************************************************************************************************************************************
: Q4 R+ }" b! ]included: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/lookup_cluster.yml for controller1, controller2, controller3" C4 @9 p- s$ I+ G" `0 W4 k. A
TASK [mariadb : Cleaning up temp file on localhost] ***************************************************************************************************************; G. `# A% y7 |* z/ n
ok: [controller1 -> localhost]
# |0 n9 ?7 F& h  S- {* qTASK [mariadb : Creating temp file on localhost] ******************************************************************************************************************
, q+ q6 N' \, z+ D4 @- D% R* y8 Lok: [controller1 -> localhost], S6 _% l5 B: p* |! z+ a( m2 @( G0 ?
TASK [mariadb : Creating mariadb volume] **************************************************************************************************************************+ S, _) L1 C. {' Z7 r* ]
ok: [controller1]2 t8 a/ X1 W- a0 W' V  Q0 |  U0 x
ok: [controller2]
' I4 J7 h7 x' X2 E% Nok: [controller3]2 V/ |$ ~# m: T& |" d  g
TASK [mariadb : Writing hostname of host with existing cluster files to temp file] ********************************************************************************
* D  n4 C7 c1 D3 \: ][DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|changed` use `result is changed`. This feature will be removed in version
. o. O! e1 g, j& V% U) c, c2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
( C# Q  d1 J, }( z[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|changed` use `result is changed`. This feature will be removed in version ! Y! i, R! s  M  h' E
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.; R$ Q# T! D9 x1 j
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|changed` use `result is changed`. This feature will be removed in version / ?" `9 M$ P# z; H
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.: A/ i: \4 F; \6 T5 E- w7 u
ok: [controller1 -> localhost]: V1 B6 P9 c# e9 V$ ~
ok: [controller2 -> localhost]2 c9 d, H6 L4 K" O3 H3 M4 t4 t. v8 w
ok: [controller3 -> localhost]
- u# ^- V8 @6 v8 l: KTASK [mariadb : Registering host from temp file] ******************************************************************************************************************
# e$ W" k' s. ^  Z  Pok: [controller1]& Z- K9 a0 ]0 _1 ^. Q
ok: [controller2]
4 D% s' B2 z/ O2 J4 |" ]6 Gok: [controller3]
4 q( \1 W) u8 iTASK [mariadb : Cleaning up temp file on localhost] ***************************************************************************************************************# O3 X6 W: R$ C2 R5 C( Y4 E
ok: [controller1 -> localhost]
) n+ k4 A8 d. t3 g( _3 TTASK [mariadb : include] ******************************************************************************************************************************************
" l. Z0 w" C$ V4 s, [+ C) e. w2 Yskipping: [controller1]
1 O3 A1 Y  p' X1 Askipping: [controller2]
- ?( Z4 ^& f! ^& pskipping: [controller3]" G2 C# \! Q; T' g: u/ w, q3 b
TASK [mariadb : include] ******************************************************************************************************************************************
5 }' b5 [, Q0 U8 C5 F1 ^6 k- ?0 y$ Oincluded: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/recover_cluster.yml for controller1, controller2, controller3/ g6 t# Q! e6 v' U# ^1 }) X! T6 k+ E
TASK [mariadb : fail] *********************************************************************************************************************************************
# Z  X1 l; w8 Q0 |$ bskipping: [controller1]- v5 V( w- b& M) x3 @
skipping: [controller2]
/ t7 m* A' ?" @) k% ?" `skipping: [controller3]. d2 O: ]. N6 ]$ h8 K- ]
TASK [mariadb : Cleaning up temp file on mariadb hosts] ***********************************************************************************************************
  U" Z" p# E. U/ {+ Yok: [controller2]
2 q0 q8 u2 z7 N6 d) n8 Fok: [controller1]
3 y2 _0 O0 L6 k  K( K: Q" O# e, |1 a2 fok: [controller3]
" O/ @; T0 l# ^8 O5 vTASK [mariadb : Cleaning up temp file on localhost] ***************************************************************************************************************
0 o- p( c1 b- B( [# @- b# W/ s, {ok: [controller1 -> localhost]9 w  P7 S: n, z7 \& o- i
TASK [mariadb : Stop MariaDB containers] **************************************************************************************************************************
8 M& ^1 f- S$ u/ pok: [controller2]3 E: K) z9 P/ Z
ok: [controller1]3 i# n+ |* j0 E0 L0 g
ok: [controller3]
9 K" ?! g/ @  ~. b( CTASK [mariadb : Run MariaDB wsrep recovery] ***********************************************************************************************************************
; s/ ~0 V  H8 D# l! O1 ]changed: [controller1]
3 R) ]+ b5 R3 t" E( P6 u! Fchanged: [controller2]. x8 r. h" Q- _' y3 D! J
changed: [controller3]  W+ D, H/ g% O, z9 U3 e
TASK [mariadb : Copying MariaDB log file to /tmp] *****************************************************************************************************************1 Z# r3 y" C, l% W9 G3 H7 }
changed: [controller3]7 f7 W! J1 g* b: u) T+ [/ K
changed: [controller2]
# w& g3 {- Q& D% Achanged: [controller1]1 y/ G: Q4 E8 g: Y) I- t4 J
TASK [mariadb : Get MariaDB wsrep recovery seqno] *****************************************************************************************************************7 A) i; n. \" L8 }. j$ B
changed: [controller2]$ z9 J6 `# H- D9 k6 g. T3 h' ]! a
changed: [controller1]- z8 m. F2 V4 m& ?# X, P: X
changed: [controller3]
9 q: d% c# U# LTASK [mariadb : Removing MariaDB log file from /tmp] **************************************************************************************************************
% I' C& \* N+ L8 W- j7 Dok: [controller2]
# T( w9 u- t# jok: [controller1]) b7 Z3 W# Z8 w$ N0 W0 p  ]5 m
ok: [controller3]
  D( V% h. t3 Q/ wTASK [mariadb : Registering MariaDB seqno variable] ***************************************************************************************************************
) |2 e: {% u5 b- Mok: [controller1], W, J* B; ]/ P6 F, L) v
ok: [controller2]; f( i& _! @# N( c3 k  P
ok: [controller3]
& v; E5 X# d( e- f- i; W; e. z+ }TASK [mariadb : Comparing seqno value on all mariadb hosts] *******************************************************************************************************0 c, n% \+ L5 N7 w
ok: [controller2] => (item=controller1)8 t1 m5 v: S9 [- L) r
ok: [controller1] => (item=controller1)
4 l3 ?- x2 _8 Y% V2 K8 ?" \ok: [controller3] => (item=controller1)9 H4 h! F% F+ K5 s6 n" [+ _! v
ok: [controller2] => (item=controller2)
7 p( Q. i% i2 D" H! zok: [controller3] => (item=controller2)5 t' b, ]8 S6 f0 Z! d
ok: [controller1] => (item=controller2)9 I: P) a& C$ Z  _, I5 S
ok: [controller2] => (item=controller3), d( Y/ B& i, O# t) `
ok: [controller3] => (item=controller3)
% t" u. o) C4 ^ok: [controller1] => (item=controller3)
% O( j4 I+ t+ Z3 fTASK [mariadb : Writing hostname of host with the largest seqno to temp file] *************************************************************************************. R3 J- W) G0 T: a( |1 V+ {
skipping: [controller3]
: [3 Q* o4 Y& x6 T/ Wok: [controller1 -> localhost]0 g0 G- u2 k  u
ok: [controller2 -> localhost]1 w# A' L4 V( v1 F; z
TASK [mariadb : Registering mariadb_recover_inventory_name from temp file] ****************************************************************************************( `- t/ \5 O; c0 U3 N
ok: [controller1]# p- M5 K/ T% w5 R! R, G- n$ H& b5 _
ok: [controller2]- Y# v( `+ T0 f' _+ s( {6 X
ok: [controller3]
4 M$ j8 j& x2 i( QTASK [mariadb : set_fact] *****************************************************************************************************************************************+ N! u  S' \8 D1 n) X" V
changed: [controller1]7 {  |- ?" _! t) O/ t3 H
changed: [controller2]
* h/ r$ E& c% B0 Y" j  lchanged: [controller3]0 ~( ^) n9 O  C- N/ X- B5 w
TASK [mariadb : Copying grastate.dat file from MariaDB container in bootstrap host] *******************************************************************************
( X: j4 V  l9 q6 N8 ~skipping: [controller1]
3 v+ J* J% {5 Q  |' [$ ]( X+ Dskipping: [controller3]
) y8 @( G; [" Q. `4 Hok: [controller2]
8 g5 d9 R- e9 J3 N4 ?TASK [mariadb : Set grastate.dat file from MariaDB container in bootstrap host] ***********************************************************************************/ N6 ?5 O9 C% J7 S' ^# @2 o; E
skipping: [controller1]
- d) T, p+ }: G8 F1 _skipping: [controller3]
. L/ G  W. ]1 L" t& _" [  jchanged: [controller2]. x9 C/ z- j# G: l5 G1 A
TASK [mariadb : Copying grastate.dat file to mariadb container] ***************************************************************************************************$ }' }% D' f# S( r7 e2 @. N
skipping: [controller1]8 b' V( G) z2 d+ \
skipping: [controller3]7 F1 G5 e% e, h. F* f! G$ Q
ok: [controller2]
7 {8 u! Z0 p0 p( LTASK [mariadb : Starting first MariaDB container] *****************************************************************************************************************! Z: ~: p, x, Z4 k5 O! J  I
skipping: [controller1]" F9 N; v7 M( @5 X* W
skipping: [controller3]5 T, i2 q8 _6 t- z' @$ |/ \9 u
changed: [controller2]
) a8 }4 b8 Y! |) r% v* d2 ~TASK [mariadb : Wait for first MariaDB container] *****************************************************************************************************************' T! d6 M, g3 r5 |1 i  I
skipping: [controller1]
2 v% d  t; k$ [: @# b6 Askipping: [controller3]2 X& D& A- Y+ R" Q6 ~+ `: e
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|success` use `result is success`. This feature will be removed in version
0 O4 G) e' S/ \# M2 m6 m. h2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
" b1 Y& S+ D/ i: `2 WFAILED - RETRYING: Wait for first MariaDB container (10 retries left).& h/ C$ c0 U& n
ok: [controller2]
1 {& [$ I7 D' U: f5 MTASK [mariadb : Set first MariaDB container as primary] ***********************************************************************************************************
& ]# \0 V5 A, `5 jskipping: [controller1]
: @& o$ Z; Y' T' J3 P+ t( askipping: [controller3]
' s- l3 _) l9 b* @% achanged: [controller2]
: O- I1 ~1 V/ l6 a" I9 K. \TASK [mariadb : Wait for MariaDB to become operational] ***********************************************************************************************************
' s' m$ [8 V" c8 \skipping: [controller1]
6 u( V$ |7 S( c9 o+ Nskipping: [controller3]9 ?8 [& T9 n) z; ]; Z' r
ok: [controller2]
# [4 t: `  Y8 C4 {# HTASK [mariadb : Restart slave MariaDB container] ******************************************************************************************************************2 c, `5 Q: p. W
skipping: [controller2]
) d2 I0 D( e3 I% A2 Y; C+ ]# tchanged: [controller3]/ c/ w# t6 s* r
changed: [controller1]& r' K$ S' ~5 w6 F% _# m
TASK [mariadb : Wait for slave MariaDB] ***************************************************************************************************************************- Q* g2 E; w; ]7 }% X
skipping: [controller2]
4 ^, O3 V! y2 Q7 e[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|success` use `result is success`. This feature will be removed in version
, Q" M7 n; Q  ^, x( I2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
% d7 X* p! o) N  H" P+ y3 }7 u; SFAILED - RETRYING: Wait for slave MariaDB (10 retries left).
  W5 _8 B( n7 V  P4 A[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|success` use `result is success`. This feature will be removed in version
& r) G6 b& s; U, \& M! i0 o& D( \2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.* G" Z3 R, A+ \6 l
FAILED - RETRYING: Wait for slave MariaDB (10 retries left).& b, ^" h, r% G/ C1 X6 Y5 D
ok: [controller3]
1 Q+ D9 P8 ~  x7 O7 ]' |' n: I# m# hok: [controller1]8 K8 m: R+ ^. V+ t; ]8 q
[WARNING]: flush_handlers task does not support when conditional
6 J( l: U8 n' ^1 u
# ~6 k, r+ ^6 W2 e" r6 |5 HRUNNING HANDLER [mariadb : restart slave mariadb] *****************************************************************************************************************
6 m/ F# u% k/ _; n2 Q3 s9 [, `skipping: [controller3]& W3 ]' c# ^/ H2 z( Y/ L# R
skipping: [controller1]
% P* Z% ^4 q, t9 g% o( }skipping: [controller2]
- T% L4 G/ V. C- v- eRUNNING HANDLER [mariadb : restart master mariadb] ****************************************************************************************************************) x" E: Q: v( G* B  G. x4 W3 V0 k
skipping: [controller3]' E$ Q  o( R) t
skipping: [controller1]
6 R, q7 |9 r# J, fskipping: [controller2]
+ q* D8 a. }$ n8 X. c* h6 n: v( bTASK [mariadb : include] ******************************************************************************************************************************************: A  a. r! u1 c3 A5 _
included: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/register.yml for controller1, controller2, controller3
& N3 a8 G! H2 }8 ]* JTASK [mariadb : Creating haproxy mysql user] **********************************************************************************************************************$ Y5 o! j; U" b% O" i
ok: [controller1], B. w3 `5 [1 ~
TASK [mariadb : Cleaning up facts] ********************************************************************************************************************************2 z/ E+ k! G' j/ [. N  t
ok: [controller1]
. |9 Y7 q0 T6 X4 O+ c/ l/ W; nok: [controller2]3 i8 n1 P( y0 K5 @/ w& z# |" l$ ?
ok: [controller3]1 @: @9 o6 b* Q' O( V7 J
TASK [mariadb : include] ******************************************************************************************************************************************  a) B. u% ]+ `0 e) X3 `. {4 [
included: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/check.yml for controller1, controller2, controller39 P1 l' g( A# Z" }; C0 p5 c$ W
TASK [mariadb : Waiting for MariaDB service to be ready through VIP] **********************************************************************************************: o. r$ N; C  f! R; b2 C1 }# J
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|success` use `result is success`. This feature will be removed in version 2 x& g+ Q, J5 O: ]
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
2 ~4 m* r; c& M* Z6 e/ O* s5 _- wok: [controller1]0 c! `+ `; a; u4 M
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|success` use `result is success`. This feature will be removed in version + f6 Z9 {( ~8 i! s( j9 `% y' V
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
5 N& z$ o, @+ F* Q  j- a+ @: \) T[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|success` use `result is success`. This feature will be removed in version ' ]0 k8 P, F1 ?' \# Y8 T! [
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
* S, k9 H$ R( r' o% Z9 x9 {! iok: [controller2]7 b# g1 n# d9 h4 o. l0 }0 U9 G
ok: [controller3]
4 |$ _4 E2 X8 t; B0 V  A6 j: ^. w! \PLAY RECAP ********************************************************************************************************************************************************' X3 Q% D: D+ F- T4 _
controller1                : ok=37   changed=6    unreachable=0    failed=0    skipped=15   rescued=0    ignored=0   ; y6 W: o( l5 A# x8 I, M! o; x
controller2                : ok=37   changed=8    unreachable=0    failed=0    skipped=10   rescued=0    ignored=0   
: _$ {/ g4 F! o/ K; B' }controller3                : ok=31   changed=6    unreachable=0    failed=0    skipped=16   rescued=0    ignored=0   ) A: d/ K3 G; [) a6 i* F

- O8 s' K  q8 W' x$ l恢复正常。' y6 b1 Q! Q& W8 ?: M% s# |

$ s& `; _5 h* {7 j8 l- s7 e# @. I$ V; |# e% R' h
有时候通过一些特殊手段可以帮助我们解决一些特别的问题,与其长时间尝试老方法,不如来点新的方式试试或许不一样的效果。5 {  k/ n8 q) ]" c, `" @: V6 _2 |
. J: }8 y, ^0 t

7 E% M/ w4 E% V我们首先是因为数据库恢复出问题,无法恢复数据,, 检查数据的库的值,
9 e; [. }: i' I/ U' y. L7 E
cat /var/lib/docker/volumes/mariadb/_data/grastate.dat
中seqno值,若该值在所有节点中存在唯一得最大值% h, \# B' N. g. ^
然后我们保留这个节点上数据,
: W9 E1 M; e+ s删除其他节点上的数据文件
8 G/ \. [# o( S然后通过scp或者rsync同步保留节点的数据文件  (根据个人喜好同步文件,本人建议使用rsync)! _: c- V( i# m$ o0 S0 e4 r
然后再执行kolla-ansible数据库mariadb_recovery恢复命令:( E8 d9 P/ t0 e) F- M9 N

: B3 Z1 w* Y# e9 h, b; _: k$ e
+ L5 R3 r/ W( U& p* b  N0 k

4 J$ |1 L9 V+ _. E

  c& d+ M( }  B6 ~. L差不多就可以完成数据库集群恢复了。# V$ V0 I. O! Y7 x. M9 l
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

如有购买积分卡请联系497906712

QQ|返回首页|Archiver|手机版|小黑屋|易陆发现 点击这里给我发消息

GMT+8, 2021-11-28 20:30 , Processed in 0.427911 second(s), 23 queries .

Powered by LR.LINUX.cloud bbs168x X3.2 Licensed

© 2012-2022 Comsenz Inc.

快速回复 返回顶部 返回列表