Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
1e7181e2
Commit
1e7181e2
authored
Aug 13, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
neoctl: document 'check' command, fix its *_tid arguments
parent
36fff189
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
neo/neoctl/app.py
neo/neoctl/app.py
+16
-3
No files found.
neo/neoctl/app.py
View file @
1e7181e2
...
@@ -59,6 +59,9 @@ class TerminalNeoCTL(object):
...
@@ -59,6 +59,9 @@ class TerminalNeoCTL(object):
def
asClusterState
(
self
,
value
):
def
asClusterState
(
self
,
value
):
return
getattr
(
ClusterStates
,
value
.
upper
())
return
getattr
(
ClusterStates
,
value
.
upper
())
def
asTID
(
self
,
value
):
return
p64
(
int
(
value
,
0
))
asNode
=
staticmethod
(
uuid_int
)
asNode
=
staticmethod
(
uuid_int
)
def
formatRowList
(
self
,
row_list
):
def
formatRowList
(
self
,
row_list
):
...
@@ -197,7 +200,15 @@ class TerminalNeoCTL(object):
...
@@ -197,7 +200,15 @@ class TerminalNeoCTL(object):
def
checkReplicas
(
self
,
params
):
def
checkReplicas
(
self
,
params
):
"""
"""
Test whether partitions have corrupted meta
Any corrupted cell is put in CORRUPTED state, possibly make the
cluster non operational.
Parameters: [partition]:[reference] ... [min_tid [max_tid]]
Parameters: [partition]:[reference] ... [min_tid [max_tid]]
reference: node id of a storage with known good data
If not given, and if the cluster is in backup mode, an upstream
cell is automatically taken as reference.
"""
"""
partition_dict
=
{}
partition_dict
=
{}
params
=
iter
(
params
)
params
=
iter
(
params
)
...
@@ -207,9 +218,9 @@ class TerminalNeoCTL(object):
...
@@ -207,9 +218,9 @@ class TerminalNeoCTL(object):
try
:
try
:
partition
,
source
=
p
.
split
(
':'
)
partition
,
source
=
p
.
split
(
':'
)
except
ValueError
:
except
ValueError
:
min_tid
=
p64
(
p
)
min_tid
=
self
.
asTID
(
p
)
try
:
try
:
max_tid
=
p64
(
params
.
next
())
max_tid
=
self
.
asTID
(
params
.
next
())
except
StopIteration
:
except
StopIteration
:
pass
pass
break
break
...
@@ -283,6 +294,8 @@ class Application(object):
...
@@ -283,6 +294,8 @@ class Application(object):
return
'
\
n
'
.
join
(
result
)
return
'
\
n
'
.
join
(
result
)
def
usage
(
self
,
message
):
def
usage
(
self
,
message
):
output_list
=
[
message
,
'Available commands:'
,
self
.
_usage
(
action_dict
)]
output_list
=
(
message
,
'Available commands:'
,
self
.
_usage
(
action_dict
),
"TID arguments must be integers, e.g. '257684787499560686 or"
" '0x3937af2eeeeeeee' for 2012-01-01 12:34:56 UTC"
)
return
'
\
n
'
.
join
(
output_list
)
return
'
\
n
'
.
join
(
output_list
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment