hit message "invoke-rc.d: policy-rc.d denied execution of stop" when uninstall open-vm-tools in ubuntu desktop 22.04 daily build

Bug #1964285 reported by vmware-gos-Yuhua
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
open-vm-tools (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

For ubuntu 22.04 desktop dailybuild
  1) It outputs "invoke-rc.d: policy-rc.d deined execution of stop" when I uninstall open-vm-tools with command "apt-get purge open-vm-tools". So the servcies /usb/bin/vmtoolsd and /usr/bin/VGAuthService are still running.

  2) It outputs "invoke-rc.d: policy-rc.d deined execution of start" when I install open-vm-tools with command "apt-get install open-vm-tools". So the servcies /usb/bin/vmtoolsd and /usr/bin/VGAuthService are not running automatically and I need to start the services manually.

The above behaviors are inconsistent with the ubuntu 22.04 live server daily build and previous ubuntu version such as ubuntu 21.10.

In ubuntu 22.04 live server and previous distributions, servcies /usb/bin/vmtoolsd and /usr/bin/VGAuthService are running automatically when I install open-vm-tools and exit when I uninstall open-vm-tools

vmware-gos-Yuhua (yhzou)
summary: - hit message "invoke-rc.d: policy-rc.d denied execution of stop when
- uninstall open-vm-tools
+ hit message "invoke-rc.d: policy-rc.d denied execution of stop" when
+ uninstall open-vm-tools in ubuntu desktop 22.04 daily build
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in open-vm-tools (Ubuntu):
status: New → Confirmed
Revision history for this message
Paride Legovini (paride) wrote :

I tried to reproduce this issue on a clean Ubuntu Desktop install (ISO serial: 20220313) and wasn't able to. AIUI this could happen only if a package providing policy-rc.d is installed (or a policy-rc.d script is manually added to the system), see [1] for more info on this policy layer.

Could you please check what installed /usr/sbin/policy-rc.d on your system? Sharing the output of the following commands may help:

  ls -l /usr/sbin/policy-rc.d
  ls -l /etc/alternatives/policy-rc.d
  realpath /usr/sbin/policy-rc.d

Thanks!

[1] /usr/share/doc/init-system-helpers/README.policy-rc.d.gz

Changed in open-vm-tools (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
vmware-gos-Yuhua (yhzou) wrote :
Revision history for this message
vmware-gos-Yuhua (yhzou) wrote :
Revision history for this message
vmware-gos-Yuhua (yhzou) wrote :
Revision history for this message
vmware-gos-Yuhua (yhzou) wrote :

I reproduce the issue with jammy-desktop-amd64.iso daily build 20/Mar/2022.

please check the attached screenshot files for output message during install open-vm-tools/uninstall open-vm-tools.

please check the attached file policy.rc for the output of the following commands:

  ls -l /usr/sbin/policy-rc.d
  ls -l /etc/alternatives/policy-rc.d
  realpath /usr/sbin/policy-rc.d

Thanks very much.

Changed in open-vm-tools (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

@Yuhua,
hello this is really odd.
Until one can hopefully reproduce this soon on our side could you also run this in the failing environment?

  dpkg -S /usr/sbin/policy-rc.d

Because as far as I can see in the archive all that could exist is this list:

root@j:~# apt-file search policy-rc.d
fai-nfsroot: /usr/bin/policy-rc.d.fai
init-system-helpers: /usr/share/doc/init-system-helpers/README.policy-rc.d.gz
livecd-rootfs: /usr/share/livecd-rootfs/live-build/buildd/includes.chroot/usr/local/sbin/policy-rc.d
policy-rcd-declarative: /usr/sbin/policy-rc.d-declarative
policy-rcd-declarative: /usr/share/man/man8/policy-rc.d-declarative.8.gz
policyrcd-script-zg2: /usr/sbin/zg-policy-rc.d
policyrcd-script-zg2: /usr/share/man/man8/zg-policy-rc.d.8.gz

Hence I was totally ok with Parides question, but now that you see this again we need to find what/where it comes from.
The command above will try to tell you which package installed that file.

That ISO you mean is that a modified/adapted version or plain
https://cdimage.ubuntu.com/daily-live/current/jammy-desktop-amd64.iso
from
https://cdimage.ubuntu.com/daily-live/current/
?

Revision history for this message
vmware-gos-Yuhua (yhzou) wrote :

> That ISO you mean is that a modified/adapted version or plain https://cdimage.ubuntu.com/daily-live/current/jammy-desktop-amd64.iso from https://cdimage.ubuntu.com/daily-live/current/ ?

[zouy] I get the ISO from https://cdimage.ubuntu.com/daily-live/current/jammy-desktop-amd64.iso and install this guest OS in ESXi.

Thanks
Yuhua Zou

Revision history for this message
vmware-gos-Yuhua (yhzou) wrote :

> Until one can hopefully reproduce this soon on our side could you also run this in the failing environment?

  dpkg -S /usr/sbin/policy-rc.d

[zouy]
root@vmware-virtual-machine# ls /usr/sbin/policy-rc.d
/usr/sbin/policy-rc.d

root@vmware-virtual-machine# dpkg -S /usr/sbin/policy-rc.d
dpkg-query: no path found matching pattern /usr/sbin/policy-rc.d

Best regards
Yuhua Zou

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

Thanks Yuhua, so the file is there - but NOT owned by a package.
Which triggers the obvious question where did it come from?

Thanks for sharing the exact link you use to get your image - that will avoid misunderstandings.

I unpacked the ISO and on there is no mentioning of policy-rc.d.
  $ grep -Hrn policy-rc.d /mnt/iso/*
Of course it could be in a a packaged file, but then `dpkg -S` would have shown us and your example says it is not from a package.

I installed the same ISO you used in VMWare player 16.2.3 using EasyInstall and clicking myself through the installer keeping all defaults. If anything then I might assume that EasyInstall didn't work as it asked me the same again.
The install worked fine and afterwards on the system was no trace of /usr/sbin/policy-rc.d.

So the question remains where does it come from in your case ... ??!?
Does your install on ESXi use any different customization feature that might add this?
In general is any customization / automation applied on install?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
vmware-gos-Yuhua (yhzou) wrote :

> So the question remains where does it come from in your case ... ??!?
Does your install on ESXi use any different customization feature that might add this?

Steps:
1. I get the ISO from https://cdimage.ubuntu.com/daily-live/current/jammy-desktop-amd64.iso

2. Create VM in ESXi

3. Install guest OS with this image jammy-desktop-amd64.iso. It have two modes "normal" and "minimal" during the installing and I choose the "normal" mode. (Note: with the normal node, it will install media player, ....)

4. reboot after finished installation

5. login system, type "apt-get update" in terminal

6. input "apt-get purge open-vm-tools" in terminal

7. input "apt-get install open-vm-tools" in terminal

Hit the issue with steps 6 and 7

Best regards
Yuhua Zou

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

Thanks for outlining your steps in detail.
In my former tests I did use "minimal" instead of "normal" and did not yet purge+install open-vm-tools.
Let me try exactly yours to be closer to your case...

1. I get the ISO from https://cdimage.ubuntu.com/daily-live/current/jammy-desktop-amd64.iso
  1.1 as I said before, policy-rc.d isn't on the image
2. Create VM in ESXi
 2.1 for me vmware player
3. Install guest OS with this image jammy-desktop-amd64.iso in "normal" mode.
 3.1 do you keep the "download updates while installing" option enabled?
4. reboot after finished installation
 4.1 /usr/sbin/policy-rc.d wasn't present in my case
5. login system, type "apt-get update" in terminal
 5.1 /usr/sbin/policy-rc.d wasn't present in my case yet
6. input "apt-get purge open-vm-tools" in terminal
 6.1 /usr/sbin/policy-rc.d wasn't present in my case yet
 6.2 BTW since ubuntu-desktop meta package depends on it that is removed as well which is generally bad
7. input "apt-get install open-vm-tools" in terminal
 7.1 /usr/sbin/policy-rc.d wasn't present in my case yet - all worked fine
 7.2 FYI, that does not re-install ubuntu-desktop nor open-vm-tools-desktop, but that isn't the problem here

So in neither of these steps I see policy-rc.d present on the system, it needs to come from somewhere for you.

Could you please check the following to allow us to get closer to where this comes from in your case?
a) You could check just after reboot at #4 - if in your case policy-rc.d is there already we can ignore any latter stages for now.
b) maybe it is ESXi or a configuration in your particular current ESXi? I do not have an ESXi available at the moment to compare, could you on your side try the same on an VMWare player and if possible on a new unmodified ESXi?

Revision history for this message
Paride Legovini (paride) wrote :

Sharing the contents of /usr/sbin/policy-rc.d may also give clues about its origin. Note however that at this point we have no idea of what its license is.

Revision history for this message
vmware-gos-Yuhua (yhzou) wrote :

I don't reproduce this issue with ubuntu desktop daily build 24/Mar/2022.But hit another issue with this daily build image.

Trying fresh installation for 4 times in different ESXi version, I hit the same issue "Sorry, Ubuntu 22.04 has experienced an internal error". Please check attach "internal_error.png"

I click "send" button to send packaged message to Ubuntu automatically. So I think we can ignore this new issue in this bug.

Thanks
Yuhua Zou

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

Hi,
the new issue you found is known and being worked on here:
  https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1964923

For what is left here about the off profile-rc.d it seems you no more can reproduce it.
If you happen to see/reproduce it again continue to help us solving the open questions (see above).
Without those resolved (or a reproducer) I think there is nothing that can be done at the moment.

I'll mark this bug incomplete representing that right now we can't continue (and also hope it is fixed as you said 24/mar/2022 works), but please do not hesitate to update and/or re-open if you find more about this.

Changed in open-vm-tools (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
vmware-gos-Yuhua (yhzou) wrote :

Hi Chirstian,
Thanks very much.
I did not reproduce this issue with ubuntu 22.04 desktop beta image.

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

Since we couldn't get a hold how to fix/debug this I'm glad to hear that!

Changed in open-vm-tools (Ubuntu):
status: Incomplete → Invalid
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.