Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nrm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
argo
nrm
Commits
720bd8a7
Commit
720bd8a7
authored
Oct 02, 2019
by
Valentin Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] Fixes dead manifest field access.
parent
6731ca05
Pipeline
#8600
failed with stages
in 1 minute and 46 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
18 deletions
+20
-18
nrm/containers.py
nrm/containers.py
+2
-2
nrm/daemon.py
nrm/daemon.py
+16
-15
nrm/sensor.py
nrm/sensor.py
+1
-1
nrm/subprograms.py
nrm/subprograms.py
+1
-0
No files found.
nrm/containers.py
View file @
720bd8a7
...
...
@@ -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'
):
...
...
nrm/daemon.py
View file @
720bd8a7
...
...
@@ -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
()
...
...
nrm/sensor.py
View file @
720bd8a7
...
...
@@ -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
()
...
...
nrm/subprograms.py
View file @
720bd8a7
...
...
@@ -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)+"'"
...
...
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