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
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
neoppod
Commits
fee708c3
Commit
fee708c3
authored
Mar 21, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify identifyStorageNode parameters.
parent
b041a797
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
neo/master/app.py
neo/master/app.py
+4
-3
neo/master/handlers/identification.py
neo/master/handlers/identification.py
+2
-1
neo/master/recovery.py
neo/master/recovery.py
+1
-1
neo/master/verification.py
neo/master/verification.py
+4
-3
No files found.
neo/master/app.py
View file @
fee708c3
...
...
@@ -467,11 +467,12 @@ class Application(object):
# then shutdown
sys
.
exit
()
def
identifyStorageNode
(
self
,
uuid
,
node
):
def
identifyStorageNode
(
self
,
known
):
if
self
.
cluster_state
==
ClusterStates
.
STOPPING
:
raise
NotReadyError
state
=
NodeStates
.
RUNNING
if
uuid
is
None
or
node
is
None
:
if
known
:
state
=
NodeStates
.
RUNNING
else
:
# same as for verification
state
=
NodeStates
.
PENDING
return
state
,
self
.
storage_service_handler
...
...
neo/master/handlers/identification.py
View file @
fee708c3
...
...
@@ -53,7 +53,8 @@ class IdentificationHandler(MasterHandler):
manager
=
app
.
_current_manager
if
manager
is
None
:
manager
=
app
state
,
handler
=
manager
.
identifyStorageNode
(
uuid
,
node
)
state
,
handler
=
manager
.
identifyStorageNode
(
uuid
is
not
None
and
node
is
not
None
)
human_readable_node_type
=
' storage (%s) '
%
(
state
,
)
elif
node_type
==
NodeTypes
.
MASTER
:
node_ctor
=
app
.
nm
.
createMaster
...
...
neo/master/recovery.py
View file @
fee708c3
...
...
@@ -37,7 +37,7 @@ class RecoveryManager(MasterHandler):
def
getHandler
(
self
):
return
self
def
identifyStorageNode
(
self
,
uuid
,
node
):
def
identifyStorageNode
(
self
,
_
):
"""
Returns the handler for storage nodes
"""
...
...
neo/master/verification.py
View file @
fee708c3
...
...
@@ -77,12 +77,13 @@ class VerificationManager(BaseServiceHandler):
def
getHandler
(
self
):
return
self
def
identifyStorageNode
(
self
,
uuid
,
node
):
def
identifyStorageNode
(
self
,
known
):
"""
Returns the handler to manager the given node
"""
state
=
NodeStates
.
RUNNING
if
uuid
is
None
or
node
is
None
:
if
known
:
state
=
NodeStates
.
RUNNING
else
:
# if node is unknown, it has been forget when the current
# partition was validated by the admin
# Here the uuid is not cleared to allow lookup pending nodes by
...
...
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