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
bc1d66b9
Commit
bc1d66b9
authored
Jul 11, 2018
by
Daniele Venzano
Browse files
Commit small left-overs from the change to hard limits for memory
parent
2540c000
Changes
3
Hide whitespace changes
Inline
Side-by-side
zoe_api/web/executions.py
View file @
bc1d66b9
...
...
@@ -157,7 +157,7 @@ class ExecutionInspectWeb(ZoeRequestHandler):
}
if
get_conf
().
enable_plots
and
e
.
time_start
is
not
None
:
grafana_url_template
=
'http://
bigfoot-m2
.eurecom.fr/grafana/dashboard/db/zoe-executions?orgId=1&from={}&to={}&var-execution_id={}&refresh=1y'
grafana_url_template
=
'http://
cloud-platform
.eurecom.fr/grafana/dashboard/db/zoe-executions?orgId=1&from={}&to={}&var-execution_id={}&refresh=1y'
if
e
.
time_end
is
None
:
e_time_end
=
int
(
time
.
time
()
*
1000
)
else
:
...
...
zoe_api/web/start.py
View file @
bc1d66b9
...
...
@@ -118,8 +118,8 @@ class HomeWeb(ZoeRequestHandler):
last_running_executions
+=
self
.
api_endpoint
.
execution_list
(
uid
,
role
,
**
filters
)
running_reservations
=
[
e
.
total_reservations
for
e
in
last_running_executions
]
total_memory
=
sum
([
r
.
memory
.
m
ax
for
r
in
running_reservations
])
total_cores
=
sum
([
r
.
cores
.
m
ax
for
r
in
running_reservations
])
total_memory
=
sum
([
r
.
memory
.
m
in
for
r
in
running_reservations
])
total_cores
=
sum
([
r
.
cores
.
m
in
for
r
in
running_reservations
])
template_vars
=
{
"uid"
:
uid
,
...
...
zoe_master/scheduler/simulated_platform.py
View file @
bc1d66b9
...
...
@@ -48,7 +48,7 @@ class SimulatedNode:
elif
not
set
(
service
.
labels
).
issubset
(
self
.
labels
):
return
'service required labels {} to be defined on the node'
.
format
(
service
.
labels
)
elif
not
self
.
_image_is_available
(
service
.
image_name
):
return
'image {} is not available on
this
node'
.
format
(
service
.
image_name
)
return
'image {} is not available on node
{}
'
.
format
(
service
.
image_name
,
self
.
name
)
else
:
return
'unknown reason'
...
...
@@ -140,6 +140,7 @@ class SimulatedPlatform:
candidate_nodes
.
append
(
node
)
else
:
reasons
+=
'node {}: {} ## '
.
format
(
node
.
name
,
node
.
service_why_unfit
(
service
))
log
.
debug
(
'node rejected: {}'
.
format
(
node
.
service_why_unfit
(
service
)))
if
len
(
candidate_nodes
)
==
0
:
# this service does not fit anywhere
self
.
deallocate_essential
(
execution
)
log
.
info
(
'Cannot fit essential service {} anywhere, reasons: {}'
.
format
(
service
.
id
,
reasons
))
...
...
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