Skip to content

Commit

Permalink
fix(no-single-process.patch): revert references to cloud-init-network
Browse files Browse the repository at this point in the history
Revert remaning functional references to cloud-init-network service
which will not exist on stable releases.
  • Loading branch information
blackboxsw committed Sep 6, 2024
1 parent 8f71cd8 commit e7852ff
Showing 1 changed file with 69 additions and 4 deletions.
73 changes: 69 additions & 4 deletions debian/patches/no-single-process.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Last-Update: 2024-08-02

--- a/systemd/cloud-config.service.tmpl
+++ b/systemd/cloud-config.service.tmpl
@@ -10,14 +10,7 @@ ConditionEnvironment=!KERNEL_CMDLINE=clo
@@ -10,14 +10,7 @@

[Service]
Type=oneshot
Expand All @@ -24,7 +24,7 @@ Last-Update: 2024-08-02

--- a/systemd/cloud-final.service.tmpl
+++ b/systemd/cloud-final.service.tmpl
@@ -15,16 +15,10 @@ ConditionEnvironment=!KERNEL_CMDLINE=clo
@@ -15,16 +15,10 @@

[Service]
Type=oneshot
Expand All @@ -45,15 +45,15 @@ Last-Update: 2024-08-02
ExecStartPost=/bin/sh -c 'u=NetworkManager.service; \
--- a/systemd/cloud-init-local.service.tmpl
+++ b/systemd/cloud-init-local.service.tmpl
@@ -7,6 +7,7 @@ DefaultDependencies=no
@@ -7,6 +7,7 @@
{% endif %}
Wants=network-pre.target
After=hv_kvp_daemon.service
+After=systemd-remount-fs.service
{% if variant in ["almalinux", "cloudlinux", "rhel"] %}
Requires=dbus.socket
After=dbus.socket
@@ -37,14 +38,7 @@ ExecStartPre=/bin/mkdir -p /run/cloud-in
@@ -37,14 +38,7 @@
ExecStartPre=/sbin/restorecon /run/cloud-init
ExecStartPre=/usr/bin/touch /run/cloud-init/enabled
{% endif %}
Expand Down Expand Up @@ -251,3 +251,68 @@ Last-Update: 2024-08-02
+
+[Install]
+WantedBy=cloud-init.target
--- a/cloudinit/cmd/status.py
+++ b/cloudinit/cmd/status.py
@@ -318,9 +318,8 @@
for service in [
"cloud-final.service",
"cloud-config.service",
- "cloud-init-network.service",
+ "cloud-init.service",
"cloud-init-local.service",
- "cloud-init-main.service",
]:
try:
stdout = query_systemctl(
--- a/cloudinit/config/cc_mounts.py
+++ b/cloudinit/config/cc_mounts.py
@@ -525,7 +525,7 @@
# fs_spec, fs_file, fs_vfstype, fs_mntops, fs-freq, fs_passno
uses_systemd = cloud.distro.uses_systemd()
default_mount_options = (
- "defaults,nofail,x-systemd.after=cloud-init-network.service,_netdev"
+ "defaults,nofail,x-systemd.after=cloud-init.service,_netdev"
if uses_systemd
else "defaults,nobootwait"
)
--- a/cloudinit/config/schemas/schema-cloud-config-v1.json
+++ b/cloudinit/config/schemas/schema-cloud-config-v1.json
@@ -2022,12 +2022,12 @@
},
"mount_default_fields": {
"type": "array",
- "description": "Default mount configuration for any mount entry with less than 6 options provided. When specified, 6 items are required and represent ``/etc/fstab`` entries. Default: ``defaults,nofail,x-systemd.after=cloud-init-network.service,_netdev``.",
+ "description": "Default mount configuration for any mount entry with less than 6 options provided. When specified, 6 items are required and represent ``/etc/fstab`` entries. Default: ``defaults,nofail,x-systemd.after=cloud-init.service,_netdev``.",
"default": [
null,
null,
"auto",
- "defaults,nofail,x-systemd.after=cloud-init-network.service",
+ "defaults,nofail,x-systemd.after=cloud-init.service",
"0",
"2"
],
--- a/systemd/cloud-config.target
+++ b/systemd/cloud-config.target
@@ -14,5 +14,5 @@

[Unit]
Description=Cloud-config availability
-Wants=cloud-init-local.service cloud-init-network.service
-After=cloud-init-local.service cloud-init-network.service
+Wants=cloud-init-local.service cloud-init.service
+After=cloud-init-local.service cloud-init.service
--- a/tests/unittests/config/test_cc_mounts.py
+++ b/tests/unittests/config/test_cc_mounts.py
@@ -566,9 +566,9 @@
LABEL=keepme none ext4 defaults 0 0
LABEL=UEFI
/dev/sda4 /mnt2 auto nofail,comment=cloudconfig 1 2
- /dev/sda5 /mnt3 auto defaults,nofail,x-systemd.after=cloud-init-network.service,_netdev,comment=cloudconfig 0 2
+ /dev/sda5 /mnt3 auto defaults,nofail,x-systemd.after=cloud-init.service,_netdev,comment=cloudconfig 0 2
/dev/sda1 /mnt xfs auto,comment=cloudconfig 0 2
- /dev/sda3 /mnt4 btrfs defaults,nofail,x-systemd.after=cloud-init-network.service,_netdev,comment=cloudconfig 0 2
+ /dev/sda3 /mnt4 btrfs defaults,nofail,x-systemd.after=cloud-init.service,_netdev,comment=cloudconfig 0 2
/dev/sdb1 none swap sw,comment=cloudconfig 0 0
""" # noqa: E501
).strip()

0 comments on commit e7852ff

Please sign in to comment.