cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #06756
[Merge] ~daniel-thewatkins/cloud-init/+git/cloud-init:net into cloud-init:master
Dan Watkins has proposed merging ~daniel-thewatkins/cloud-init/+git/cloud-init:net into cloud-init:master.
Commit message:
debian/ubuntu: add missing word to netplan/ENI header
Specifically, add in "reboot" to make it clear what people should expect
when modifying the file.
This also renames the variable to indicate it is used for netplan and
ENI, not just ENI.
LP: #1845669
Requested reviews:
cloud-init Commiters (cloud-init-dev)
Related bugs:
Bug #1845669 in cloud-init: "The meaning of "Changes to it will not persist across an instance." in 50-cloud-init.yaml is unclear"
https://bugs.launchpad.net/cloud-init/+bug/1845669
For more details, see:
https://code.launchpad.net/~daniel-thewatkins/cloud-init/+git/cloud-init/+merge/373329
--
Your team cloud-init Commiters is requested to review the proposed merge of ~daniel-thewatkins/cloud-init/+git/cloud-init:net into cloud-init:master.
diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py
index 0ad93ff..cf082c7 100644
--- a/cloudinit/distros/debian.py
+++ b/cloudinit/distros/debian.py
@@ -29,9 +29,10 @@ APT_GET_WRAPPER = {
'enabled': 'auto',
}
-ENI_HEADER = """# This file is generated from information provided by
-# the datasource. Changes to it will not persist across an instance.
-# To disable cloud-init's network configuration capabilities, write a file
+NETWORK_FILE_HEADER = """\
+# This file is generated from information provided by the datasource. Changes
+# to it will not persist across an instance reboot. To disable cloud-init's
+# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
"""
@@ -48,9 +49,9 @@ class Distro(distros.Distro):
}
renderer_configs = {
"eni": {"eni_path": network_conf_fn["eni"],
- "eni_header": ENI_HEADER},
+ "eni_header": NETWORK_FILE_HEADER},
"netplan": {"netplan_path": network_conf_fn["netplan"],
- "netplan_header": ENI_HEADER,
+ "netplan_header": NETWORK_FILE_HEADER,
"postcmds": True}
}
diff --git a/cloudinit/distros/ubuntu.py b/cloudinit/distros/ubuntu.py
index e5fcbc5..23be3bd 100644
--- a/cloudinit/distros/ubuntu.py
+++ b/cloudinit/distros/ubuntu.py
@@ -30,9 +30,9 @@ class Distro(debian.Distro):
}
self.renderer_configs = {
"eni": {"eni_path": self.network_conf_fn["eni"],
- "eni_header": debian.ENI_HEADER},
+ "eni_header": debian.NETWORK_FILE_HEADER},
"netplan": {"netplan_path": self.network_conf_fn["netplan"],
- "netplan_header": debian.ENI_HEADER,
+ "netplan_header": debian.NETWORK_FILE_HEADER,
"postcmds": True}
}
diff --git a/tests/unittests/test_distros/test_netconfig.py b/tests/unittests/test_distros/test_netconfig.py
index 07b5c0a..6720995 100644
--- a/tests/unittests/test_distros/test_netconfig.py
+++ b/tests/unittests/test_distros/test_netconfig.py
@@ -91,9 +91,9 @@ V1_NET_CFG = {'config': [{'name': 'eth0',
'version': 1}
V1_NET_CFG_OUTPUT = """\
-# This file is generated from information provided by
-# the datasource. Changes to it will not persist across an instance.
-# To disable cloud-init's network configuration capabilities, write a file
+# This file is generated from information provided by the datasource. Changes
+# to it will not persist across an instance reboot. To disable cloud-init's
+# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
@@ -125,9 +125,9 @@ V1_NET_CFG_IPV6 = {'config': [{'name': 'eth0',
V1_TO_V2_NET_CFG_OUTPUT = """\
-# This file is generated from information provided by
-# the datasource. Changes to it will not persist across an instance.
-# To disable cloud-init's network configuration capabilities, write a file
+# This file is generated from information provided by the datasource. Changes
+# to it will not persist across an instance reboot. To disable cloud-init's
+# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
@@ -154,9 +154,9 @@ V2_NET_CFG = {
V2_TO_V2_NET_CFG_OUTPUT = """\
-# This file is generated from information provided by
-# the datasource. Changes to it will not persist across an instance.
-# To disable cloud-init's network configuration capabilities, write a file
+# This file is generated from information provided by the datasource. Changes
+# to it will not persist across an instance reboot. To disable cloud-init's
+# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
Follow ups