summaryrefslogtreecommitdiffstats
path: root/done/GlusterFS 3.7/Policy based Split-brain Resolution.md
blob: f7a6870e446ec8d95fff6fc7afa33b7e5bff7ea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Feature
-------

This feature provides a way of resolving split-brains based on policies
from the gluster CLI.

Summary
-------

This feature provides a way of resolving split-brains based on policies.
Goal is to give different commands to resolve split-brains using
policies like 'choose a specific brick as source' and choose the biggest
files as source etc.

Owners
------

Ravishankar N  
Pranith Kumar Karampuri

Current status
--------------

Feature completed.

Detailed Description
--------------------

Till now, if there is a split-brain manual intervention is required to
resolve split-brain. But most of the times it so happens that files from
particular brick are chosen as source or the files with bigger file size
is chosen as source. This feature provides CLI that can be used to
resolve the split-brains in the system at that moment using these
policies.

Benefit to GlusterFS
--------------------

It improves manageability of resolving split-brains

Scope
-----

### Nature of proposed change

####Added new gluster CLIs:

1.```gluster volume heal <VOLNAME> split-brain bigger-file <FILE>.```

Locates the replica containing the FILE, selects bigger-file as source
and completes heal.

2.```gluster volume heal <VOLNAME> split-brain source-brick <HOSTNAME:BRICKNAME> <FILE>.```

Selects ```<FILE>``` present in ```<HOSTNAME:BRICKNAME>``` as source and completes
heal.

3.```gluster volume heal <VOLNAME> split-brain <HOSTNAME:BRICKNAME>.```

Selects **all** split-brained files in ```<HOSTNAME:BRICKNAME>``` as source
and completes heal.

Note: ```<FILE>``` can be either the full file name as seen from the root of
the volume (or) the gfid-string representation of the file, which
sometimes gets displayed in the heal info command's output.

### Implications on manageability

New CLIs are added to improve manageability of files in split-brain

### Implications on presentation layer

None

### Implications on persistence layer

None

### Implications on 'GlusterFS' backend

None

### Modification to GlusterFS metadata

None

### Implications on 'glusterd'

None

How To Test
-----------

Create files in data and metadata split-brain. Accessing the files from
clients gives EIO. Use the CLI commands to pick the source file and
trigger heal After the CLI returns success, the files should be
identical on the replica bricks and must be accessible again by the
clients

User Experience
---------------

New CLIs are introduced.

Dependencies
------------

None

Documentation
-------------

TODO: Add an md file in glusterfs/doc.

Status
------

Feature completed. Main and dependency patches:

<http://review.gluster.org/9377>  
<http://review.gluster.org/9375>  
<http://review.gluster.org/9376>  
<http://review.gluster.org/9439>  

Comments and Discussion
-----------------------

---