Github user ustcweizhou commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1916#discussion_r97645697 --- Diff: debian/cloudstack-management.postinst --- @@ -60,7 +60,26 @@ if [ "$1" = configure ]; then chmod 0640 ${CONFDIR}/${DBPROPS} chgrp cloud ${CONFDIR}/${DBPROPS} - invoke-rc.d tomcat6 stop || true + + if [ -d "/usr/share/tomcat7" ]; then + rm -f /usr/share/cloudstack-management/bin + rm -f /usr/share/cloudstack-management/lib + ln -s /usr/share/tomcat7/bin /usr/share/cloudstack-management/bin + ln -s /usr/share/tomcat7/lib /usr/share/cloudstack-management/lib + invoke-rc.d tomcat7 stop || true + if [ ! -f "/etc/cloudstack/management/server.xml" ]; then + ln -s /etc/cloudstack/management/server7-nonssl.xml /etc/cloudstack/management/server.xml + fi + elif [ -d "/usr/share/tomcat6" ]; then + rm -f /usr/share/cloudstack-management/bin + rm -f /usr/share/cloudstack-management/lib + ln -s /usr/share/tomcat6/bin /usr/share/cloudstack-management/bin + ln -s /usr/share/tomcat6/lib /usr/share/cloudstack-management/lib + invoke-rc.d tomcat6 stop || true + if [ ! -f "/etc/cloudstack/management/server.xml" ]; then + ln -s /etc/cloudstack/management/server-nonssl.xml /etc/cloudstack/management/server.xml + fi + fi --- End diff -- @wido I was thinking of other ways but could not find. Do you have any idea? We can remove this change and ask users to execute "cloudstack-setup-management --tomcat7" after each upgrade. It seems not wise. I have tested the upgrade from 4.7.1 to 4.9.3.0-SNAPSHOT on ubuntu 12.04 and 16.04 without any issue. I did not test the os upgrade or tomcat upgrade.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---