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
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.toolbox
Commits
b17843bc
Commit
b17843bc
authored
Aug 25, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resiliencytestsuite,kvm: more python3 fixes
parent
ec47c8e3
Pipeline
#23107
passed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
slapos/resiliencytest/suites/kvm.py
slapos/resiliencytest/suites/kvm.py
+3
-3
slapos/resiliencytest/suites/resiliencytestsuite.py
slapos/resiliencytest/suites/resiliencytestsuite.py
+1
-1
No files found.
slapos/resiliencytest/suites/kvm.py
View file @
b17843bc
...
...
@@ -45,7 +45,7 @@ def fetchKey(ip):
new_key
=
None
for
i
in
range
(
0
,
10
):
try
:
new_key
=
urlopen
(
'http://%s:10080/get'
%
ip
).
read
().
strip
()
new_key
=
urlopen
(
'http://%s:10080/get'
%
ip
).
read
().
strip
()
.
decode
()
break
except
IOError
:
logger
.
error
(
'Server in new KVM does not answer.'
)
...
...
@@ -138,7 +138,7 @@ class KVMTestSuite(ResiliencyTestSuite):
Set a random key that will be stored inside of the virtual hard drive.
"""
self
.
key
=
''
.
join
(
random
.
SystemRandom
().
sample
(
string
.
ascii_lowercase
,
20
))
self
.
logger
.
info
(
'Generated key is: %s'
%
self
.
key
)
self
.
logger
.
info
(
'Generated key is: %s'
,
self
.
key
)
def
pushDataOnMainInstance
(
self
):
self
.
logger
.
info
(
'Getting the KVM IP...'
)
...
...
@@ -171,7 +171,7 @@ class KVMTestSuite(ResiliencyTestSuite):
)
new_key
=
fetchKey
(
self
.
ip
)
logger
.
info
(
'Key on this new instance is %s'
%
new_key
)
logger
.
info
(
'Key on this new instance is %s'
,
new_key
)
# Compare with original key. If same: success.
if
new_key
==
self
.
key
:
...
...
slapos/resiliencytest/suites/resiliencytestsuite.py
View file @
b17843bc
...
...
@@ -86,7 +86,7 @@ class ResiliencyTestSuite(object):
# Do takeover
takeover_result
=
urlopen
(
'%s?password=%s'
%
(
takeover_url
,
takeover_password
)).
read
()
if
'Error'
in
takeover_result
:
if
b
'Error'
in
takeover_result
:
raise
Exception
(
'Error while doing takeover: %s'
%
takeover_result
)
self
.
logger
.
info
(
'Done.'
)
...
...
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