Comment 4 for bug 1955498

Revision history for this message
Brett Milford (brettmilford) wrote :

So I've been able to rule out involvement of netplan by replicating this issue more directly.

1) deploy focal-ussuri cloud
2) juju config neutron-openvswitch enable-auto-restarts=false
3) observe policy file created
root@juju-b8a8c1-ovs-restart-10:/home/ubuntu# cat /etc/policy-rc.d/charm-neutron-openvswitch.policy
# Managed by juju
blocked_actions:
  neutron-dhcp-agent:
  - restart
  - stop
  - try-restart
  neutron-metadata-agent:
  - restart
  - stop
  - try-restart
  neutron-openvswitch-agent:
  - restart
  - stop
  - try-restart
  openvswitch-switch:
  - restart
  - stop
  - try-restart
  ovs-vswitchd:
  - restart
  - stop
  - try-restart
  ovs-vswitchd-dpdk:
  - restart
  - stop
  - try-restart
  ovsdb-server:
  - restart
  - stop
  - try-restart
policy_requestor_name: neutron-openvswitch
policy_requestor_type: charm

4) increment and upload openvswitch package to ppa (https://launchpad.net/~brettmilford/+archive/ubuntu/lp1955498-openvswitch-focal)
5) install ppa on nova-compute unit
root@juju-b8a8c1-ovs-restart-10:/home/ubuntu# sudo add-apt-repository ppa:brettmilford/lp1955498-openvswitch-focal
6) upgrade openvswitch
oot@juju-b8a8c1-ovs-restart-10:/home/ubuntu# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  openvswitch-common openvswitch-switch python3-openvswitch
3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 2855 kB of archives.
After this operation, 0 B of additional disk space will be used.
...
7) observe deferred file created
root@juju-b8a8c1-ovs-restart-10:/home/ubuntu# cat /var/lib/policy-rc.d/charm-neutron-openvswitch-5e5ab802-78c6-11ec-8007-2b2c461941da.deferred
action: restart
policy_requestor_name: neutron-openvswitch
policy_requestor_type: charm
reason: Package update
service: openvswitch-switch
timestamp: 1642555392

root@juju-b8a8c1-ovs-restart-10:/home/ubuntu# date -d @1642555392
Wed Jan 19 01:23:12 UTC 2022

8) observe openvswitch service restarted
root@juju-b8a8c1-ovs-restart-10:/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 01:23:11 UTC; 14min ago
   Main PID: 102920 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 4682)
     Memory: 0B
     CGroup: /system.slice/openvswitch-switch.service

Jan 19 01:23:11 juju-b8a8c1-ovs-restart-10 systemd[1]: Starting Open vSwitch...
Jan 19 01:23:11 juju-b8a8c1-ovs-restart-10 systemd[1]: Finished Open vSwitch.