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
Gabriel Monnerat
slapos.toolbox
Commits
62d518d8
Commit
62d518d8
authored
Sep 30, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resiliency suite: slaprunner: wait for software release to be built.
parent
4a8e10bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
slapos/resiliencytest/suites/slaprunner.py
slapos/resiliencytest/suites/slaprunner.py
+8
-4
No files found.
slapos/resiliencytest/suites/slaprunner.py
View file @
62d518d8
...
@@ -111,6 +111,12 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
...
@@ -111,6 +111,12 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
)
)
return
data
return
data
def
_waitForSoftwareBuild
(
self
):
while
self
.
_connectToSlaprunner
(
resource
=
'slapgridResult'
,
data
=
'position=0&log='
).
find
(
'"software": true'
)
is
not
-
1
:
self
.
logger
.
info
(
'Software release is still building. Sleeping...'
)
time
.
sleep
(
15
)
self
.
logger
.
info
(
'Software Release has been built / is no longer building.'
)
def
_buildSoftwareRelease
(
self
):
def
_buildSoftwareRelease
(
self
):
self
.
logger
.
info
(
'Building the Software Release...'
)
self
.
logger
.
info
(
'Building the Software Release...'
)
try
:
try
:
...
@@ -118,10 +124,7 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
...
@@ -118,10 +124,7 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
except
(
NotHttpOkException
,
urllib2
.
HTTPError
):
except
(
NotHttpOkException
,
urllib2
.
HTTPError
):
# The nginx frontend might timeout before software release is finished.
# The nginx frontend might timeout before software release is finished.
pass
pass
while
self
.
_connectToSlaprunner
(
resource
=
'slapgridResult'
,
data
=
'position=0&log='
).
find
(
'"software": true'
)
is
not
-
1
:
self
.
_waitForSoftwareBuild
()
self
.
logger
.
info
(
'Buildout is still running. Sleeping...'
)
time
.
sleep
(
15
)
self
.
logger
.
info
(
'Software Release has been built.'
)
def
_deployInstance
(
self
):
def
_deployInstance
(
self
):
self
.
logger
.
info
(
'Deploying instance...'
)
self
.
logger
.
info
(
'Deploying instance...'
)
...
@@ -215,6 +218,7 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
...
@@ -215,6 +218,7 @@ class SlaprunnerTestSuite(ResiliencyTestSuite):
old_parameter_value
=
old_slaprunner_backend_url
old_parameter_value
=
old_slaprunner_backend_url
)
)
self
.
_login
()
self
.
_login
()
self
.
_waitForSoftwareBuild
()
# XXX: in theory, it should be done automatically by slaprunner.
# XXX: in theory, it should be done automatically by slaprunner.
# In practice, it is still too dangerous for ERP5 instances.
# In practice, it is still too dangerous for ERP5 instances.
self
.
_deployInstance
()
self
.
_deployInstance
()
...
...
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