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
Lu Xu
slapos.toolbox
Commits
515140ed
Commit
515140ed
authored
May 17, 2017
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resiliencytest: Remove duplicated code.
parent
e5f9b92f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
30 deletions
+0
-30
slapos/resiliencytest/suites/erp5.py
slapos/resiliencytest/suites/erp5.py
+0
-30
No files found.
slapos/resiliencytest/suites/erp5.py
View file @
515140ed
...
...
@@ -143,36 +143,6 @@ class ERP5TestSuite(SlaprunnerTestSuite):
self
.
_connectToERP5
(
url
,
form
)
return
erp5_site_title
def
_editHAProxyconfiguration
(
self
):
"""
XXX pure hack.
haproxy processes don't support long path for sockets.
Edit haproxy configuration file of erp5 to make it compatible with long paths
Then restart haproxy.
"""
self
.
logger
.
info
(
'Editing HAProxy configuration...'
)
result
=
self
.
_connectToSlaprunner
(
resource
=
'/getFileContent'
,
data
=
'file=runner_workdir%2Finstance%2Fslappart7%2Fetc%2Fhaproxy.cfg'
)
file_content
=
json
.
loads
(
result
)[
'result'
]
file_content
=
file_content
.
replace
(
'var/run/haproxy.sock'
,
'ha.sock'
)
self
.
_connectToSlaprunner
(
resource
=
'/saveFileContent'
,
data
=
'file=runner_workdir%%2Finstance%%2Fslappart7%%2Fetc%%2Fhaproxy.cfg&content=%s'
%
urllib
.
quote
(
file_content
)
)
# Restart HAProxy
self
.
_connectToSlaprunner
(
resource
=
'/startStopProccess/name/slappart7:haproxy/cmd/STOPPED'
)
time
.
sleep
(
15
)
# In case erp5 bootstrap (in erp5-cluster) couldn't connect to zope through HAProxy
self
.
_connectToSlaprunner
(
'/startAllPartition'
)
def
generateData
(
self
):
self
.
slaprunner_password
=
''
.
join
(
random
.
SystemRandom
().
sample
(
string
.
ascii_lowercase
,
8
)
...
...
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