Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
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):
def
asClusterState
(
self
,
value
):
return
getattr
(
ClusterStates
,
value
.
upper
())
def
asTID
(
self
,
value
):
return
p64
(
int
(
value
,
0
))
asNode
=
staticmethod
(
uuid_int
)
def
formatRowList
(
self
,
row_list
):
...
...
@@ -197,7 +200,15 @@ class TerminalNeoCTL(object):
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]]
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
=
{}
params
=
iter
(
params
)
...
...
@@ -207,9 +218,9 @@ class TerminalNeoCTL(object):
try
:
partition
,
source
=
p
.
split
(
':'
)
except
ValueError
:
min_tid
=
p64
(
p
)
min_tid
=
self
.
asTID
(
p
)
try
:
max_tid
=
p64
(
params
.
next
())
max_tid
=
self
.
asTID
(
params
.
next
())
except
StopIteration
:
pass
break
...
...
@@ -283,6 +294,8 @@ class Application(object):
return
'
\
n
'
.
join
(
result
)
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
)
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