"driver/conv_driver.cpp" did not exist on "6a45afba95fdfdab6302c8d47d96b4232bc53469"
Commit 57eeed65 authored by Jakob Görgen's avatar Jakob Görgen Committed by Jakob Görgen
Browse files

experiments/simbricks/orchestration/nodeconfig: allow LinuxNode config to set hostname

parent 97c2577d
......@@ -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 = []
......
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