Skip to content

Commit de448ec

Browse files
committed
CLOUDSTACK-5042: change cloud.keystore to cloudmanagementserver.keystore and install it
1 parent 0227e00 commit de448ec

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

File renamed without changes.

debian/cloudstack-management.postinst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if [ "$1" = configure ]; then
3535

3636
OLDCONFDIR="/etc/cloud/management"
3737
NEWCONFDIR="/etc/cloudstack/management"
38-
CONFFILES="db.properties cloud.keystore key"
38+
CONFFILES="db.properties key"
3939

4040
# Copy old configuration so the admin doesn't have to do that
4141
# Only do so when we are installing for the first time
@@ -45,6 +45,9 @@ if [ "$1" = configure ]; then
4545
cp -a $OLDCONFDIR/$FILE $NEWCONFDIR/$FILE
4646
fi
4747
done
48+
if [ -f "$OLDCONFDIR/cloud.keystore" ]; then
49+
cp -a $OLDCONFDIR/cloud.keystore $NEWCONFDIR/cloudmanagementserver.keystore
50+
fi
4851
fi
4952

5053
chmod 0640 /etc/cloudstack/management/db.properties

packaging/centos63/cloud.spec

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/cl
266266
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/vms
267267

268268
for name in db.properties log4j-cloud.xml tomcat6-nonssl.conf tomcat6-ssl.conf server-ssl.xml server-nonssl.xml \
269-
catalina.policy catalina.properties classpath.conf tomcat-users.xml web.xml environment.properties ; do
269+
catalina.policy catalina.properties classpath.conf tomcat-users.xml web.xml environment.properties cloudmanagementserver.keystore ; do
270270
mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/$name \
271271
${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
272272
done
@@ -464,6 +464,13 @@ else
464464
echo "Unable to determine ssl settings for tomcat.conf, please run cloudstack-setup-management manually"
465465
fi
466466

467+
if [ -f "%{_sysconfdir}/cloud.rpmsave/management/cloud.keystore" ]; then
468+
mv %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore.rpmnew
469+
cp -p %{_sysconfdir}/cloud.rpmsave/management/cloud.keystore %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore
470+
# make sure we only do this on the first install of this RPM, don't want to overwrite on a reinstall
471+
mv %{_sysconfdir}/cloud.rpmsave/management/cloud.keystore %{_sysconfdir}/cloud.rpmsave/management/cloud.keystore.rpmsave
472+
fi
473+
467474
%preun agent
468475
/sbin/service cloudstack-agent stop || true
469476
if [ "$1" == "0" ] ; then
@@ -554,6 +561,7 @@ fi
554561
%config(noreplace) %{_sysconfdir}/%{name}/management/cloud-bridge.properties
555562
%config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties
556563
%config(noreplace) %{_sysconfdir}/%{name}/management/ec2-service.properties
564+
%config(noreplace) %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore
557565
%attr(0755,root,root) %{_initrddir}/%{name}-management
558566
%attr(0755,root,root) %{_bindir}/%{name}-setup-management
559567
%attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses

server/src/com/cloud/server/ConfigurationServerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ protected void updateSSLKeystore() {
587587
File confFile = PropertiesUtil.findConfigFile("db.properties");
588588
/* This line may throw a NPE, but that's due to fail to find db.properities, meant some bugs in the other places */
589589
String confPath = confFile.getParent();
590-
String keystorePath = confPath + "/cloud.keystore";
590+
String keystorePath = confPath + "/cloudmanagementserver.keystore";
591591
File keystoreFile = new File(keystorePath);
592592
boolean dbExisted = (dbString != null && !dbString.isEmpty());
593593

0 commit comments

Comments
 (0)