juju / charm-helpers

Apache License 2.0
18 stars 127 forks source link

Restart deferred stopped events in restart_services_action() #767

Closed coreycb closed 1 year ago

coreycb commented 1 year ago

This change updates restart_services_action() to restart deferred 'stop' events, in addition to the already existing restart of 'restart' events.

Some services get stopped, and not restarted, when dpkg-reconfigure is called. For example: ovsdb-server, ovs-vswitchd, and ovs-record-hostname from the openvswitch package in kinetic+ are defined to behave this way. This results in a deferred event such as:

$ cat /var/lib/policy-rc.d/charm-ovn-chassis-.deferred action: stop policy_requestor_name: ovn-chassis policy_requestor_type: charm reason: Package update service: ovs-vswitchd.service timestamp: 1679507800

Closes-Bug: #2012553

coreycb commented 1 year ago

based on discussion, this will make more sense as code that is specific to the ovn-chassis charm