Comment 5 for bug 1955498

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Thanks for the steps from @brettmilford (and the ppa), I was able to recreate this and confirm the issue.

Following an upgrade of the openvswitch package - I see this in the /var/log/policy-rc.d.log file:

2022-01-19 02:31:53,977 Permitting open-vm-tools restart
2022-01-19 02:31:55,202 Permitting open-vm-tools.service restart
2022-01-19 02:31:55,983 Permitting vgauth.service restart
2022-01-19 02:31:56,726 Permitting ovs-record-hostname.service restart
2022-01-19 02:31:58,020 restart of openvswitch-switch blocked by charm neutron-openvswitch

and I can see the openvswitch-switch service was restarted at 02:31:57

root@juju-c49180-zaza-e93a047791b2-8:/home/ubuntu# systemctl status openvswitch-switch
● openvswitch-switch.service - Open vSwitch
     Loaded: loaded (/lib/systemd/system/openvswitch-switch.service; enabled; vendor preset: enabled)
     Active: active (exited) since Wed 2022-01-19 02:31:57 UTC; 8min ago
   Main PID: 66522 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 4677)
     Memory: 0B
     CGroup: /system.slice/openvswitch-switch.service

Jan 19 02:31:57 juju-c49180-zaza-e93a047791b2-8 systemd[1]: Starting Open vSwitch...
Jan 19 02:31:57 juju-c49180-zaza-e93a047791b2-8 systemd[1]: Finished Open vSwitch.

On my next unit, I added the ovs-record-hostname service to the policy file using the following stanza:

  ovs-record-hostname:
  - restart
  - stop
  - try-restart

Then I added @brettmilford's ppa and upgraded the openvswitch package. In the policy-rc.d.log file I observe the ovs-record-hostname.service was blocked by the charm:

022-01-19 02:35:25,470 Permitting open-vm-tools restart
2022-01-19 02:35:27,018 Permitting open-vm-tools.service restart
2022-01-19 02:35:28,024 Permitting vgauth.service restart
2022-01-19 02:35:29,027 restart of ovs-record-hostname.service blocked by charm neutron-openvswitch
2022-01-19 02:35:29,690 restart of openvswitch-switch blocked by charm neutron-openvswitch

And the service has not been restarted:

root@juju-c49180-zaza-e93a047791b2-9:/etc/policy-rc.d# systemctl status openvswitch-switch
● openvswitch-switch.service - Open vSwitch
     Loaded: loaded (/lib/systemd/system/openvswitch-switch.service; enabled; vendor preset: enabled)
     Active: active (exited) since Wed 2022-01-19 02:28:31 UTC; 15min ago
   Main PID: 62372 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 4677)
     Memory: 0B
     CGroup: /system.slice/openvswitch-switch.service

Jan 19 02:28:31 juju-c49180-zaza-e93a047791b2-9 systemd[1]: Starting Open vSwitch...
Jan 19 02:28:31 juju-c49180-zaza-e93a047791b2-9 systemd[1]: Finished Open vSwitch.