deferred services restart hangs in functional tests
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-ovn-chassis |
Fix Committed
|
High
|
Unassigned | ||
charm-ovn-dedicated-chassis |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
This can be seen here: https:/
...
2023-03-22 17:55:46 [INFO] ## Running Test zaza.openstack.
2023-03-22 17:55:46 [INFO] test_deferred_
2023-03-22 17:55:46 [INFO] Run deferred restart tests.
2023-03-22 17:55:46 [INFO] ...
2023-03-22 17:55:46 [INFO] Turning off auto restarts
2023-03-22 17:55:46 [INFO] Waiting for /etc/policy-
2023-03-22 17:55:57 [INFO] Waiting for units to be idle
2023-03-22 17:55:58 [INFO] Triggering deferred restart via config change
2023-03-22 17:55:58 [INFO] Setting enable-sriov: True
2023-03-22 17:55:58 [INFO] Waiting for ovn-chassis/0 to show deferred hook
2023-03-22 17:56:06 [INFO] Waiting for ovn-chassis/1 to show deferred hook
2023-03-22 17:56:14 [INFO] Waiting for units to be idle
2023-03-22 17:56:14 [INFO] Checking ovn-chassis/0 is marked as having deferred hook in workload message
2023-03-22 17:56:14 [INFO] Checking ovn-chassis/1 is marked as having deferred hook in workload message
2023-03-22 17:56:14 [INFO] Checking configure_ovs is marked as skipped in show-deferred-
2023-03-22 17:56:18 [INFO] configure_ovs in configure_ovs
2023-03-22 17:56:18 [INFO] Triggering deferred restart via config change
2023-03-22 17:56:18 [INFO] Setting enable-sriov: False
2023-03-22 17:56:18 [INFO] Waiting for ovn-chassis/0 to show deferred hook
2023-03-22 17:56:22 [INFO] Waiting for ovn-chassis/1 to show deferred hook 2023-03-22 17:56:30 [INFO] Waiting for units to be idle
2023-03-22 17:56:31 [INFO] Running restart action to clear deferred hooks
2023-03-22 17:56:31 [INFO] Running run-deferred-hooks on ovn-chassis/0
2023-03-22 17:56:36 [INFO] Running run-deferred-hooks on ovn-chassis/1
2023-03-22 17:56:39 [INFO] Triggering deferred restart via package change
2023-03-22 17:56:57 [INFO] Service was openvswitch-switch not restarted. 2023-03-22 17:56:57 [INFO] Checking openvswitch-switch is marked as needing restart in workload message of ovn-chassis/0
2023-03-22 17:56:57 [INFO] Checking openvswitch-switch is marked as needing restart in workload message of ovn-chassis/1
2023-03-22 17:56:57 [INFO] Checking openvswitch-switch is marked as needing restart in show-deferred-
2023-03-22 17:56:59 [INFO] openvswitch-switch in 1679507800 ovs-record-
2023-03-22 17:56:59 [INFO] openvswitch-switch in 1679507800 ovs-vswitchd.
2023-03-22 17:56:59 [INFO] openvswitch-switch in 1679507800 ovsdb-server.
2023-03-22 17:56:59 [INFO] openvswitch-switch in 1679507801 openvswitch-switch Package update and Package update in 1679507801 openvswitch-switch Package update
2023-03-22 17:56:59 [INFO] Running restart action to clear deferred restarts
2023-03-22 17:56:59 [INFO] Running restart-services on ovn-chassis/0
2023-03-22 17:57:02 [INFO] Running restart-services on ovn-chassis/1
.... hang until timeout ...
juju status shows:
magpie/0* active idle 0 10.5.0.91 icmp ok, local hostname ok (juju-d7c54a-
ovn-chassis/1 active idle 10.5.0.91 Services queued for stop: ovs-record-
I think this may be something to do with this function from charmhelpers/
def get_deferred_
"""List of deferred restart events requested by the charm and packages.
:returns: List of deferred restarts
:rtype: List[ServiceEvent]
"""
return [e for e in get_deferred_
The deferred events files on a ovn-chassis charm show 'stop' events so there is no match because the code is looking for 'restart':
ubuntu@
charm-ovn-
ubuntu@
action: stop
policy_
policy_
reason: Package update
service: ovsdb-server.
timestamp: 1679507800
action: stop
policy_
policy_
reason: Package update
service: ovs-vswitchd.
timestamp: 1679507800
action: stop
policy_
policy_
reason: Package update
service: ovs-record-
timestamp: 1679507800
description: | updated |
description: | updated |
description: | updated |
Changed in charm-ovn-chassis: | |
status: | New → Triaged |
importance: | Undecided → High |
https:/ /github. com/juju/ charm-helpers/ pull/766