Merge pull request #273707 from illustris/cloud-init
cloud-init: 23.3.3 -> 23.4.1, fix race condition on AWS
This commit is contained in:
commit
f0dd758da7
@ -164,7 +164,10 @@ in
|
||||
systemd.services.cloud-init-local = {
|
||||
description = "Initial cloud-init job (pre-networking)";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
before = [ "systemd-networkd.service" ];
|
||||
# In certain environments (AWS for example), cloud-init-local will
|
||||
# first configure an IP through DHCP, and later delete it.
|
||||
# This can cause race conditions with anything else trying to set IP through DHCP.
|
||||
before = [ "systemd-networkd.service" "dhcpcd.service" ];
|
||||
path = path;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
|
@ -73,6 +73,7 @@ in makeTest {
|
||||
};
|
||||
testScript = ''
|
||||
# To wait until cloud-init terminates its run
|
||||
unnamed.wait_for_unit("cloud-init-local.service")
|
||||
unnamed.wait_for_unit("cloud-final.service")
|
||||
|
||||
unnamed.succeed("cat /tmp/cloudinit-write-file | grep -q 'cloudinit'")
|
||||
|
@ -1,8 +1,8 @@
|
||||
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
|
||||
index 7b83df8d..6d04de1a 100644
|
||||
index 79e26235..bdc32c52 100644
|
||||
--- a/cloudinit/distros/__init__.py
|
||||
+++ b/cloudinit/distros/__init__.py
|
||||
@@ -75,6 +75,7 @@ OSFAMILIES = {
|
||||
@@ -91,6 +91,7 @@ OSFAMILIES = {
|
||||
],
|
||||
"openeuler": ["openeuler"],
|
||||
"OpenCloudOS": ["OpenCloudOS", "TencentOS"],
|
||||
@ -12,7 +12,7 @@ index 7b83df8d..6d04de1a 100644
|
||||
LOG = logging.getLogger(__name__)
|
||||
diff --git a/cloudinit/distros/nixos.py b/cloudinit/distros/nixos.py
|
||||
new file mode 100644
|
||||
index 00000000..954e564b
|
||||
index 00000000..67c049b8
|
||||
--- /dev/null
|
||||
+++ b/cloudinit/distros/nixos.py
|
||||
@@ -0,0 +1,109 @@
|
||||
@ -38,11 +38,11 @@ index 00000000..954e564b
|
||||
+# You should have received a copy of the GNU General Public License
|
||||
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
+
|
||||
+import logging
|
||||
+import os
|
||||
+
|
||||
+from cloudinit import distros
|
||||
+from cloudinit import helpers
|
||||
+from cloudinit import log as logging
|
||||
+from cloudinit import util
|
||||
+from cloudinit import atomic_helper
|
||||
+
|
||||
|
@ -17,14 +17,14 @@
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "cloud-init";
|
||||
version = "23.3.3";
|
||||
version = "23.4.1";
|
||||
namePrefix = "";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "canonical";
|
||||
repo = "cloud-init";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-49UvGrv40hyR3A2BndlQKwQqCC1ZaLm97IUKNW12sJo=";
|
||||
hash = "sha256-jdL5xDQTmz1ppVr2+fX76tiscGazw5L7Q0/uQF6+ogM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
Loading…
Reference in New Issue
Block a user