Commit 2c849b65 authored by Daniele Venzano's avatar Daniele Venzano

Color the border of essential services in the status page bottom section

parent ef2a2b73
......@@ -243,6 +243,10 @@ div.running {
border-color: green;
}
td.running {
border: 1px solid green;
}
div.node_detail {
width: 48%;
float: left;
......
......@@ -209,6 +209,7 @@
</div>
<h3 class="section"><a name="service-distrib">Service distribution</a></h3>
<p>Services marked with a green border are essential, elastic ones have no border.</p>
<table class="service-distrib">
<thead>
<tr>
......@@ -222,7 +223,7 @@
<td class="cell-host">{{ node.name }}</td>
{% for service in services_per_node[node.name] %}
{% 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']]['mem_limit'] }});</script> C: {{ '%0.2f'|format(node.service_stats[service['id']]['core_limit']|float) }})</td>
<td class="{{ 'running' if service.essential }}"><a href="{{ reverse_url('execution_inspect', service['execution_id']) }}">{{ service['name'] }}</a> (M: <script>format_bytes({{ node.service_stats[service['id']]['mem_limit'] }});</script> C: {{ '%0.2f'|format(node.service_stats[service['id']]['core_limit']|float) }})</td>
{% endif %}
{% endfor %}
</tr>
......
......@@ -25,6 +25,7 @@
{% endif %}</li>
<li>Suggested CPU core allocation limit: {{ service["resources"]["cores"]["min"] if service["resources"]["cores"]["min"] != None else "No limit" }}</li>
</ul></li>
<li>Image: <code>{{ service["image"] }}</code></li>
{% endfor %}
</ul>
......
......@@ -213,7 +213,7 @@ class DockerEngineBackend(zoe_master.backends.base.BaseBackend):
image = {
'id': dk_image.attrs['Id'],
'size': dk_image.attrs['Size'],
'names': dk_image.tags
'names': dk_image.tags # type: list
}
for name in image['names']:
if name[-7:] == ':latest': # add an image with the name without 'latest' to fake Docker image lookup algorithm
......@@ -225,7 +225,11 @@ class DockerEngineBackend(zoe_master.backends.base.BaseBackend):
def update_service(self, service, cores=None, memory=None):
"""Update a service reservation."""
conf = self._get_config(service.backend_host)
engine = DockerClient(conf)
try:
engine = DockerClient(conf)
except ZoeException as e:
log.error(str(e))
return
if service.backend_id is not None:
info = engine.info()
if cores is not None and cores > info['NCPU']:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment