cloud-init dependency for open-vm-tools service

Bug #1667831 reported by Sankar Tanguturi
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Invalid
Undecided
Unassigned
open-vm-tools (Debian)
Fix Released
Unknown
open-vm-tools (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Had a private chat conversation with Scott Moser (@smoser). As per his instructions, logging this bug. We need to add 'cloud-init' dependency for 'open-vm-tools' service.

This is how 'Guest Customization' works for the 'VMware' managed guests.

1. open-vm-tools service comes up and populates a 'customization' configuration file.
2. cloud-init service starts and waits for the 'customization config' file, reads it and applies the customization.

(1) should start before (2). Else, (2) will just block itself and not find the config file. Everything was working fine. But due to recent 'systemd' changes done to 'cloud-init', 'cloud-init' service starts early in the boot process before 'open-vm-tools' service. Due to this, no customization actually happens.

Need to add the 'cloud-init' dependency for 'open-vm-tools' service so that (1) always happens before (2).

Logging a bug.

Thanks
Sankar.

Revision history for this message
Sankar Tanguturi (sankaraditya) wrote :

Adding the following two lines to 'open-vm-tools' service unit file fixes the issue.

DefaultDependencies=no
Before=cloud-init-local.service

Here is the total content of 'open-vm-tools.service' file

"""
[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

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

[Install]
WantedBy=multi-user.target
"""

Bernd Zeimetz (bzed)
affects: cloud-init → open-vm-tools
affects: open-vm-tools → open-vm-tools (Ubuntu)
Changed in open-vm-tools (Debian):
status: Unknown → New
Changed in open-vm-tools (Debian):
status: New → Fix Released
Revision history for this message
Sankar Tanguturi (sankaraditya) wrote :

Can we get this fix in Ubuntu 17.04 release?

Revision history for this message
Joshua Powers (powersj) wrote :

Fixed in debian version 10.1.5-5055683-3

Changed in cloud-init (Ubuntu):
status: New → Invalid
Revision history for this message
Sankar Tanguturi (sankaraditya) wrote :

Joshua,

Why is this marked as 'Invalid'?

Thanks
Sankar

Revision history for this message
Joshua Powers (powersj) wrote :

The cloud-init portion was marked as invalid as I did not see any action was required from the cloud-init side. This however still is marked as new in open-vm-tools. My previous comment was calling out that it was fixed in the version 10.1.5-5055683-3 found in Debian right now.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This was done in open-vm-tools a while ago
+open-vm-tools (2:10.1.5-5055683-3) unstable; urgency=medium
+
+ * [0aa95b6] Start open-vm-tools before cloud-init-local.service.
+ Required for a working guest customization as reported by VMware.
+ Also add cloud-init to 'Suggests'.
+ Thanks to Sankar Tanguturi (Closes: #859677)

It also breaks the service, but that is another story :-/

Changed in open-vm-tools (Ubuntu):
status: New → Fix Released
Revision history for this message
Sankar Tanguturi (sankaraditya) wrote :

Thanks for the fix.

> It also breaks the service, but that is another story :-/

Can you please provide more information about what service is broken? Is open-vm-tools service broken?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Yes the service is affected, but to keep this bug clean I filed a new bug for it.

Once we resolved it there we will also mirror the solution to Debian.
Probably worth to add the reference here - so see bug 1750780 (I didn't have it filed yet when I made the update above)

I'm happy that you are active here Sankar, so please feel free to participate on that bug 1750780.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.