Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
d6aa2cd2
Commit
d6aa2cd2
authored
Jan 14, 2024
by
Antoine Kaufmann
Committed by
Hejing Li
Feb 01, 2024
Browse files
orchestration/nodeconfig.py: pass node cfg to app cfg prepare cmds
parent
f2ed27e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
experiments/simbricks/orchestration/nodeconfig.py
experiments/simbricks/orchestration/nodeconfig.py
+4
-4
No files found.
experiments/simbricks/orchestration/nodeconfig.py
View file @
d6aa2cd2
...
@@ -35,11 +35,11 @@ class AppConfig():
...
@@ -35,11 +35,11 @@ class AppConfig():
"""Commands to run for this application."""
"""Commands to run for this application."""
return
[]
return
[]
def
prepare_pre_cp
(
self
)
->
tp
.
List
[
str
]:
def
prepare_pre_cp
(
self
,
node
:
NodeConfig
)
->
tp
.
List
[
str
]:
"""Commands to run to prepare this application before checkpointing."""
"""Commands to run to prepare this application before checkpointing."""
return
[]
return
[]
def
prepare_post_cp
(
self
)
->
tp
.
List
[
str
]:
def
prepare_post_cp
(
self
,
node
:
NodeConfig
)
->
tp
.
List
[
str
]:
"""Commands to run to prepare this application after the checkpoint is
"""Commands to run to prepare this application after the checkpoint is
restored."""
restored."""
return
[]
return
[]
...
@@ -110,8 +110,8 @@ class NodeConfig():
...
@@ -110,8 +110,8 @@ class NodeConfig():
cp_es
=
[
'echo ready to checkpoint'
]
cp_es
=
[
'echo ready to checkpoint'
]
exit_es
=
[
'poweroff -f'
]
exit_es
=
[
'poweroff -f'
]
es
=
self
.
prepare_pre_cp
()
+
self
.
app
.
prepare_pre_cp
()
+
cp_es
+
\
es
=
self
.
prepare_pre_cp
()
+
self
.
app
.
prepare_pre_cp
(
self
)
+
cp_es
+
\
self
.
prepare_post_cp
()
+
self
.
app
.
prepare_post_cp
()
+
\
self
.
prepare_post_cp
()
+
self
.
app
.
prepare_post_cp
(
self
)
+
\
self
.
run_cmds
()
+
self
.
cleanup_cmds
()
+
exit_es
self
.
run_cmds
()
+
self
.
cleanup_cmds
()
+
exit_es
return
'
\n
'
.
join
(
es
)
return
'
\n
'
.
join
(
es
)
...
...
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