Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud-init status always reporting running #5304

Closed
Overmorrow1501 opened this issue May 18, 2024 · 6 comments
Closed

Cloud-init status always reporting running #5304

Overmorrow1501 opened this issue May 18, 2024 · 6 comments
Assignees
Labels
bug Something isn't working correctly priority Fix soon

Comments

@Overmorrow1501
Copy link

Overmorrow1501 commented May 18, 2024

After boot the newly created VM and every task cloud-init should perform is done, cloud-init status still reports status "Running"

cloud-init configuration

/etc/cloud/cloud.cfg:

cloud_init_modules:
  - growpart
  - resizefs

network: {config: disabled}
datasource_list: [ 'None' ]

growpart:
  mode: auto
  devices: ["/"]

resize_rootfs: true

system_info:
  distro: ubuntu
  paths:
    cloud_dir: /var/lib/cloud/
    templates_dir: /etc/cloud/templates/

###Steps to reproduce the problem

$ cloud-init clean --logs --seed --machine-id --reboot

$ cloud-init status --long
status: running
extended_status: running
boot_status_code: enabled-by-generator
last_update: Sat, 18 May 2024 14:21:26 +0000
detail:
Cloud-init enabled by systemd cloud-init-generator
errors: []
recoverable_errors: {}

$ cloud-init status --format json
{
  "_schema_version": "1",
  "boot_status_code": "enabled-by-generator",
  "datasource": null,
  "detail": "Cloud-init enabled by systemd cloud-init-generator",
  "errors": [],
  "extended_status": "running",
  "init": {
    "errors": [],
    "finished": null,
    "start": null
  },
  "init-local": {
    "errors": [],
    "finished": null,
    "start": null
  },
  "last_update": "Sat, 18 May 2024 14:21:26 +0000",
  "modules-config": {
    "errors": [],
    "finished": 1716042085.1915476,
    "recoverable_errors": {},
    "start": 1716042085.1726842
  },
  "modules-final": {
    "errors": [],
    "finished": 1716042086.0076993,
    "recoverable_errors": {},
    "start": 1716042085.9895425
  },
  "recoverable_errors": {},
  "schemas": {
    "1": {
      "boot_status_code": "enabled-by-generator",
      "datasource": null,
      "detail": "Cloud-init enabled by systemd cloud-init-generator",
      "errors": [],
      "extended_status": "running",
      "init": {
        "errors": [],
        "finished": null,
        "start": null
      },
      "init-local": {
        "errors": [],
        "finished": null,
        "start": null
      },
      "last_update": "Sat, 18 May 2024 14:21:26 +0000",
      "modules-config": {
        "errors": [],
        "finished": 1716042085.1915476,
        "recoverable_errors": {},
        "start": 1716042085.1726842
      },
      "modules-final": {
        "errors": [],
        "finished": 1716042086.0076993,
        "recoverable_errors": {},
        "start": 1716042085.9895425
      },
      "recoverable_errors": {},
      "stage": null,
      "status": "running"
    }
  },
  "stage": null,
  "status": "running"
}

Environment details

  • Cloud-init version: /usr/bin/cloud-init 23.4.4-0ubuntu0~22.04.1
  • Operating System Distribution: Ubuntu 22.04.04 LTS 5.15.0-101-generic
  • Cloud provider, platform or installer type: None, NoCloud

cloud-init logs

cloud-init.tar.gz

@Overmorrow1501 Overmorrow1501 added bug Something isn't working correctly new An issue that still needs triage labels May 18, 2024
@TheRealFalcon
Copy link
Member

Thank you for the bug report, but I am unable to reproduce this with the information given.

Included in your cloud-init logs are installer logs. To reproduce this, are you running the Ubuntu installer or cloud-init alone?

Both your logs and the status output that you've pasted show that only the config and final stages of cloud-init were run, but cloud-init runs in 4 stages (not including the detect generator). If all four stages did not run, cloud-init will not be considered done. Did you do something to disable the other cloud-init services in your system, such as disable cloud-init.service or cloud-init-local.service? If not, what does systemctl | grep "cloud-" show?

@TheRealFalcon TheRealFalcon added incomplete Action required by submitter and removed new An issue that still needs triage labels May 20, 2024
@Overmorrow1501
Copy link
Author

Overmorrow1501 commented May 20, 2024

Thanks for the reply!

I'm creating a VM from a VMware template on which before the last shutdown the command cloud-init clean --logs --machine-id --seed was issued. So it's just the cloud-init alone.

What's really strange is that each time I use this template to deploy 2 or more new VM at the same run (using Ansible with community.vmware.vmware_guest) at least one of the VM presents this problem...

I've gathered a little more details from one of the VMs which has this problem

  1. As you can see cloud-init.service is not loaded
$ systemctl | grep "cloud-"
  cloud-config.service                                                                             loaded active     exited          Apply the settings specified in cloud-config
  cloud-final.service                                                                              loaded active     exited          Execute cloud user/final scripts
  cloud-init-hotplugd.socket                                                                       loaded active     listening       cloud-init hotplug hook socket
  cloud-config.target                                                                              loaded active     active          Cloud-config availability
  cloud-init.target                                                                                loaded active     active          Cloud-init target

$ cloud-init status --long
status: running
extended_status: running
boot_status_code: enabled-by-generator
last_update: Mon, 20 May 2024 20:17:51 +0000
detail:
Cloud-init enabled by systemd cloud-init-generator
errors: []
recoverable_errors: {}

for I in `systemctl | grep "cloud-" | awk '{print $1}'`
> do
> systemctl status $I
> done
● cloud-config.service - Apply the settings specified in cloud-config
     Loaded: loaded (/lib/systemd/system/cloud-config.service; enabled; vendor preset: enabled)
     Active: active (exited) since Mon 2024-05-20 22:17:51 CEST; 4min 37s ago
    Process: 717 ExecStart=/usr/bin/cloud-init modules --mode=config (code=exited, status=0/SUCCESS)
   Main PID: 717 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 11751)
     Memory: 6.5M
        CPU: 243ms
     CGroup: /system.slice/cloud-config.service

May 20 22:17:50 oc-ubu-dev02 systemd[1]: Starting Apply the settings specified in cloud-config...
May 20 22:17:51 oc-ubu-dev02 cloud-init[922]: Cloud-init v. 23.4.4-0ubuntu0~22.04.1 running 'modules:config' at Mon, 20 May 2024 20>
May 20 22:17:51 oc-ubu-dev02 cloud-init[922]: No 'config' modules to run under section 'cloud_config_modules'
May 20 22:17:51 oc-ubu-dev02 systemd[1]: Finished Apply the settings specified in cloud-config.
● cloud-final.service - Execute cloud user/final scripts
     Loaded: loaded (/lib/systemd/system/cloud-final.service; enabled; vendor preset: enabled)
     Active: active (exited) since Mon 2024-05-20 22:17:51 CEST; 4min 41s ago
    Process: 924 ExecStart=/usr/bin/cloud-init modules --mode=final (code=exited, status=0/SUCCESS)
   Main PID: 924 (code=exited, status=0/SUCCESS)
      Tasks: 0
     Memory: 40.0K
        CPU: 237ms
     CGroup: /system.slice/cloud-final.service

May 20 22:17:51 oc-ubu-dev02 systemd[1]: Starting Execute cloud user/final scripts...
May 20 22:17:51 oc-ubu-dev02 cloud-init[930]: Cloud-init v. 23.4.4-0ubuntu0~22.04.1 running 'modules:final' at Mon, 20 May 2024 20:>
May 20 22:17:51 oc-ubu-dev02 cloud-init[930]: No 'final' modules to run under section 'cloud_final_modules'
May 20 22:17:51 oc-ubu-dev02 systemd[1]: Finished Execute cloud user/final scripts.
● cloud-init-hotplugd.socket - cloud-init hotplug hook socket
     Loaded: loaded (/lib/systemd/system/cloud-init-hotplugd.socket; enabled; vendor preset: enabled)
     Active: active (listening) since Mon 2024-05-20 22:17:50 CEST; 4min 43s ago
   Triggers: ● cloud-init-hotplugd.service
     Listen: /run/cloud-init/hook-hotplug-cmd (FIFO)
     CGroup: /system.slice/cloud-init-hotplugd.socket

May 20 22:17:50 oc-ubu-dev02 systemd[1]: Listening on cloud-init hotplug hook socket.
● cloud-config.target - Cloud-config availability
     Loaded: loaded (/lib/systemd/system/cloud-config.target; static)
     Active: active since Mon 2024-05-20 22:17:50 CEST; 4min 43s ago

Notice: journal has been rotated since unit was started, output may be incomplete.
● cloud-init.target - Cloud-init target
     Loaded: loaded (/lib/systemd/system/cloud-init.target; enabled-runtime; vendor preset: enabled)
     Active: active since Mon 2024-05-20 22:17:51 CEST; 4min 42s ago

May 20 22:17:51 oc-ubu-dev02 systemd[1]: Reached target Cloud-init target.

○ cloud-init.service - Initial cloud-init job (metadata service crawler)
     Loaded: loaded (/lib/systemd/system/cloud-init.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
  1. This is the systemd service for cloud-init.service
# systemctl list-dependencies cloud-init.service
cloud-init.service
○ ├─cloud-init-local.service
● ├─ssh.service
○ ├─sshd-keygen.service
● └─system.slice

# systemctl cat cloud-init.service
# /lib/systemd/system/cloud-init.service
[Unit]
Description=Initial cloud-init job (metadata service crawler)
DefaultDependencies=no
Wants=cloud-init-local.service
Wants=sshd-keygen.service
Wants=sshd.service
After=cloud-init-local.service
After=systemd-networkd-wait-online.service
After=networking.service
Before=network-online.target
Before=sshd-keygen.service
Before=sshd.service
Before=sysinit.target
Before=shutdown.target
Conflicts=shutdown.target
Before=systemd-user-sessions.service
ConditionPathExists=!/etc/cloud/cloud-init.disabled
ConditionKernelCommandLine=!cloud-init=disabled
ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled

[Service]
Type=oneshot
ExecStart=/usr/bin/cloud-init init
RemainAfterExit=yes
TimeoutSec=0

# Output needs to appear in instance console output
StandardOutput=journal+console

[Install]
WantedBy=cloud-init.target
  1. This is the systemd service for ` cloud-init-local.service
# systemctl list-dependencies cloud-init-local.service 
cloud-init-local.service
● ├─-.mount
● ├─system.slice
● └─network-pre.target

# systemctl status cloud-init-local.service
○ cloud-init-local.service - Initial cloud-init job (pre-networking)
     Loaded: loaded (/lib/systemd/system/cloud-init-local.service; enabled; vendor preset: enabled)
     Active: inactive (dead)


# systemctl cat cloud-init-local.service
# /lib/systemd/system/cloud-init-local.service
[Unit]
Description=Initial cloud-init job (pre-networking)
DefaultDependencies=no
Wants=network-pre.target
After=hv_kvp_daemon.service
After=systemd-remount-fs.service
Before=NetworkManager.service
Before=network-pre.target
Before=shutdown.target
Before=sysinit.target
Conflicts=shutdown.target
RequiresMountsFor=/var/lib/cloud
ConditionPathExists=!/etc/cloud/cloud-init.disabled
ConditionKernelCommandLine=!cloud-init=disabled
ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled

[Service]
Type=oneshot
ExecStart=/usr/bin/cloud-init init --local
RemainAfterExit=yes
TimeoutSec=0

# Output needs to appear in instance console output
StandardOutput=journal+console

[Install]
WantedBy=cloud-init.target
# who -b 
system boot  2024-05-20 22:17
# ls -la /etc/cloud/cloud-init.disabled
ls: cannot access '/etc/cloud/cloud-init.disabled': No such file or directory
# cat /proc/cmdline 
BOOT_IMAGE=/boot/vmlinuz-5.15.0-101-generic root=UUID=da565bae-5497-4be7-9409-e4284fa5d6bc ro ipv6.disable=1 net.ifnames=0 biosdevname=0
# ls -dl /var/lib/cloud
drwxr-xr-x 3 root root 18 May 20 22:17 /var/lib/cloud

# dmesg -T | grep cloud-init
[Mon May 20 22:17:49 2024] systemd[1]: sysinit.target: Found ordering cycle on cloud-init.service/start
[Mon May 20 22:17:49 2024] systemd[1]: sysinit.target: Found dependency on cloud-init-local.service/start
[Mon May 20 22:17:49 2024] systemd[1]: sysinit.target: Job cloud-init.service/start deleted to break ordering cycle starting with sysinit.target/start
[Mon May 20 22:17:49 2024] systemd[1]: sysinit.target: Found ordering cycle on cloud-init-local.service/start
[Mon May 20 22:17:49 2024] systemd[1]: sysinit.target: Job cloud-init-local.service/start deleted to break ordering cycle starting with sysinit.target/start

@holmanb
Copy link
Member

holmanb commented May 24, 2024

There is your problem:

[Mon May 20 22:17:49 2024] systemd[1]: sysinit.target: Found ordering cycle on cloud-init.service/start
[Mon May 20 22:17:49 2024] systemd[1]: sysinit.target: Found dependency on cloud-init-local.service/start
[Mon May 20 22:17:49 2024] systemd[1]: sysinit.target: Job cloud-init.service/start deleted to break ordering cycle starting with sysinit.target/start
[Mon May 20 22:17:49 2024] systemd[1]: sysinit.target: Found ordering cycle on cloud-init-local.service/start
[Mon May 20 22:17:49 2024] systemd[1]: sysinit.target: Job cloud-init-local.service/start deleted to break ordering cycle starting with sysinit.target/start

An ordering cycle dropped two of cloud-init's services from the boot order.

Long term cloud-init status should return a fatal error code and indicate this issue, but before we can fix that we need to understand what introduced the cycle on your system.

@Overmorrow1501 can you please share the output of the following commands?

systemctl show -p Requires,Wants,Requisite,BindsTo,PartOf,Before,After cloud-init-local.service
systemd-analyze verify sysinit.target

@Overmorrow1501
Copy link
Author

Overmorrow1501 commented May 27, 2024

@holmanb: Yeah, i noticed that, but I forgot to put this output in my previous comment...

$ systemctl show -p Requires,Wants,Requisite,BindsTo,PartOf,Before,After cloud-init-local.service --no-pager
Requires=-.mount system.slice
Requisite=
Wants=network-pre.target
BindsTo=
PartOf=
Before=NetworkManager.service network-pre.target cloud-config.target sysinit.target cloud-init.service shutdown.target
After=systemd-remount-fs.service hv_kvp_daemon.service hv-kvp-daemon.service systemd-journald.socket open-vm-tools.service -.mount system.slice

$ systemctl show -p Requires,Wants,Requisite,BindsTo,PartOf,Before,After cloud-init.service --no-pager
Requires=system.slice
Requisite=
Wants=ssh.service sshd-keygen.service cloud-init-local.service
BindsTo=
PartOf=
Before=sshd-keygen.service sysinit.target shutdown.target ssh.service network-online.target systemd-user-sessions.service cloud-config.target
After=system.slice networking.service cloud-init-local.service systemd-networkd-wait-online.service systemd-journald.socket

$ systemd-analyze verify sysinit.target
<no output> rc=0

This is the the dmesg full output regarding the ordering cycle:

[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found ordering cycle on cloud-init.service/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on systemd-networkd-wait-online.service/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on systemd-networkd.service/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on network-pre.target/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on cloud-init-local.service/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on open-vm-tools.service/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on dbus.service/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on basic.target/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on sockets.target/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on uuidd.socket/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on sysinit.target/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Job cloud-init.service/start deleted to break ordering cycle starting with sysinit.target/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found ordering cycle on cloud-init-local.service/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on open-vm-tools.service/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on dbus.service/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on basic.target/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on sockets.target/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on uuidd.socket/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Found dependency on sysinit.target/start
[Tue May 21 11:43:04 2024] systemd[1]: sysinit.target: Job cloud-init-local.service/start deleted to break ordering cycle starting with sysinit.target/start

I'll add also the mentioned systemd-units

 $ systemctl cat NetworkManager.service network-pre.target cloud-config.target sysinit.target cloud-init.service shutdown.target sshd-keygen.service sysinit.target shutdown.target ssh.service network-online.target systemd-user-sessions.service cloud-config.target systemd-remount-fs.service hv_kvp_daemon.service hv-kvp-daemon.service systemd-journald.socket open-vm-tools.service system.slice --no-pager
No files found for NetworkManager.service.
# /lib/systemd/system/network-pre.target
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Preparation for Network
Documentation=man:systemd.special(7)
Documentation=https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
RefuseManualStart=yes

# /lib/systemd/system/cloud-config.target
# cloud-config.target is the earliest synchronization point in cloud-init's
# boot stages that indicates the completion of datasource detection (cloud-id)
# and the presence of any meta-data, vendor-data and user-data.

# Any services started at cloud-config.target will need to be aware that
# cloud-init configuration modules have not yet completed initial system
# configuration of cloud-config modules and there may be race conditions with
# ongoing cloud-init setup, package installs or user-data scripts.

# Services that need to start at this point should use the directives
# "After=cloud-config.target" and "Wants=cloud-config.target" as appropriate.

# To order services after all cloud-init operations, see cloud-init.target.

[Unit]
Description=Cloud-config availability
Wants=cloud-init-local.service cloud-init.service
After=cloud-init-local.service cloud-init.service

# /lib/systemd/system/sysinit.target
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=System Initialization
Documentation=man:systemd.special(7)
Conflicts=emergency.service emergency.target
Wants=local-fs.target swap.target
After=local-fs.target swap.target emergency.service emergency.target

# /lib/systemd/system/cloud-init.service
[Unit]
Description=Initial cloud-init job (metadata service crawler)
DefaultDependencies=no
Wants=cloud-init-local.service
Wants=sshd-keygen.service
Wants=sshd.service
After=cloud-init-local.service
After=systemd-networkd-wait-online.service
After=networking.service
Before=network-online.target
Before=sshd-keygen.service
Before=sshd.service
Before=sysinit.target
Before=shutdown.target
Conflicts=shutdown.target
Before=systemd-user-sessions.service
ConditionPathExists=!/etc/cloud/cloud-init.disabled
ConditionKernelCommandLine=!cloud-init=disabled
ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled

[Service]
Type=oneshot
ExecStart=/usr/bin/cloud-init init
RemainAfterExit=yes
TimeoutSec=0

# Output needs to appear in instance console output
StandardOutput=journal+console

[Install]
WantedBy=cloud-init.target

# /lib/systemd/system/shutdown.target
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=System Shutdown
Documentation=man:systemd.special(7)
DefaultDependencies=no
RefuseManualStart=yes
No files found for sshd-keygen.service.

# /lib/systemd/system/sysinit.target
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=System Initialization
Documentation=man:systemd.special(7)
Conflicts=emergency.service emergency.target
Wants=local-fs.target swap.target
After=local-fs.target swap.target emergency.service emergency.target

# /lib/systemd/system/shutdown.target
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=System Shutdown
Documentation=man:systemd.special(7)
DefaultDependencies=no
RefuseManualStart=yes

# /lib/systemd/system/ssh.service
[Unit]
Description=OpenBSD Secure Shell server
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run

[Service]
EnvironmentFile=-/etc/default/ssh
ExecStartPre=/usr/sbin/sshd -t
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/usr/sbin/sshd -t
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartPreventExitStatus=255
Type=notify
RuntimeDirectory=sshd
RuntimeDirectoryMode=0755

[Install]
WantedBy=multi-user.target
Alias=sshd.service

# /lib/systemd/system/network-online.target
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Network is Online
Documentation=man:systemd.special(7)
Documentation=https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget
After=network.target

# /lib/systemd/system/systemd-user-sessions.service
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Permit User Sessions
Documentation=man:systemd-user-sessions.service(8)
After=remote-fs.target nss-user-lookup.target network.target home.mount

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/systemd/systemd-user-sessions start
ExecStop=/lib/systemd/systemd-user-sessions stop

# /lib/systemd/system/cloud-config.target
# cloud-config.target is the earliest synchronization point in cloud-init's
# boot stages that indicates the completion of datasource detection (cloud-id)
# and the presence of any meta-data, vendor-data and user-data.

# Any services started at cloud-config.target will need to be aware that
# cloud-init configuration modules have not yet completed initial system
# configuration of cloud-config modules and there may be race conditions with
# ongoing cloud-init setup, package installs or user-data scripts.

# Services that need to start at this point should use the directives
# "After=cloud-config.target" and "Wants=cloud-config.target" as appropriate.

# To order services after all cloud-init operations, see cloud-init.target.

[Unit]
Description=Cloud-config availability
Wants=cloud-init-local.service cloud-init.service
After=cloud-init-local.service cloud-init.service

# /lib/systemd/system/systemd-remount-fs.service
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Remount Root and Kernel File Systems
Documentation=man:systemd-remount-fs.service(8)
Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
DefaultDependencies=no
Conflicts=shutdown.target
After=systemd-fsck-root.service
Before=local-fs-pre.target local-fs.target shutdown.target
Wants=local-fs-pre.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/systemd/systemd-remount-fs
No files found for hv_kvp_daemon.service.
No files found for hv-kvp-daemon.service.

# /lib/systemd/system/systemd-journald.socket
#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Journal Socket
Documentation=man:systemd-journald.service(8) man:journald.conf(5)
DefaultDependencies=no
Before=sockets.target

# Mount and swap units need this. If this socket unit is removed by an
# isolate request the mount and swap units would be removed too,
# hence let's exclude this from isolate requests.
IgnoreOnIsolate=yes

[Socket]
ListenDatagram=/run/systemd/journal/socket
ListenStream=/run/systemd/journal/stdout
PassCredentials=yes
PassSecurity=yes
ReceiveBuffer=8M
Service=systemd-journald.service
SocketMode=0666
Timestamping=us

# /lib/systemd/system/open-vm-tools.service
[Unit]
Description=Service for virtual machines hosted on VMware
Documentation=http://open-vm-tools.sourceforge.net/about.php
ConditionVirtualization=vmware
DefaultDependencies=no
Before=cloud-init-local.service
After=vgauth.service
After=apparmor.service
RequiresMountsFor=/tmp
After=systemd-remount-fs.service systemd-tmpfiles-setup.service systemd-modules-load.service

[Service]
ExecStart=/usr/bin/vmtoolsd
TimeoutStopSec=5

[Install]
WantedBy=multi-user.target
Alias=vmtoolsd.service

# /etc/systemd/system/open-vm-tools.service.d/override.conf
[Unit]
After=dbus.service
No files found for system.slice.

@holmanb holmanb added priority Fix soon and removed incomplete Action required by submitter labels May 27, 2024
@blackboxsw blackboxsw added this to the cloud-init-24.3 milestone May 28, 2024
@blackboxsw
Copy link
Collaborator

adding 24.3 milestone, as we don't necessarily want to block 24.2 on this development.

@TheRealFalcon TheRealFalcon self-assigned this Aug 2, 2024
TheRealFalcon added a commit to TheRealFalcon/cloud-init that referenced this issue Aug 2, 2024
@TheRealFalcon
Copy link
Member

The original issue here was fixed in #4864 . Cloud-init no longer reports RUNNING but instead reports DONE.

Long term cloud-init status should return a fatal error code and indicate this issue, but before we can fix that we need to understand what introduced the cycle on your system.

Attempted in #5579 but realized there's no real value now that we use a single process.

I see nothing left to do to address here, so I'm going to close the issue. If there is something we have left unresolved, please comment as to why we should reopen this issue, or open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly priority Fix soon
Projects
None yet
Development

No branches or pull requests

4 participants