Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Simone Rossi
main
Commits
80020a4f
Commit
80020a4f
authored
May 09, 2018
by
Daniele Venzano
Browse files
Delay startup of tests
parent
1fd44bc5
Changes
5
Hide whitespace changes
Inline
Side-by-side
integration_tests/basic_auth_success_test.py
View file @
80020a4f
...
...
@@ -48,6 +48,7 @@ class TestZoeRest:
with
open
(
'integration_tests/zapp.json'
,
encoding
=
'utf-8'
)
as
data_file
:
data
=
json
.
loads
(
data_file
.
read
())
time
.
sleep
(
10
)
# wait for test Zoe to start and load the docker status
req
=
requests
.
post
(
ZOE_API_URI
+
'execution'
,
auth
=
ZOE_AUTH
,
json
=
{
"application"
:
data
,
"name"
:
"requests"
},
timeout
=
TIMEOUT
)
assert
req
.
status_code
==
201
exec_id
=
str
(
req
.
json
()[
'execution_id'
])
...
...
zoe_master/backends/docker/backend.py
View file @
80020a4f
...
...
@@ -200,6 +200,9 @@ class DockerEngineBackend(zoe_master.backends.base.BaseBackend):
def
list_available_images
(
self
,
node_name
):
"""List the images available on the specified node."""
node_stats
=
_checker
.
host_stats
[
node_name
]
if
node_stats
.
status
==
'offline'
:
return
[]
return
node_stats
.
images
def
update_service
(
self
,
service
,
cores
=
None
,
memory
=
None
):
...
...
zoe_master/backends/docker/threads.py
View file @
80020a4f
...
...
@@ -119,6 +119,8 @@ class DockerStateSynchronizer(threading.Thread):
break
tmp_images
.
append
(
image
)
self
.
host_stats
[
host_config
.
name
].
images
=
tmp_images
self
.
host_stats
[
host_config
.
name
].
timestamp
=
time_start
self
.
host_stats
[
host_config
.
name
].
valid
=
True
sleep_time
=
CHECK_INTERVAL
-
(
time
.
time
()
-
time_start
)
if
sleep_time
<=
0
:
...
...
zoe_master/preprocessing.py
View file @
80020a4f
...
...
@@ -35,6 +35,8 @@ def _digest_application_description(state: SQLManager, execution: Execution):
images
+=
list_available_images
(
node
)
images
=
[
name
for
image
in
images
for
name
in
image
[
'names'
]]
if
len
(
images
)
==
0
:
log
.
warning
(
'The image list reported by the back-end is empty'
)
for
service_descr
in
execution
.
description
[
'services'
]:
if
service_descr
[
'image'
]
not
in
images
:
execution
.
set_error
()
...
...
zoe_master/stats.py
View file @
80020a4f
...
...
@@ -45,6 +45,7 @@ class NodeStats(Stats):
self
.
status
=
'offline'
self
.
service_stats
=
{}
self
.
images
=
[]
self
.
valid
=
False
def
serialize
(
self
):
"""Convert the object into a dict."""
...
...
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