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

易陆发现论坛

 找回密码
 开始注册
查看: 210|回复: 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_recovery4 E$ M& S) w+ V0 g0 G
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 * S& J7 t- z, B7 _
/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.
% N2 _: C7 I1 y8 ?6 _  from cryptography.exceptions import InvalidSignature
/ O& \* K: A! Q- g[WARNING]: Unable to parse /var/lib/docker/volumes/mariadb/_data/multinode as an inventory source
' F) `, `3 c( H1 E; t[WARNING]: No inventory was parsed, only implicit localhost is available' G; h# U+ r& d
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'( |$ W5 G5 G$ H* X0 i; w1 }: R. _
[WARNING]: Could not match supplied host pattern, ignoring: mariadb
1 C$ Z5 h7 z( @" s* f2 f
" e+ a% z, B$ U- A$ NPLAY [Detect openstack_release variable] *************************************************************************************************************************** i! _4 ^+ |, E
skipping: no hosts matched" F3 s/ F4 P  @8 }0 l8 T% c
PLAY [Recover mariadb] ********************************************************************************************************************************************, p* Y" r- m! h/ V$ _$ M5 f
skipping: no hosts matched
3 a% O# _$ J! aPLAY RECAP ********************************************************************************************************************************************************
, L' K# W4 L" J4 f5 Y6 v' l# a( O[root@controller1 _data]# cd $ j$ k7 |6 u" K' T. ~" n) c$ M
[root@controller1 ~]# kolla-ansible -i multinode mariadb_recovery, U) ]( H9 B" ?( z" Y
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 3 _! C* l3 E0 w7 q) a) t3 g+ F: e; ^
/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.* ?# c  A" x0 {0 v3 S: u& F
  from cryptography.exceptions import InvalidSignature
  K' ^6 \, {1 A3 s2 U2 M4 @[WARNING]: Invalid characters were found in group names but not replaced, use -vvvv to see details: D& E) K" r, Z" ?) z. A
[WARNING]: Found variable using reserved name: action3 A$ n& h# l8 S" b. I1 _2 x

# A; S! H3 i3 ]( YPLAY [Detect openstack_release variable] **************************************************************************************************************************7 s2 P$ ?: e/ z8 J0 X+ |: Q/ ~. {
TASK [Get current kolla-ansible version number] *******************************************************************************************************************- ~, Z# {) e3 G  H2 c9 I9 Y4 k1 P+ G+ l1 E
skipping: [controller1]
) y" y2 c, B1 ^% d) \) |& X& [skipping: [controller2]$ A- Z  Q- T2 t7 Z
skipping: [controller3]
+ a/ j) S3 U/ E2 R2 pTASK [Set openstack_release variable] *****************************************************************************************************************************! {. Z  I, L2 b7 E
skipping: [controller1]
) e, Y5 M: j* M! S5 w, wskipping: [controller2]1 V' ~: Z0 u! E' P% O) U
skipping: [controller3]
5 D) I" T7 o& C6 D; H: n0 ^PLAY [Recover mariadb] ********************************************************************************************************************************************
' N* n( d& m* |' M) Q! w+ gTASK [Gathering Facts] ********************************************************************************************************************************************, @6 M& E8 Q. |: A
ok: [controller1]1 X% |7 j6 q0 t" @' P
ok: [controller3]
. Y8 G/ d+ V! O6 |' zok: [controller2]
( P1 j9 l7 V# ?  Y% j8 l) RTASK [common : include] *******************************************************************************************************************************************  _2 {, ^% J" S4 k6 y8 Z9 _
skipping: [controller1]
& U9 E+ q% u$ O7 H3 e- u4 Oskipping: [controller2]: m* u* c0 |. w  h& `- r3 `3 _+ Z
skipping: [controller3]
' u7 Z4 m+ P3 O$ `/ |TASK [common : Registering common role has run] *******************************************************************************************************************
3 r' U1 J3 |8 R% B* r2 Mskipping: [controller1]
# e4 ]0 I* K  Y6 ^, q2 }# Z6 F' Mskipping: [controller2]
6 I+ T8 l4 U! jskipping: [controller3]
* _9 F+ ^0 J# m+ u$ k6 R2 `TASK [mariadb : include] ******************************************************************************************************************************************" y( X: O1 F) V' d/ `7 D& E
included: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/deploy.yml for controller1, controller2, controller3
' c3 G1 j7 D% K% @0 c8 S9 mTASK [mariadb : include] ******************************************************************************************************************************************
2 F; ]' t3 a3 h' N% ?included: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/config.yml for controller1, controller2, controller3
, ^8 H, p. r( v# r2 [TASK [mariadb : Ensuring config directories exist] ****************************************************************************************************************8 r- Y4 W( R9 Y$ B9 [
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'})
3 q* e. f& V- F2 u, `7 U0 @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'})
1 x# s- y; i1 ?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'}). z% o# j0 f- J
TASK [mariadb : Copying over config.json files for services] ******************************************************************************************************
$ v2 W' [9 h  o6 l* vok: [controller2]8 i' V  |# n+ g) E" _
ok: [controller3]
+ W* H( y( z7 |. Uok: [controller1]$ p$ g* I  w2 v0 V& z, E5 @; R" _9 d6 {
TASK [mariadb : Copying over galera.cnf] **************************************************************************************************************************
7 v) o" f/ i; ~( s& ^0 B: I[WARNING]: _execute_module no longer honors the tmp parameter. Action plugins should set self._connection._shell.tmpdir to share the tmpdir
- V& z+ V" D5 `6 H- V( i[WARNING]: _execute_module no longer honors the tmp parameter. Action plugins should set self._connection._shell.tmpdir to share the tmpdir
/ o' }. a6 @- V) Z[WARNING]: _execute_module no longer honors the tmp parameter. Action plugins should set self._connection._shell.tmpdir to share the tmpdir0 L  n: G4 ?/ O
ok: [controller3]& K8 b" x9 B2 _: J2 f% x' z
ok: [controller2]
3 V0 K2 t6 I6 ?6 p) O- d# ~ok: [controller1]$ B9 p) f7 C# l( X; ^
TASK [mariadb : Copying over wsrep-notify.sh] *********************************************************************************************************************7 y0 w( S1 x1 B! x& F2 u' f
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'})
+ r3 r8 z/ J7 t' p9 o3 x- Cok: [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+ j2 C+ ^$ H
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'})$ z( D! g, P! z6 I
TASK [mariadb : Check mariadb containers] *************************************************************************************************************************1 B# r6 L6 E( F  x0 {, E
changed: [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'})
" T) @  g% l( k' @, v, w, ?changed: [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'})
' B6 R, F" ?  B9 o7 echanged: [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'})( G% \+ q5 A  a
TASK [mariadb : include] ******************************************************************************************************************************************
$ H$ ~; @$ N: _7 d( g0 Hincluded: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/bootstrap.yml for controller1, controller2, controller3
1 Y8 D# r$ [7 A) B/ D0 PTASK [mariadb : set_fact] *****************************************************************************************************************************************
0 B9 n; B, q0 M. E' ?ok: [controller1]/ y( F5 {/ E( k/ y& M
ok: [controller2]3 g2 A  F& D7 w! Q0 j' y4 N
ok: [controller3]
0 M3 }8 |' ~' T- X' Q: vTASK [mariadb : include] ******************************************************************************************************************************************
4 m) N9 R. j, a0 j; ?included: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/lookup_cluster.yml for controller1, controller2, controller3
" V+ u6 p6 y3 O/ ]TASK [mariadb : Cleaning up temp file on localhost] ***************************************************************************************************************
4 v$ y& I; ^3 pok: [controller1 -> localhost]
9 o7 p0 X3 J9 k8 h5 `4 E2 u& ^TASK [mariadb : Creating temp file on localhost] ******************************************************************************************************************: l$ L; I# o1 I5 u
ok: [controller1 -> localhost]- {1 g- l  C: I1 k
TASK [mariadb : Creating mariadb volume] **************************************************************************************************************************
/ ?- X) J( ~) m: `; \7 Yok: [controller1]9 q6 r+ y5 q3 A- {7 p
ok: [controller2]
% t7 t0 A2 n) ook: [controller3]
0 m& w, r( @2 C, |& q5 {, ATASK [mariadb : Writing hostname of host with existing cluster files to temp file] ********************************************************************************' S; {4 C3 d- A
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|changed` use `result is changed`. This feature will be removed in version 5 L% ~6 \1 _$ s+ r& S
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
! `7 @# O, a  n& F$ d[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|changed` use `result is changed`. This feature will be removed in version
3 o* }! X! H$ A2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
. J# q- K/ x7 L  B" [: I" O[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|changed` use `result is changed`. This feature will be removed in version 4 _, h, B. M! ]6 h  D( g  i! S. p) w
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
, T% G1 ]' [: g2 D0 j; Yok: [controller1 -> localhost]: P9 B+ n) l: J0 y& C
ok: [controller2 -> localhost]. g7 c; S  @3 y% ]# Z0 a
ok: [controller3 -> localhost]6 X1 ?' `: S2 u. p* w2 v! ~
TASK [mariadb : Registering host from temp file] ******************************************************************************************************************
5 a3 o. F; C: i, Jok: [controller1]+ D  N- F9 t/ a" c! H
ok: [controller2]: e: I; E) }. w/ s
ok: [controller3]
7 k% ]) ]0 h6 \# z6 `TASK [mariadb : Cleaning up temp file on localhost] ***************************************************************************************************************
7 x: O) S: v) Iok: [controller1 -> localhost]! d/ ~, K- V, t# g) B* V
TASK [mariadb : include] ******************************************************************************************************************************************8 |3 @, W$ o* S1 O) d( I# D  K
skipping: [controller1]6 I; I# t; H( f9 R, s  [2 D: ^
skipping: [controller2]  n0 J; g/ {' @  y5 D$ I' m
skipping: [controller3]- e: ^: h% G8 f" }$ Q
TASK [mariadb : include] ******************************************************************************************************************************************( {# d0 ~+ L6 P
included: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/recover_cluster.yml for controller1, controller2, controller3
. C! y( b8 ]  Z+ n, I6 u8 q1 TTASK [mariadb : fail] *********************************************************************************************************************************************8 G. g! Z: _" {7 q" X+ e
skipping: [controller1]. F% |! S) b* ^1 v
skipping: [controller2]2 R0 n, U/ U9 `: X; L
skipping: [controller3]- |( A1 E, B2 j& s; U
TASK [mariadb : Cleaning up temp file on mariadb hosts] ***********************************************************************************************************  [( E5 D3 t5 v9 y$ l8 z8 s
ok: [controller2]
3 |: a! I  m. _* W) \1 A# P0 `ok: [controller1]
9 \0 {0 s0 d0 [& ^0 G8 rok: [controller3]
; Y# w! X, J) L; `TASK [mariadb : Cleaning up temp file on localhost] ***************************************************************************************************************
# O/ ~+ D5 M6 l1 t4 nok: [controller1 -> localhost]
' E2 Y8 v8 F0 p/ s7 W7 nTASK [mariadb : Stop MariaDB containers] **************************************************************************************************************************
! E. q' l* v+ cok: [controller2]
0 @& E/ @3 X" t3 i# ]+ ?7 ]( tok: [controller1]. b+ r. M! r) \, G
ok: [controller3]
" v) f2 |1 q: L: x# }TASK [mariadb : Run MariaDB wsrep recovery] ***********************************************************************************************************************; g5 f. k% Y( G6 s
changed: [controller1]
: }+ F$ S1 b. U& A1 x2 P% bchanged: [controller2]9 c. c+ t& {8 c, B% M9 }% [" k
changed: [controller3]
9 j$ U% h0 g* r' H" l. x( eTASK [mariadb : Copying MariaDB log file to /tmp] *****************************************************************************************************************) d1 j1 h( s- t+ J  ]
changed: [controller3]
0 S1 E; v' u2 C' }" M' W! `( p# g- Uchanged: [controller2]
% r+ d8 z2 Q1 P& v+ M, Xchanged: [controller1]& x/ c! M! ^/ S0 a8 l+ @
TASK [mariadb : Get MariaDB wsrep recovery seqno] *****************************************************************************************************************
: v: i( @3 d* O: Tchanged: [controller2]
, Q6 P$ y3 A/ d/ I2 f( R& _changed: [controller1]
  F* L: p7 W, x: lchanged: [controller3]
; S; J: w( y2 c, b# eTASK [mariadb : Removing MariaDB log file from /tmp] *************************************************************************************************************** Z: L2 R$ _# H. i
ok: [controller2]$ x( h7 T' \6 [8 _5 p# n
ok: [controller1]; ]& N7 f% {$ v. \7 J: Q( X7 L* ~0 m
ok: [controller3]
/ v( ^2 F* }* s# `. m' q& D1 r/ sTASK [mariadb : Registering MariaDB seqno variable] ***************************************************************************************************************+ i( \# l0 D8 M1 L
ok: [controller1]$ w, \& a8 S) O# n  y
ok: [controller2]
. \* X) F2 F7 C& jok: [controller3]
* m, N$ [! P5 c  @9 w( rTASK [mariadb : Comparing seqno value on all mariadb hosts] *******************************************************************************************************4 Y) m% p1 u& v* ^5 D- y7 s
ok: [controller2] => (item=controller1)
9 ^4 y% X! N  Ook: [controller1] => (item=controller1)
5 u! z( _% c/ M" P& u9 p8 Jok: [controller3] => (item=controller1)* g2 P2 n/ r( o* P# {. M
ok: [controller2] => (item=controller2)
8 b6 S8 K" l' C/ cok: [controller3] => (item=controller2)
  U; M3 I, B) [" ]& I; Yok: [controller1] => (item=controller2)
3 D$ q" S: x1 Eok: [controller2] => (item=controller3)
3 H$ c; T# ^( _) o- r, Cok: [controller3] => (item=controller3)2 L# z/ x# q1 r5 {8 P7 O" Q& w/ _
ok: [controller1] => (item=controller3)' t: `/ p2 [* h2 g* \
TASK [mariadb : Writing hostname of host with the largest seqno to temp file] *************************************************************************************
* ~# A$ c- r5 ]" [2 |skipping: [controller3]
7 V% r$ X% v4 Q4 Z9 V3 G! I; aok: [controller1 -> localhost]3 L+ V: V+ F8 J* z( Q
ok: [controller2 -> localhost]. L# d, d! ^  I6 o
TASK [mariadb : Registering mariadb_recover_inventory_name from temp file] ****************************************************************************************
8 l( T2 p1 b! B! I# w8 z( E1 Zok: [controller1]
9 K5 A7 Z, j* S  w5 T* X. |ok: [controller2]
1 d8 Z' [+ O3 C/ }& b1 r. Fok: [controller3]
2 l" v; [: V. d7 D0 U9 v7 ITASK [mariadb : set_fact] *****************************************************************************************************************************************6 B" }1 \- o% e' c5 f: ^
changed: [controller1]+ Z& M5 c4 I2 y  d/ Y" B
changed: [controller2]
( [5 B+ P# K5 }* @/ r4 k- {. Nchanged: [controller3]
! o$ S* C) p; S" t& B9 J4 dTASK [mariadb : Copying grastate.dat file from MariaDB container in bootstrap host] *******************************************************************************
- u8 x: i( E5 C" a3 q* e/ ^skipping: [controller1]* P9 t, N' b0 B2 M. k" c
skipping: [controller3]2 [1 A0 y9 Q0 a  E
ok: [controller2]) x6 ~2 r% l9 U4 L7 s0 p2 N
TASK [mariadb : Set grastate.dat file from MariaDB container in bootstrap host] ***********************************************************************************6 @* [' v' u5 {0 h1 Q
skipping: [controller1]9 M$ x3 o* ?8 @. D# ~% ]9 R% w
skipping: [controller3]) O2 ?, z! o2 w9 o5 Z
changed: [controller2]
2 n" y# G! O1 Y1 FTASK [mariadb : Copying grastate.dat file to mariadb container] ***************************************************************************************************
4 H! B- k# V; g3 @7 @8 d5 L/ hskipping: [controller1]: x* d  S$ M# _- j/ `2 ~. _
skipping: [controller3]
2 E9 w' b6 c! O* {/ L. i$ eok: [controller2]* r+ B6 R; f8 Z( \( ?
TASK [mariadb : Starting first MariaDB container] *****************************************************************************************************************$ v' X3 L1 Q! t% S4 X' x
skipping: [controller1]
3 z7 V' y0 q" _, |skipping: [controller3]  Q. U% M$ D( y9 ~0 I
changed: [controller2]6 E; X) _" k+ v" `8 T) a+ e: y
TASK [mariadb : Wait for first MariaDB container] *****************************************************************************************************************
+ P: ?, O2 r+ k# V9 Y4 W  |skipping: [controller1]  u2 f9 d" i+ Q( V7 _: h
skipping: [controller3]
& U$ x) Q& O( f$ K2 }& ~: q4 D[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|success` use `result is success`. This feature will be removed in version . S$ Q4 q( y4 V6 J" Y
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
' V0 B7 v9 p! S. V& z/ }/ Q& E! c& ]FAILED - RETRYING: Wait for first MariaDB container (10 retries left).9 C! ]/ {6 n# T4 |. `5 j
ok: [controller2]
' u, C5 ~: ]- M3 e1 Z/ a! O1 gTASK [mariadb : Set first MariaDB container as primary] ***********************************************************************************************************
$ x/ X  X, d' c# `8 n+ i) Rskipping: [controller1]+ o8 e6 ]* [! K9 C
skipping: [controller3]9 r4 T6 o& l9 I/ o# d+ {
changed: [controller2]
' Z) R. t# x. G" x8 \; zTASK [mariadb : Wait for MariaDB to become operational] ***********************************************************************************************************
, D9 f2 Z2 S2 X% Sskipping: [controller1]
. {  _* H! }8 W* K( y  T# t* Pskipping: [controller3]  |( Y: U3 ?: ~0 }' x% a/ q1 Q
ok: [controller2]
" v& E3 }7 k. S, j* T' J' P6 G$ yTASK [mariadb : Restart slave MariaDB container] ******************************************************************************************************************
6 |4 c; d: B9 I4 Jskipping: [controller2]( ~8 \" `' c/ x8 I+ v
changed: [controller3]" O! l9 z$ j9 `
changed: [controller1]
  T) M6 o! q+ R" fTASK [mariadb : Wait for slave MariaDB] ***************************************************************************************************************************1 o( s7 u# N% `( v5 T
skipping: [controller2]
6 Y# Q3 t5 r) A, l# G+ E) q( x[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|success` use `result is success`. This feature will be removed in version 9 f( p- @+ t  ]4 @
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
: i% i3 \& b! v) ^0 pFAILED - RETRYING: Wait for slave MariaDB (10 retries left).4 h& z- b0 f& l% O
[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 W4 K. f5 e7 v* n2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.7 C: Z: g0 h" F4 i3 [% x
FAILED - RETRYING: Wait for slave MariaDB (10 retries left).
3 S/ c* v- c+ Jok: [controller3]/ q+ T2 f3 I# {* Z- w
ok: [controller1]
' r' Q1 G( m$ @: P* H& a[WARNING]: flush_handlers task does not support when conditional
8 H* L8 T' q! f% e. Q
" E1 \5 W+ x$ Q7 dRUNNING HANDLER [mariadb : restart slave mariadb] *****************************************************************************************************************% h$ \9 u9 d) w! G
skipping: [controller3]
& i% z  P  x4 |, d$ p9 ]skipping: [controller1]
0 i! p- r+ }. y5 w9 cskipping: [controller2]. D4 P7 A; a; c5 x' ~. r% B
RUNNING HANDLER [mariadb : restart master mariadb] ****************************************************************************************************************8 ^5 [- W  m" N& o, p
skipping: [controller3]
% e! B1 r: ~! A4 S' o/ F) I+ S* Uskipping: [controller1]3 K# v# {8 @  R8 M) W5 l( a/ }( `+ a
skipping: [controller2]& y, o3 D7 b4 t' q$ b$ u  K
TASK [mariadb : include] ******************************************************************************************************************************************' X6 M" I* {+ P! K+ t
included: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/register.yml for controller1, controller2, controller3# |4 s- b7 z* t$ v
TASK [mariadb : Creating haproxy mysql user] **********************************************************************************************************************1 q5 E+ h% \/ R
ok: [controller1]
- b7 B+ q5 O6 ?( \" q, OTASK [mariadb : Cleaning up facts] ********************************************************************************************************************************/ O% n% h9 f  r
ok: [controller1]
, O: {' @$ c* X. Zok: [controller2]
) m: e. Z. x2 s$ Q! f  rok: [controller3]
  _1 U. @# {+ Q  N! e( ]TASK [mariadb : include] ******************************************************************************************************************************************
3 |4 H/ S$ H0 `2 T# nincluded: /usr/share/kolla-ansible/ansible/roles/mariadb/tasks/check.yml for controller1, controller2, controller35 Y0 u6 P9 N0 n5 H) S( {, s- u
TASK [mariadb : Waiting for MariaDB service to be ready through VIP] **********************************************************************************************
/ t. n# w* a% c[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|success` use `result is success`. This feature will be removed in version 4 j# F* z: r4 @. g; e
2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.) J0 B: z/ z$ {' ?/ v: ^
ok: [controller1]* P: F! b2 Q5 Q- |
[DEPRECATION WARNING]: Using tests as filters is deprecated. Instead of using `result|success` use `result is success`. This feature will be removed in version
  c8 x* k9 W5 V. y4 e% [( x% X9 d2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
( K8 o, v6 J, @% h( _$ i[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 j: y9 F, o1 q$ D1 s2.9. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.0 y6 k6 S0 {3 Z! ?- C) ?
ok: [controller2]# r4 P# U3 C# U
ok: [controller3]! U! ~! \+ p& \$ d1 {& V
PLAY RECAP ********************************************************************************************************************************************************$ a7 N! |% V0 \# }
controller1                : ok=37   changed=6    unreachable=0    failed=0    skipped=15   rescued=0    ignored=0   
5 t; u" |- }) Q) N8 [  Ocontroller2                : ok=37   changed=8    unreachable=0    failed=0    skipped=10   rescued=0    ignored=0   
- x8 ?) u; |; F$ O* c4 n2 p4 y/ G( J3 lcontroller3                : ok=31   changed=6    unreachable=0    failed=0    skipped=16   rescued=0    ignored=0   
4 S$ f, Q3 e, Q2 K" M* ^' ]5 ^* H7 @5 v" O9 b; Q% F# ~
恢复正常。$ a& O& e  K1 a
8 {! m; [6 z- r$ t7 p
1 h, k" }8 e9 j) M3 i- R
有时候通过一些特殊手段可以帮助我们解决一些特别的问题,与其长时间尝试老方法,不如来点新的方式试试或许不一样的效果。
" I  t+ {4 M( n- }6 F1 K2 l) n( U& t6 K3 ^$ w: R  }1 ]! c

. l7 d: m5 w4 w! o8 f' S$ h& N我们首先是因为数据库恢复出问题,无法恢复数据,, 检查数据的库的值,5 g" h& w; _! C! M' [
cat /var/lib/docker/volumes/mariadb/_data/grastate.dat
中seqno值,若该值在所有节点中存在唯一得最大值8 Y  w8 b) U8 I( H! c  Z+ h
然后我们保留这个节点上数据,4 T! M8 Y- H7 _0 d  ~/ K. y+ p* a1 p
删除其他节点上的数据文件& Q5 @1 n! K$ Y. g' v3 ~4 i. p
然后通过scp或者rsync同步保留节点的数据文件  (根据个人喜好同步文件,本人建议使用rsync)2 Q7 P2 v# F1 U% M" c4 x0 N8 z
然后再执行kolla-ansible数据库mariadb_recovery恢复命令:( Q0 |' a6 \' R8 ~# f8 m

- k* k1 g7 o  w- i

* e2 j) p2 Z$ U- r( ?3 U( M6 N" l2 T. {& b! S+ d1 E2 H

4 j* m- c8 @% ], Z差不多就可以完成数据库集群恢复了。
; x; x+ E/ x9 y* W, M
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

如有购买积分卡请联系497906712

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

GMT+8, 2021-12-2 09:16 , Processed in 0.076403 second(s), 23 queries .

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

© 2012-2022 Comsenz Inc.

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