neutron: Use update-alternatives --display instead of --query

--query is not supported before update-alternatives 1.15
and CentOS uses 1.13

Closes-Bug: #1936947
Change-Id: I78da7eb2b6b5eae2b04fd95b24615bd4a572a1d6
This commit is contained in:
Michal Nasiadka 2021-10-28 09:17:17 +02:00
parent 4b3ad066d1
commit 2d1bbe7257
2 changed files with 7 additions and 1 deletions

View File

@ -13,7 +13,8 @@ else
fi
# set legacy iptables to allow kernels not supporting iptables-nft
if $UPDATE_ALTERNATIVES --query iptables; then
# CentOS has update-alternatives 1.13, so use --display (not --query)
if $UPDATE_ALTERNATIVES --display iptables; then
# NOTE(yoctozepto): Kolla-Ansible does not always set KOLLA_LEGACY_IPTABLES;
# the workaround below ensures it gets set to `false` in such cases to fix
# this code under `set -o nounset`.

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes wrong update-alternatives usage on CentOS.
`LP#1936947 <https://launchpad.net/bugs/1936947>`__