Commit a1e5d776 authored by Daniele Venzano's avatar Daniele Venzano

Fix memory limit unit conversion

parent f82a46e2
...@@ -35,8 +35,8 @@ class ServiceInstance: ...@@ -35,8 +35,8 @@ class ServiceInstance:
self.memory_limit = None self.memory_limit = None
else: else:
self.memory_limit = service.resource_reservation.memory self.memory_limit = service.resource_reservation.memory
if self.memory_limit.max > get_conf().max_memory_limit: if self.memory_limit.max > get_conf().max_memory_limit * (1024 ** 3):
self.memory_limit.max = get_conf().max_memory_limit self.memory_limit.max = get_conf().max_memory_limit * (1024 ** 3)
if service.resource_reservation.cores.min is None: if service.resource_reservation.cores.min is None:
self.core_limit = None self.core_limit = None
......
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