network.dpdk: ovs-vswitchd alternative inversion
By default, the alternative installed by `openvswitch-switch`
packages shadows (higher prio) `openvswitch-switch-dpdk` version,
e.g. for UCA Pike packages:
$ update-alternatives --query ovs-vswitchd
Alternative: /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk
Priority: 50
Alternative: /usr/lib/openvswitch-switch/ovs-vswitchd
Priority: 100
To avoid confusion, when DPDK is enabled and ovs-vswitchd-dpdk
should be used, remove the alternative for classic ovs-vswitchd
(which can easily be re-eneabled later if needed).
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
diff --git a/linux/network/dpdk.sls b/linux/network/dpdk.sls
index 97a81b5..573ce8c 100644
--- a/linux/network/dpdk.sls
+++ b/linux/network/dpdk.sls
@@ -73,6 +73,15 @@
{%- endfor %}
+openvswitch_dpdk_ovs_alternative:
+ alternatives.remove:
+ - name: ovs-vswitchd
+ - path: /usr/lib/openvswitch-switch/ovs-vswitchd
+ - require:
+ - pkg: openvswitch_dpdk_pkgs
+ - watch_in:
+ - service: service_openvswitch
+
service_openvswitch:
service.running:
- name: openvswitch-switch