Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Kirill Smelkov
slapos.toolbox
Commits
8f02d2dd
Commit
8f02d2dd
authored
Sep 24, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kvm resiliency test: better handling when takeover fails.
parent
fecbf6f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
slapos/resiliencytest/suites/kvm.py
slapos/resiliencytest/suites/kvm.py
+19
-10
No files found.
slapos/resiliencytest/suites/kvm.py
View file @
8f02d2dd
...
...
@@ -163,16 +163,25 @@ def runTestSuite(server_url, key_file, cert_file,
# Make the clone instance takeover the main instance
logger
.
info
(
'Replacing main instance by clone instance...'
)
takeover
(
server_url
=
server_url
,
key_file
=
key_file
,
cert_file
=
cert_file
,
computer_guid
=
computer_id
,
partition_id
=
partition_id
,
software_release
=
software
,
namebase
=
namebase
,
winner_instance_suffix
=
str
(
current_clone
),
)
for
i
in
range
(
0
,
10
):
try
:
takeover
(
server_url
=
server_url
,
key_file
=
key_file
,
cert_file
=
cert_file
,
computer_guid
=
computer_id
,
partition_id
=
partition_id
,
software_release
=
software
,
namebase
=
namebase
,
winner_instance_suffix
=
str
(
current_clone
),
)
break
except
:
# SSLError
traceback
.
print_exc
()
if
i
is
9
:
raise
logger
.
warning
(
'takeover failed. Retrying...'
)
time
.
sleep
(
10
)
logger
.
info
(
'Done.'
)
# Wait for the new IP (of old-clone new-main instance) to appear.
...
...
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