From bbb6b0c2409278a4c9266c39bd1f5d91f7066bb8 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Fri, 25 Jan 2019 00:29:42 +0000 Subject: [PATCH] Fix version comparison for SUSE Linux Enterprise 12 The version comparison introduced in I5152f2585c3d4d18853988d6290039d6b1713b99 was broken, because it tried to use bash's -lt operator for floating point comparison, but bash only supports integer arithmetic. So instead use devstack's vercmp() function. Change-Id: I8aac71c5bb6c2e82479d62831ea0672ba6a9a534 --- lib/neutron_plugins/ovs_base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/neutron_plugins/ovs_base b/lib/neutron_plugins/ovs_base index 523024e2fe..fbe4c92139 100644 --- a/lib/neutron_plugins/ovs_base +++ b/lib/neutron_plugins/ovs_base @@ -69,7 +69,7 @@ function _neutron_ovs_base_install_agent_packages { restart_service openvswitch sudo systemctl enable openvswitch elif is_suse; then - if [[ $DISTRO == "sle12" ]] && [[ $os_RELEASE -lt 12.2 ]]; then + if [[ $DISTRO == "sle12" ]] && vercmp "$os_RELEASE" "<" "12.2" ; then restart_service openvswitch-switch else # workaround for https://bugzilla.suse.com/show_bug.cgi?id=1085971