** Description changed: - The open-vm-tools.service unit declares After=apparmor.service and Before=cloud-init-local.service with ConditionVirtualization=vmware. - On non-VMware platforms (ex Azure, GCP, AWS), the condition correctly prevents open-vm-tools from running, but the static ordering constraints still apply during systemd's dependency-graph construction before conditions are evaluated. - This serializes cloud-init-local to wait for AppArmor completion, adding ~2.5 seconds of delay to boot time on affected platforms. + The open-vm-tools.service unit declares After=apparmor.service and + Before=cloud-init-local.service with ConditionVirtualization=vmware. On + non-VMware platforms (Azure, GCP, AWS), the condition correctly prevents + the service from running, but systemd's static dependency graph still + enforces the ordering constraints during boot, serializing cloud-init- + local after AppArmor completes. - Impact: - Boot time, time-to-SSH increase: ~2.5s on Azure Standard_D2as_v5 - Scope: All non-VMware deployments (Azure, GCP, AWS, bare metal without VMware hypervisor) - Evidence: Same-VM A/B test on Ubuntu 26.04 Server with single variable (open-vm-tools.service masked) shows AppArmor→cloud-init-local ordering flips from serialized (+0.011s) to overlapped (−1.24s) + Impact: ~2.5s boot delay on non-VMware platforms (tested on Azure + Standard_D2as_v5) Root Cause: - Systemd evaluates unit dependencies (like After=, Before=) during graph construction, before conditions (like ConditionVirtualization=) are evaluated at runtime. The open-vm-tools.service unit declares: - After=apparmor.service - Before=cloud-init-local.service - ConditionVirtualization=vmware - - On non-VMware platforms, the ConditionVirtualization=vmware condition correctly skips the service at runtime, but the static ordering constraints from the graph construction phase remain active. - Result: cloud-init-local is ordered to wait for AppArmor completion even though the service declaring that order never runs. + Systemd constructs the dependency graph before evaluating unit + conditions at runtime. The After= and Before= directives are baked into + the graph, so even though ConditionVirtualization=vmware correctly skips + the service, the ordering constraint remains active. This forces cloud- + init-local to wait for AppArmor to finish.
** Description changed: The open-vm-tools.service unit declares After=apparmor.service and Before=cloud-init-local.service with ConditionVirtualization=vmware. On non-VMware platforms (Azure, GCP, AWS), the condition correctly prevents the service from running, but systemd's static dependency graph still enforces the ordering constraints during boot, serializing cloud-init- local after AppArmor completes. - Impact: ~2.5s boot delay on non-VMware platforms (tested on Azure - Standard_D2as_v5) + Impact: ~2.5s boot delay on non-VMware platforms (tested on Azure Standard_D2as_v5) + Scope: All non-VMware deployments (Azure, GCP, AWS, bare metal without VMware hypervisor) + Evidence: Same-VM A/B test on Ubuntu 26.04 Server with single variable (open-vm-tools.service masked) shows AppArmor→cloud-init-local ordering flips from serialized (+0.011s) to overlapped (−1.24s) Root Cause: - - Systemd constructs the dependency graph before evaluating unit - conditions at runtime. The After= and Before= directives are baked into - the graph, so even though ConditionVirtualization=vmware correctly skips - the service, the ordering constraint remains active. This forces cloud- - init-local to wait for AppArmor to finish. + Systemd constructs the dependency graph before evaluating unit conditions at runtime. The After= and Before= directives are baked into the graph, so even though ConditionVirtualization=vmware correctly skips the service, the ordering constraint remains active. This forces cloud-init-local to wait for AppArmor to finish. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2166910 Title: open-vm-tools.service unnecessary ordering constraint blocks cloud- init on non-VMware platforms To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/open-vm-tools/+bug/2166910/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
