-
Bug
-
Resolution: Done
-
Normal
-
None
-
3
-
False
-
-
False
-
?
-
?
-
ovn-operator-bundle-container-1.0.0-10
-
?
-
?
-
None
-
-
-
Important
As can be seen in this log, FailedPreStopHook happens when PreStop is executed:
83m Warning FailedPreStopHook pod/ovn-controller-8l9nn Exec lifecycle hook ([/usr/share/openvswitch/scripts/ovs-ctl stop --no-ovsdb-server ; sleep 2]) for Container "ovs-vswitchd" in Pod "ovn-controller-8l9nn_openstack(b628dbe7-4d26-4cc5-8027-7051f996aa6e)" failed - error: command '/usr/share/openvswitch/scripts/ovs-ctl stop --no-ovsdb-server ; sleep 2' exited with 1: /usr/share/openvswitch/scripts/ovs-ctl: exactly one non-option argument required (use --help for help)... 83m Warning FailedPreStopHook pod/ovn-controller-8l9nn Exec lifecycle hook ([/usr/share/openvswitch/scripts/ovs-ctl stop --no-ovs-vswitchd ; sleep 2]) for Container "ovsdb-server" in Pod "ovn-controller-8l9nn_openstack(b628dbe7-4d26-4cc5-8027-7051f996aa6e)" failed - error: command '/usr/share/openvswitch/scripts/ovs-ctl stop --no-ovs-vswitchd ; sleep 2' exited with 1: /usr/share/openvswitch/scripts/ovs-ctl: exactly one non-option argument required (use --help for help)... 83m Warning FailedPreStopHook pod/ovn-controller-8l9nn Exec lifecycle hook ([/usr/share/ovn/scripts/ovn-ctl stop_controller ; sleep 2]) for Container "ovn-controller" in Pod "ovn-controller-8l9nn_openstack(b628dbe7-4d26-4cc5-8027-7051f996aa6e)" failed - error: command '/usr/share/ovn/scripts/ovn-ctl stop_controller ; sleep 2' exited with 1: /usr/share/ovn/scripts/ovn-ctl: exactly one non-option argument required (use --help for help)...
This is because the command contains `; sleep 2` at the end, which implies that the command is a shell script, not a direct call to an executable; so the command should include bash or other shell as part of the invocation.
The result of this mistake is - probably - that the service is not properly informed about the stoppage, which will make the container not die on time, which will take a longer time for OVN controller to stop / restart on upgrade or for other reasons.