Remove support for nova-local lvm backend for compute hosts
This story tracks the removal of the nova-local lvm backend for compute hosts. The lvm backend is no longer required; nova-local storage will continue to support settings of "image" or "remote" backends. This story will remove custom code related to lvm nova-local storage: - nova-clean-thinpool service and init script is removed DocImpact Story: 2004427 Task: 28085 Depends-On: https://review.openstack.org/620179 Change-Id: I28469730f959e000d39e46d13f4c68c2e967153b Signed-off-by: Jim Gauld <james.gauld@windriver.com>
This commit is contained in:
parent
916c5b1df4
commit
3710ebe7ff
|
@ -1,13 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Clean nova-local thinpool
|
|
||||||
Before=computeconfig.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
RemainAfterExit=yes
|
|
||||||
User=root
|
|
||||||
ExecStart=/usr/bin/nova_clean_thinpool start
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
|
|
|
@ -65,8 +65,6 @@ Source62: nova-purge-deleted-active
|
||||||
Source63: nova_setup_cpusets
|
Source63: nova_setup_cpusets
|
||||||
Source64: openstack-nova-compute-setup.service
|
Source64: openstack-nova-compute-setup.service
|
||||||
Source65: nova-compute.init
|
Source65: nova-compute.init
|
||||||
Source66: nova_clean_thinpool
|
|
||||||
Source67: nova-clean-thinpool.service
|
|
||||||
Source68: nova-restart
|
Source68: nova-restart
|
||||||
Source69: kvm_timer_advance_setup.service
|
Source69: kvm_timer_advance_setup.service
|
||||||
Source70: nova_setup_timer_advance
|
Source70: nova_setup_timer_advance
|
||||||
|
@ -586,7 +584,6 @@ install -p -D -m 644 %{SOURCE29} %{buildroot}%{_unitdir}/openstack-nova-novncpro
|
||||||
install -p -D -m 644 %{SOURCE31} %{buildroot}%{_unitdir}/openstack-nova-serialproxy.service
|
install -p -D -m 644 %{SOURCE31} %{buildroot}%{_unitdir}/openstack-nova-serialproxy.service
|
||||||
install -p -D -m 644 %{SOURCE32} %{buildroot}%{_unitdir}/openstack-nova-os-compute-api.service
|
install -p -D -m 644 %{SOURCE32} %{buildroot}%{_unitdir}/openstack-nova-os-compute-api.service
|
||||||
install -p -D -m 644 %{SOURCE64} %{buildroot}%{_unitdir}/openstack-nova-compute-setup.service
|
install -p -D -m 644 %{SOURCE64} %{buildroot}%{_unitdir}/openstack-nova-compute-setup.service
|
||||||
install -p -D -m 644 %{SOURCE67} %{buildroot}%{_unitdir}/nova-clean-thinpool.service
|
|
||||||
install -p -D -m 644 %{SOURCE69} %{buildroot}%{_unitdir}/kvm_timer_advance_setup.service
|
install -p -D -m 644 %{SOURCE69} %{buildroot}%{_unitdir}/kvm_timer_advance_setup.service
|
||||||
|
|
||||||
# Install sudoers
|
# Install sudoers
|
||||||
|
@ -627,7 +624,6 @@ install -p -D -m 755 %{SOURCE60} %{buildroot}%{_bindir}/nova_authorized_cmds
|
||||||
install -p -D -m 755 %{SOURCE62} %{buildroot}%{_bindir}/nova-purge-deleted-active
|
install -p -D -m 755 %{SOURCE62} %{buildroot}%{_bindir}/nova-purge-deleted-active
|
||||||
install -p -D -m 755 %{SOURCE63} %{buildroot}%{_bindir}/d_nova_setup_cpusets
|
install -p -D -m 755 %{SOURCE63} %{buildroot}%{_bindir}/d_nova_setup_cpusets
|
||||||
install -p -D -m 755 %{SOURCE65} %{buildroot}%{_sysconfdir}/rc.d/init.d/nova-compute
|
install -p -D -m 755 %{SOURCE65} %{buildroot}%{_sysconfdir}/rc.d/init.d/nova-compute
|
||||||
install -p -D -m 755 %{SOURCE66} %{buildroot}%{_bindir}/nova_clean_thinpool
|
|
||||||
install -p -D -m 755 %{SOURCE68} %{buildroot}%{_bindir}/nova-restart
|
install -p -D -m 755 %{SOURCE68} %{buildroot}%{_bindir}/nova-restart
|
||||||
install -p -D -m 755 %{SOURCE70} %{buildroot}%{_bindir}/nova_setup_timer_advance
|
install -p -D -m 755 %{SOURCE70} %{buildroot}%{_bindir}/nova_setup_timer_advance
|
||||||
install -p -D -m 755 %{SOURCE71} %{buildroot}%{_bindir}/nova-pci-interrupts
|
install -p -D -m 755 %{SOURCE71} %{buildroot}%{_bindir}/nova-pci-interrupts
|
||||||
|
@ -685,7 +681,6 @@ exit 0
|
||||||
%post compute
|
%post compute
|
||||||
%systemd_post %{name}-compute.service
|
%systemd_post %{name}-compute.service
|
||||||
/usr/bin/systemctl enable %{name}-compute-setup.service
|
/usr/bin/systemctl enable %{name}-compute-setup.service
|
||||||
/usr/bin/systemctl enable nova-clean-thinpool.service
|
|
||||||
/usr/bin/systemctl enable kvm_timer_advance_setup.service
|
/usr/bin/systemctl enable kvm_timer_advance_setup.service
|
||||||
%post network
|
%post network
|
||||||
%systemd_post %{name}-network.service
|
%systemd_post %{name}-network.service
|
||||||
|
@ -710,7 +705,6 @@ exit 0
|
||||||
%systemd_preun %{name}-compute.service
|
%systemd_preun %{name}-compute.service
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
# Package removal, not upgrade
|
# Package removal, not upgrade
|
||||||
/usr/bin/systemctl disable nova-clean-thinpool.service
|
|
||||||
/usr/bin/systemctl disable %{name}-compute-setup.service
|
/usr/bin/systemctl disable %{name}-compute-setup.service
|
||||||
/usr/bin/systemctl disable kvm_timer_advance_setup.service
|
/usr/bin/systemctl disable kvm_timer_advance_setup.service
|
||||||
fi
|
fi
|
||||||
|
@ -798,11 +792,9 @@ fi
|
||||||
%{_unitdir}/nova-compute.service
|
%{_unitdir}/nova-compute.service
|
||||||
%{_datarootdir}/nova/rootwrap/compute.filters
|
%{_datarootdir}/nova/rootwrap/compute.filters
|
||||||
%{_bindir}/nova_authorized_cmds
|
%{_bindir}/nova_authorized_cmds
|
||||||
%{_unitdir}/nova-clean-thinpool.service
|
|
||||||
%{_unitdir}/openstack-nova-compute-setup.service
|
%{_unitdir}/openstack-nova-compute-setup.service
|
||||||
%{_bindir}/d_nova_setup_cpusets
|
%{_bindir}/d_nova_setup_cpusets
|
||||||
%{_sysconfdir}/rc.d/init.d/nova-compute
|
%{_sysconfdir}/rc.d/init.d/nova-compute
|
||||||
%{_bindir}/nova_clean_thinpool
|
|
||||||
%{_unitdir}/kvm_timer_advance_setup.service
|
%{_unitdir}/kvm_timer_advance_setup.service
|
||||||
%{_bindir}/nova_setup_timer_advance
|
%{_bindir}/nova_setup_timer_advance
|
||||||
%{_bindir}/nova-pci-interrupts
|
%{_bindir}/nova-pci-interrupts
|
||||||
|
|
|
@ -1,66 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Copyright (c) 2016 Wind River Systems, Inc.
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
# This script is intended to clean up the LVM thin pool used by
|
|
||||||
# nova-compute. This is required so that packstack is free to resize the
|
|
||||||
# instances_lv volume or to switch between volume-backed or image-backed
|
|
||||||
# instance storage.
|
|
||||||
#
|
|
||||||
# It should only run on compute nodes, and it must be run before packstack.
|
|
||||||
|
|
||||||
errlog()
|
|
||||||
{
|
|
||||||
logger -t nova_clean_thinpool -p daemon.err "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
start()
|
|
||||||
{
|
|
||||||
# We expect this as the volume group
|
|
||||||
VOL_GROUP="nova-local"
|
|
||||||
|
|
||||||
# We expect this as the thin pool
|
|
||||||
THIN_POOL="nova-local-pool"
|
|
||||||
|
|
||||||
# Test if any volume is the thin pool
|
|
||||||
lvs -o lv_name --noheadings | grep -e $THIN_POOL
|
|
||||||
if [ $? -eq 0 ] ; then
|
|
||||||
# Now test if any volumes are in the thin pool
|
|
||||||
lvs -o pool_lv --noheadings | grep -e $THIN_POOL
|
|
||||||
if [ $? -ne 0 ] ; then
|
|
||||||
# Thin pool is present and empty, delete it.
|
|
||||||
lvremove -f ${VOL_GROUP}/$THIN_POOL
|
|
||||||
if [ $? -ne 0 ] ; then
|
|
||||||
errlog "Problem deleting ${VOL_GROUP}/$THIN_POOL"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
errlog "Not deleting $THIN_POOL because it's not empty."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
stop ()
|
|
||||||
{
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
stop
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {start|stop}"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
|
|
Loading…
Reference in New Issue