From 279d088e0739936685e92778afacdababf35bc07 Mon Sep 17 00:00:00 2001 From: ernjvr Date: Fri, 6 Apr 2018 09:00:05 +0200 Subject: [PATCH 1/3] Remove deprecated tomcat configuration file instead of moving it, since moving it prevented the 4.11 upgrade from overwriting it with the new jetty configurations. Also added systemctl daemon-reload to refresh daemon services so that management server can start up seamlessly after the upgrade. --- packaging/centos7/cloud.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packaging/centos7/cloud.spec b/packaging/centos7/cloud.spec index 6ed36915ac93..525421c0108d 100644 --- a/packaging/centos7/cloud.spec +++ b/packaging/centos7/cloud.spec @@ -398,11 +398,13 @@ if [ ! -f %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util fi if [ -f %{_sysconfdir}/sysconfig/%{name}-management ] ; then - mv %{_sysconfdir}/sysconfig/%{name}-management %{_sysconfdir}/default/%{name}-management + rm -f %{_sysconfdir}/sysconfig/%{name}-management fi chown -R cloud:cloud /var/log/cloudstack/management +systemctl daemon-reload + %preun agent /sbin/service cloudstack-agent stop || true if [ "$1" == "0" ] ; then From 404850d358f75b9d243c3f2ebf16cb4ba81a38b9 Mon Sep 17 00:00:00 2001 From: ernjvr Date: Mon, 9 Apr 2018 10:17:31 +0200 Subject: [PATCH 2/3] Remove deprecated tomcat configuration file and reload daemon services for centos6 spec? --- packaging/centos63/cloud.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index 062e511966eb..88ddcdd065cb 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -454,8 +454,14 @@ if [ -f "%{_sysconfdir}/cloud.rpmsave/management/db.properties" ]; then mv %{_sysconfdir}/cloud.rpmsave/management/db.properties %{_sysconfdir}/cloud.rpmsave/management/db.properties.rpmsave fi +if [ -f %{_sysconfdir}/sysconfig/%{name}-management ] ; then + rm -f %{_sysconfdir}/sysconfig/%{name}-management +fi + chown -R cloud:cloud /var/log/cloudstack/management +systemctl daemon-reload + %preun agent /sbin/service cloudstack-agent stop || true if [ "$1" == "0" ] ; then From b833087d6841609c17dabff041794a07c52228bf Mon Sep 17 00:00:00 2001 From: ernjvr Date: Mon, 9 Apr 2018 14:38:01 +0200 Subject: [PATCH 3/3] revert 'systemctl daemon-reload' as CentOS6/el6 does not have systemd? --- packaging/centos63/cloud.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index 88ddcdd065cb..87d2c1ec5780 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -460,8 +460,6 @@ fi chown -R cloud:cloud /var/log/cloudstack/management -systemctl daemon-reload - %preun agent /sbin/service cloudstack-agent stop || true if [ "$1" == "0" ] ; then