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
57eeed65
"driver/conv_driver.cpp" did not exist on "6a45afba95fdfdab6302c8d47d96b4232bc53469"
Commit
57eeed65
authored
Sep 04, 2024
by
Jakob Görgen
Committed by
Jakob Görgen
Sep 04, 2024
Browse files
experiments/simbricks/orchestration/nodeconfig: allow LinuxNode config to set hostname
parent
97c2577d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
experiments/simbricks/orchestration/nodeconfig.py
experiments/simbricks/orchestration/nodeconfig.py
+13
-0
No files found.
experiments/simbricks/orchestration/nodeconfig.py
View file @
57eeed65
...
...
@@ -196,6 +196,19 @@ class LinuxNode(NodeConfig):
self
.
ifname
=
'eth0'
self
.
drivers
:
tp
.
List
[
str
]
=
[]
self
.
force_mac_addr
:
tp
.
Optional
[
str
]
=
None
self
.
hostname
:
str
|
None
=
'ubuntu'
def
prepare_pre_cp
(
self
)
->
tp
.
List
[
str
]:
"""Commands to run to prepare node before checkpointing."""
to_prepare
=
super
().
prepare_pre_cp
()
set_hostname
=
[]
if
self
.
hostname
is
not
None
:
set_hostname
=
[
f
'hostname -b
{
self
.
hostname
}
'
,
f
'echo "127.0.1.1
{
self
.
hostname
}
\n
" >> /etc/hosts'
]
to_prepare
.
extend
(
set_hostname
)
return
to_prepare
def
prepare_post_cp
(
self
)
->
tp
.
List
[
str
]:
l
=
[]
...
...
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