Skip to content

Commit 57ba367

Browse files
committed
CLOUDSTACK-5042: change cloud.keystore to cloudmanagementserver.keystore and install it (cherry picked from commit de448ec)
1 parent edf04a3 commit 57ba367

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
@@ -252,7 +252,7 @@ rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/cl
252252
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/vms
253253

254254
for name in db.properties log4j-cloud.xml tomcat6-nonssl.conf tomcat6-ssl.conf server-ssl.xml server-nonssl.xml \
255-
catalina.policy catalina.properties classpath.conf tomcat-users.xml web.xml environment.properties ; do
255+
catalina.policy catalina.properties classpath.conf tomcat-users.xml web.xml environment.properties cloudmanagementserver.keystore ; do
256256
mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/$name \
257257
${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
258258
done
@@ -450,6 +450,13 @@ else
450450
echo "Unable to determine ssl settings for tomcat.conf, please run cloudstack-setup-management manually"
451451
fi
452452

453+
if [ -f "%{_sysconfdir}/cloud.rpmsave/management/cloud.keystore" ]; then
454+
mv %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore.rpmnew
455+
cp -p %{_sysconfdir}/cloud.rpmsave/management/cloud.keystore %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore
456+
# make sure we only do this on the first install of this RPM, don't want to overwrite on a reinstall
457+
mv %{_sysconfdir}/cloud.rpmsave/management/cloud.keystore %{_sysconfdir}/cloud.rpmsave/management/cloud.keystore.rpmsave
458+
fi
459+
453460
%preun agent
454461
/sbin/service cloudstack-agent stop || true
455462
if [ "$1" == "0" ] ; then
@@ -539,6 +546,7 @@ fi
539546
%config(noreplace) %{_sysconfdir}/%{name}/management/cloud-bridge.properties
540547
%config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties
541548
%config(noreplace) %{_sysconfdir}/%{name}/management/ec2-service.properties
549+
%config(noreplace) %{_sysconfdir}/%{name}/management/cloudmanagementserver.keystore
542550
%attr(0755,root,root) %{_initrddir}/%{name}-management
543551
%attr(0755,root,root) %{_bindir}/%{name}-setup-management
544552
%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
@@ -584,7 +584,7 @@ protected void updateSSLKeystore() {
584584
File confFile = PropertiesUtil.findConfigFile("db.properties");
585585
/* This line may throw a NPE, but that's due to fail to find db.properities, meant some bugs in the other places */
586586
String confPath = confFile.getParent();
587-
String keystorePath = confPath + "/cloud.keystore";
587+
String keystorePath = confPath + "/cloudmanagementserver.keystore";
588588
File keystoreFile = new File(keystorePath);
589589
boolean dbExisted = (dbString != null && !dbString.isEmpty());
590590

0 commit comments

Comments
 (0)