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
afd801c8
Commit
afd801c8
authored
Jan 17, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qa: fix random RuntimeError when starting cluster in testClusterStartup
parent
bdf6389d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
neo/master/handlers/administration.py
neo/master/handlers/administration.py
+3
-0
neo/tests/functional/__init__.py
neo/tests/functional/__init__.py
+12
-0
neo/tests/functional/testCluster.py
neo/tests/functional/testCluster.py
+2
-3
No files found.
neo/master/handlers/administration.py
View file @
afd801c8
...
...
@@ -64,6 +64,9 @@ class AdministrationHandler(MasterHandler):
for
node
in
storage_list
:
assert
node
.
isPending
(),
node
if
node
.
getConnection
().
isPending
():
# XXX: It's wrong to use ProtocolError here. We must reply
# less aggressively because the admin has no way to
# know that there's still pending activity.
raise
ProtocolError
(
'Cannot exit recovery now: node %r is '
'entering cluster'
%
(
node
,
))
app
.
_startup_allowed
=
True
...
...
neo/tests/functional/__init__.py
View file @
afd801c8
...
...
@@ -416,6 +416,18 @@ class NEOCluster(object):
if
not
pdb
.
wait
(
test
,
MAX_START_TIME
):
raise
AssertionError
(
'Timeout when starting cluster'
)
def
startCluster
(
self
):
# Even if the storage nodes are in the expected state, there may still
# be activity between them and the master, preventing the cluster to
# start.
def
start
(
last_try
):
try
:
self
.
neoctl
.
startCluster
()
except
(
NotReadyException
,
RuntimeError
):
return
False
,
e
return
True
,
None
self
.
expectCondition
(
start
)
def
stop
(
self
,
clients
=
True
):
# Suspend all processes to kill before actually killing them, so that
# nodes don't log errors because they get disconnected from other nodes:
...
...
neo/tests/functional/testCluster.py
View file @
afd801c8
...
...
@@ -31,7 +31,6 @@ class ClusterTests(NEOFunctionalTest):
def
testClusterStartup
(
self
):
neo
=
self
.
neo
=
NEOCluster
([
'test_neo1'
,
'test_neo2'
],
replicas
=
1
,
temp_dir
=
self
.
getTempDirectory
())
neoctl
=
neo
.
neoctl
neo
.
run
()
# Runing a new cluster doesn't exit Recovery state.
s1
,
s2
=
neo
.
getStorageProcessList
()
...
...
@@ -40,7 +39,7 @@ class ClusterTests(NEOFunctionalTest):
neo
.
expectClusterRecovering
()
# When allowing cluster to exit Recovery, it reaches Running state and
# all present storage nodes reach running state.
neo
ctl
.
startCluster
()
neo
.
startCluster
()
neo
.
expectRunning
(
s1
)
neo
.
expectRunning
(
s2
)
neo
.
expectClusterRunning
()
...
...
@@ -64,7 +63,7 @@ class ClusterTests(NEOFunctionalTest):
neo
.
expectPending
(
s1
)
neo
.
expectUnknown
(
s2
)
neo
.
expectClusterRecovering
()
neo
ctl
.
startCluster
()
neo
.
startCluster
()
neo
.
expectRunning
(
s1
)
neo
.
expectUnknown
(
s2
)
neo
.
expectClusterRunning
()
...
...
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