Merge "[devstack] Ensure downgrade_dnsmasq is idempotent"
This commit is contained in:
@@ -3516,12 +3516,19 @@ function downgrade_dnsmasq {
|
|||||||
# NOTE(TheJulia): The intent here is to use dnsmasq version
|
# NOTE(TheJulia): The intent here is to use dnsmasq version
|
||||||
# which does not crash on segfaults or sigabort when configuration
|
# which does not crash on segfaults or sigabort when configuration
|
||||||
# is updated. See https://bugs.launchpad.net/ironic/+bug/2026757
|
# is updated. See https://bugs.launchpad.net/ironic/+bug/2026757
|
||||||
sudo dpkg -r dnsmasq-base
|
if dnsmasq --version | grep -q "Dnsmasq version 2.85"; then
|
||||||
git clone http://thekelleys.org.uk/git/dnsmasq.git -b v2.85 --depth 1
|
# NOTE(JayF) Keep Ironic devstack plugin idempotent by skipping
|
||||||
pushd dnsmasq
|
# downgrade if we already have the desired version.
|
||||||
sed -i 's|^PREFIX.*|PREFIX = /usr|' Makefile
|
echo "Dnsmasq already downgraded, continuing..."
|
||||||
sudo make install
|
else
|
||||||
popd
|
echo "Downgrading dnsmasq..."
|
||||||
|
sudo dpkg -r dnsmasq-base
|
||||||
|
git clone http://thekelleys.org.uk/git/dnsmasq.git -b v2.85 --depth 1
|
||||||
|
pushd dnsmasq
|
||||||
|
sed -i 's|^PREFIX.*|PREFIX = /usr|' Makefile
|
||||||
|
sudo make install
|
||||||
|
popd
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Restore xtrace + pipefail
|
# Restore xtrace + pipefail
|
||||||
|
|||||||
Reference in New Issue
Block a user