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
2062794f
Commit
2062794f
authored
Nov 24, 2017
by
Daniele Venzano
🏇
Browse files
Merge branch 'devel/platform_status' into 'master'
Small bug fixes See merge request !52
parents
63331fac
a94516a9
Changes
3
Show whitespace changes
Inline
Side-by-side
zoe_api/web/templates/status.html
View file @
2062794f
...
...
@@ -176,7 +176,7 @@
data
=
{
datasets
:
[{
label
:
'
Cores
'
,
data
:
[{{
node
[
'
cores_reserved
'
]
}},
{{
node
[
'
cores_allocated
'
]
}},
{{
node
[
'
cores_in_use
'
]
}}],
data
:
[{{
'
%0.2f
'
|
format
(
node
[
'
cores_reserved
'
]
|
float
)
}},
{{
'
%0.2f
'
|
format
(
node
[
'
cores_allocated
'
]
|
float
)
}},
{{
'
%0.2f
'
|
format
(
node
[
'
cores_in_use
'
]
|
float
)
}}],
backgroundColor
:
[
'
rgba(0, 169, 225, 1.0)
'
,
'
rgba(53, 51, 144, 1.0)
'
,
'
rgba(145, 192, 46, 1.0)
'
]
}],
'
labels
'
:
[
'
Reserved
'
,
'
Allocated
'
,
'
In use
'
]
...
...
@@ -221,7 +221,9 @@
<tr>
<td
class=
"cell-host"
>
{{ node.name }}
</td>
{% for service in services_per_node[node.name] %}
<td><a
href=
"{{ reverse_url('execution_inspect', service['execution_id']) }}"
>
{{ service['name'] }}
</a>
(M:
<script>
format_bytes
({{
node
.
service_stats
[
service
[
'
id
'
]
|
string
][
'
mem_limit
'
]
}});
</script>
C: {{ node.service_stats[service['id']|string]['core_limit'] }})
</td>
{% if service.backend_status == "started" %}
<td><a
href=
"{{ reverse_url('execution_inspect', service['execution_id']) }}"
>
{{ service['name'] }}
</a>
(M:
<script>
format_bytes
({{
node
.
service_stats
[
service
[
'
id
'
]
|
string
][
'
mem_limit
'
]
}});
</script>
C: {{ '%0.2f'|format(node.service_stats[service['id']|string]['core_limit']|float) }})
</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
...
...
zoe_master/backends/docker/threads.py
View file @
2062794f
...
...
@@ -86,6 +86,9 @@ class DockerStateSynchronizer(threading.Thread):
service
=
self
.
state
.
services
.
select
(
only_one
=
True
,
backend_host
=
host_config
.
name
,
backend_id
=
cont
[
'id'
])
if
service
is
None
:
log
.
warning
(
'Container {} on host {} has no corresponding service'
.
format
(
cont
[
'name'
],
host_config
.
name
))
if
cont
[
'state'
]
==
Service
.
BACKEND_DIE_STATUS
:
log
.
warning
(
'Terminating dead and orphan container {}'
.
format
(
cont
[
'name'
]))
my_engine
.
terminate_container
(
cont
[
'id'
],
delete
=
True
)
continue
self
.
_update_service_status
(
service
,
cont
)
self
.
host_stats
[
host_config
.
name
].
memory_reserved
+=
service
.
resource_reservation
.
memory
.
min
...
...
zoe_master/scheduler/simulated_platform.py
View file @
2062794f
...
...
@@ -135,7 +135,7 @@ class SimulatedPlatform:
"""Try to find an allocation for elastic services"""
at_least_one_allocated
=
False
for
service
in
execution
.
elastic_services
:
if
service
.
status
==
service
.
ACTIVE_STATUS
:
if
service
.
status
==
service
.
ACTIVE_STATUS
and
service
.
backend_status
!=
service
.
BACKEND_DIE_STATUS
:
continue
candidate_nodes
=
[]
for
node_id_
,
node
in
self
.
nodes
.
items
():
...
...
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