ovn-chassis workload status lists deferred events for another charm that is deployed on the same machine (in this case neutron-openvswitch):
Unit Workload Agent Machine Public address Message
nova-compute/0* active idle 8 10.5.3.226 Unit is ready
neutron-openvswitch/1 maintenance idle 10.5.3.226 Paused. Use 'resume' action to resume normal service.
ovn-chassis/1 active idle 10.5.3.226 Services queued for stop: ovs-record-hostname.service, ovs-vswitchd.service, ovsdb-server.service
where:
ubuntu@juju-2fd1c1-zaza-7b0a28b01698-8:/var/lib/policy-rc.d$ ls
charm-neutron-openvswitch-2d250424-c3fa-11ed-b824-a369432994da.deferred charm-neutron-openvswitch-2d36e1b2-c3fa-11ed-b824-a369432994da.deferred charm-neutron-openvswitch-2d49221e-c3fa-11ed-b824-a369432994da.deferred
charm-helpers code:
get_deferred_events() # charmhelpers/contrib/openstack/files/check_deferred_restarts.py
This gets all deferred files regardless of file name including service:
52 deferred_events_files = glob.glob(
53 '{}/*.deferred'.format(DEFERRED_EVENTS_DIR))
which is probably find since the contents of the files contains the service name:
37 {
38 action: restart,
39 policy_requestor_name: rabbitmq-server,
40 policy_requestor_type: charm,
41 reason: 'Pkg update',
42 service: rabbitmq-server,
43 time: 1614328743
44 }
This can probably be fixed in custom_assess_status_check() in lib/charms/ovn_charm.py by updating the events dict *only* with deferred events that match the ovn-chassis service:
132 def custom_assess_status_check(self):
133 """Report deferred events in charm status message."""
134 state = None
135 message = None
136 deferred_events.check_restart_timestamps()
137 events = collections.defaultdict(set)
138 for e in deferred_events.get_deferred_events():
# add a check here
139 events[e.action].add(e.service)
ovn-chassis workload status lists deferred events for another charm that is deployed on the same machine (in this case neutron- openvswitch) : openvswitch/ 1 maintenance idle 10.5.3.226 Paused. Use 'resume' action to resume normal service. hostname. service, ovs-vswitchd. service, ovsdb-server. service
Unit Workload Agent Machine Public address Message
nova-compute/0* active idle 8 10.5.3.226 Unit is ready
neutron-
ovn-chassis/1 active idle 10.5.3.226 Services queued for stop: ovs-record-
where: juju-2fd1c1- zaza-7b0a28b016 98-8:/var/ lib/policy- rc.d$ ls openvswitch- 2d250424- c3fa-11ed- b824-a369432994 da.deferred charm-neutron- openvswitch- 2d36e1b2- c3fa-11ed- b824-a369432994 da.deferred charm-neutron- openvswitch- 2d49221e- c3fa-11ed- b824-a369432994 da.deferred
ubuntu@
charm-neutron-
ubuntu@ juju-2fd1c1- zaza-7b0a28b016 98-8:/var/ lib/policy- rc.d$ cat * requestor_ name: neutron-openvswitch requestor_ type: charm service requestor_ name: neutron-openvswitch requestor_ type: charm service requestor_ name: neutron-openvswitch requestor_ type: charm hostname. service
action: stop
policy_
policy_
reason: Package update
service: ovsdb-server.
timestamp: 1678971478
action: stop
policy_
policy_
reason: Package update
service: ovs-vswitchd.
timestamp: 1678971479
action: stop
policy_
policy_
reason: Package update
service: ovs-record-
timestamp: 1678971479
charm-helpers code: events( ) # charmhelpers/ contrib/ openstack/ files/check_ deferred_ restarts. py events_ files = glob.glob( .format( DEFERRED_ EVENTS_ DIR))
get_deferred_
This gets all deferred files regardless of file name including service:
52 deferred_
53 '{}/*.deferred'
which is probably find since the contents of the files contains the service name: requestor_ name: rabbitmq-server, requestor_ type: charm,
37 {
38 action: restart,
39 policy_
40 policy_
41 reason: 'Pkg update',
42 service: rabbitmq-server,
43 time: 1614328743
44 }
This can probably be fixed in custom_ assess_ status_ check() in lib/charms/ ovn_charm. py by updating the events dict *only* with deferred events that match the ovn-chassis service:
132 def custom_ assess_ status_ check(self) : events. check_restart_ timestamps( ) defaultdict( set) events. get_deferred_ events( ): e.action] .add(e. service)
133 """Report deferred events in charm status message."""
134 state = None
135 message = None
136 deferred_
137 events = collections.
138 for e in deferred_
# add a check here
139 events[