Skip to content

Commit

Permalink
Linstor: Sync with packaging changes on 8.2 (#60)
Browse files Browse the repository at this point in the history
* %preun: Move command above exit 0 so that it's executed
* Properly disable the removed sr_health_check.timer
Also remove the dangling symlink if still present due to improper
removal of the timer in sm-2.30.8-12.2

Signed-off-by: Samuel Verschelde <[email protected]>
Signed-off-by: Damien Thenot <[email protected]>
Co-authored-by: Samuel Verschelde <[email protected]>
  • Loading branch information
Nambrok and stormi authored Aug 30, 2024
1 parent 7c0721c commit 256a1d9
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions SPECS/sm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Summary: sm - XCP storage managers
Name: sm
Version: 2.30.8
Release: %{?xsrel}.2.0.linstor.1%{?dist}
Release: %{?xsrel}.3.0.linstor.1%{?dist}
Group: System/Hypervisor
License: LGPL
URL: https://github.com/xapi-project/sm
Expand Down Expand Up @@ -331,6 +331,21 @@ if [ $1 -gt 1 ]; then
multipathd reconfigure
fi

if [ $1 -gt 1 ]; then
# XCP-ng: we temporarily removed sr_health_check.timer,
# so we need to disable and stop it if it is present on the system
TIMER_LINK=/etc/systemd/system/timers.target.wants/sr_health_check.timer
if [ -e "$TIMER_LINK" ]; then
systemctl --no-reload disable sr_health_check.timer 2>&1 || :
systemctl stop sr_health_check.timer 2>&1 || :
elif [ -L "$TIMER_LINK" ]; then
# Remove dangling symlink left by previous build that removed
# the timer without disabling it first.
rm -f "$TIMER_LINK"
systemctl reset-failed sr_health_check.timer
fi
fi

%preun
%systemd_preun make-dummy-sr.service
%systemd_preun mpcount.service
Expand All @@ -345,11 +360,12 @@ fi
if [ $1 -eq 0 ] ; then
update-alternatives --remove multipath.conf /etc/multipath.xenserver/multipath.conf
fi
exit 0

# XCP-ng
%systemd_preun linstor-monitor.service

exit 0

%postun
%systemd_postun make-dummy-sr.service
%systemd_postun mpcount.service
Expand Down Expand Up @@ -676,6 +692,14 @@ cp -r htmlcov %{buildroot}/htmlcov
%{_unitdir}/linstor-monitor.service

%changelog
* Fri Aug 30 2024 Damien Thenot <[email protected]> - 2.30.8-12.3.0.linstor.1
- Sync with packaging changes in 8.2
- * Mon Aug 19 2024 Samuel Verschelde <[email protected]> - 2.30.8-12.3
- - %%preun: Move command above exit 0 so that it's executed
- - Properly disable the removed sr_health_check.timer
- - Also remove the dangling symlink if still present due to improper removal
- of the timer in sm-2.30.8-12.2

* Tue Aug 06 2024 Damien Thenot <[email protected]> - 2.30.8-12.2.0.linstor.1
- Sync patches with latest 2.30.8-8.2
- *** 8.2 release changelog ***
Expand Down

0 comments on commit 256a1d9

Please sign in to comment.