Commit 720bd8a7 authored by Valentin Reis's avatar Valentin Reis

[fix] Fixes dead manifest field access.

parent 6731ca05
Pipeline #8600 failed with stages
in 1 minute and 46 seconds
......@@ -77,7 +77,7 @@ class ContainerManager(object):
container_power['profile']['end'] = dict()
if pp['policy'] != "NONE":
container_power['policy'] = pp['policy']
container_power['damper'] = manifest.ratelimit
container_power['damper'] = str(manifest.app['monitoring']['ratelimit'])
container_power['slowdown'] = pp['slowdown']
# Compute hardware bindings
......@@ -136,7 +136,7 @@ class ContainerManager(object):
# monitoring section involves libnrm
if manifest.is_feature_enabled('monitoring'):
environ['ARGO_NRM_RATELIMIT'] = \
manifest.app['monitoring']['ratelimit']
str(manifest.app['monitoring']['ratelimit'])
if container.power.get('policy') or \
manifest.is_feature_enabled('monitoring'):
......
......@@ -13,7 +13,7 @@ from __future__ import print_function
from applications import ApplicationManager
from containers import ContainerManager, NodeOSRuntime, SingularityUserRuntime
from controller import Controller, PowerActuator
from powerpolicy import PowerPolicyManager
# from powerpolicy import PowerPolicyManager
from functools import partial
import logging
import os
......@@ -68,7 +68,7 @@ class Daemon(object):
if c.power['policy']:
app.update_phase_context(event)
# Run container policy
self.controller.run_policy_container(c, app)
# self.controller.run_policy_container(c, app)
elif event.tag == 'exit':
uuid = event.application_uuid
if uuid in self.application_manager.applications:
......@@ -98,12 +98,12 @@ class Daemon(object):
pid, container = self.container_manager.create(params)
container_uuid = container.uuid
if len(container.processes) == 1:
if container.power['policy']:
container.power['manager'] = PowerPolicyManager(
container.resources.cpus,
container.power['policy'],
float(container.power['damper']),
float(container.power['slowdown']))
# if container.power['policy']:
# container.power['manager'] = PowerPolicyManager(
# container.resources.cpus,
# container.power['policy'],
# float(container.power['damper']),
# float(container.power['slowdown']))
if container.power['profile']:
p = container.power['profile']
p['start'] = self.machine_info['energy']['energy']
......@@ -166,11 +166,12 @@ class Daemon(object):
limit=self.target)
def do_control(self):
plan = self.controller.planify(self.target, self.machine_info)
action, actuator = plan
if action:
self.controller.execute(action, actuator)
self.controller.update(action, actuator)
pass
# plan = self.controller.planify(self.target, self.machine_info)
# action, actuator = plan
# if action:
# self.controller.execute(action, actuator)
# self.controller.update(action, actuator)
# Call policy only if there are containers
# if self.container_manager.containers:
# self.controller.run_policy(self.container_manager.containers)
......@@ -219,8 +220,8 @@ class Daemon(object):
# deal with container exit
diff = {}
p = container.power
if p['policy']:
p['manager'].reset_all()
# if p['policy']:
# p['manager'].reset_all()
if p['profile']:
e = p['profile']['end']
self.machine_info = self.sensor_manager.do_update()
......
......@@ -35,7 +35,7 @@ class SensorManager:
self.cputopology = coolr.clr_nodeinfo.cputopology()
self.coretemp = coolr.clr_hwmon.coretemp_reader()
self.rapl = coolr.clr_rapl.rapl_reader()
self.msr = coolr.msr.Msr()
# self.msr = coolr.msr.Msr()
def start(self):
self.rapl.start_energy_counter()
......
......@@ -130,6 +130,7 @@ class NodeOSClient(object):
# to escape spaces from arguments before.
argv = [s.replace(' ', r'\ ') for s in argv]
cmd += " argv:'"+" ".join(argv)+"'"
logger.error(environ)
env = ['{0}={1}'.format(envname, envval.replace(' ', r'\ '))
for envname, envval in environ.items()]
cmd += " env:'"+" ".join(env)+"'"
......
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