!651 iSulad: keep the service status unchanged after iSulad service upgrade
* iSulad: keep the service status unchanged after iSulad service upgrade
This commit is contained in:
parent
befbc1e7c7
commit
ec62a45688
16
iSulad.spec
16
iSulad.spec
@ -1,5 +1,5 @@
|
|||||||
%global _version 2.1.4
|
%global _version 2.1.4
|
||||||
%global _release 4
|
%global _release 5
|
||||||
%global is_systemd 1
|
%global is_systemd 1
|
||||||
%global enable_criv1 1
|
%global enable_criv1 1
|
||||||
%global enable_shimv2 1
|
%global enable_shimv2 1
|
||||||
@ -268,11 +268,15 @@ if [ -e %{_unitdir}/lcrd.service.rpmsave ]; then
|
|||||||
mv %{_unitdir}/lcrd.service.rpmsave %{_unitdir}/isulad.service
|
mv %{_unitdir}/lcrd.service.rpmsave %{_unitdir}/isulad.service
|
||||||
sed -i 's/lcrd/isulad/g' %{_unitdir}/isulad.service
|
sed -i 's/lcrd/isulad/g' %{_unitdir}/isulad.service
|
||||||
fi
|
fi
|
||||||
|
# During the isulad upgrade process, the isulad service may still be running, but the service may be unavailable
|
||||||
|
# due to configuration updates and other reasons.
|
||||||
|
# it may fail if the X package is upgraded synchronously with isulad and depends on the isulad command,
|
||||||
|
# For example syscontianer-tools and lxcfs-tools.
|
||||||
|
# Therefore, after upgrading isulad, if the original status of isulad is running,
|
||||||
|
# we need to restart isulad to ensure that the service is available during the upgrade process.
|
||||||
systemctl status isulad | grep 'Active:' | grep 'running'
|
systemctl status isulad | grep 'Active:' | grep 'running'
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
systemctl restart isulad
|
systemctl restart isulad
|
||||||
else
|
|
||||||
systemctl start isulad
|
|
||||||
fi
|
fi
|
||||||
%else
|
%else
|
||||||
/sbin/service isulad status | grep 'Active:' | grep 'running'
|
/sbin/service isulad status | grep 'Active:' | grep 'running'
|
||||||
@ -337,6 +341,12 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Dec 29 2023 yangjiaqi <yangjiaqi16@huawei.com> - 2.1.4-5
|
||||||
|
- Type: bugfix
|
||||||
|
- ID: NA
|
||||||
|
- SUG: NA
|
||||||
|
- DESC: keep the service status unchanged after iSulad service upgrade
|
||||||
|
|
||||||
* Thu Dec 28 2023 leizhongkai <leizhongkai@huawei.com> - 2.1.4-4
|
* Thu Dec 28 2023 leizhongkai <leizhongkai@huawei.com> - 2.1.4-4
|
||||||
- Type: bugfix
|
- Type: bugfix
|
||||||
- ID: NA
|
- ID: NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user