Skip to content

Commit ffddd6d

Browse files
committed
Merge remote-tracking branch 'origin/4.9' into 4.10
2 parents de7e241 + 449ff97 commit ffddd6d

6 files changed

Lines changed: 29 additions & 26 deletions

File tree

api/src/org/apache/cloudstack/api/response/ClusterResponse.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@ public void setResourceDetails(Map<String, String> details) {
208208
if (details == null) {
209209
return;
210210
}
211-
this.resourceDetails = new HashMap<>(details);
211+
resourceDetails = new HashMap<>(details);
212+
if (resourceDetails.containsKey("username")) {
213+
resourceDetails.remove("username");
214+
}
215+
if (resourceDetails.containsKey("password")) {
216+
resourceDetails.remove("password");
217+
}
212218
}
213219
}

packaging/centos63/cloud.spec

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,8 @@ if [ "$1" == "2" ] ; then
435435
fi
436436

437437
%post management
438-
if [ "$1" == "1" ] ; then
439-
/sbin/chkconfig --add cloudstack-management > /dev/null 2>&1 || true
440-
/sbin/chkconfig --level 345 cloudstack-management on > /dev/null 2>&1 || true
441-
fi
438+
/sbin/chkconfig --add cloudstack-management > /dev/null 2>&1 || true
439+
/sbin/chkconfig --level 345 cloudstack-management on > /dev/null 2>&1 || true
442440

443441
grep -s -q "db.cloud.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.cloud.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties"
444442
grep -s -q "db.usage.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.usage.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties"
@@ -523,18 +521,19 @@ if [ -d "%{_sysconfdir}/cloud" ] ; then
523521
fi
524522

525523
%post agent
526-
if [ "$1" == "1" ] ; then
524+
if [ "$1" == "2" ] ; then
527525
echo "Running %{_bindir}/%{name}-agent-upgrade to update bridge name for upgrade from CloudStack 4.0.x (and before) to CloudStack 4.1 (and later)"
528526
%{_bindir}/%{name}-agent-upgrade
529-
if [ ! -d %{_sysconfdir}/libvirt/hooks ] ; then
530-
mkdir %{_sysconfdir}/libvirt/hooks
531-
fi
532-
cp -a ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib/libvirtqemuhook %{_sysconfdir}/libvirt/hooks/qemu
533-
/sbin/service libvirtd restart
534-
/sbin/chkconfig --add cloudstack-agent > /dev/null 2>&1 || true
535-
/sbin/chkconfig --level 345 cloudstack-agent on > /dev/null 2>&1 || true
536527
fi
537528

529+
if [ ! -d %{_sysconfdir}/libvirt/hooks ] ; then
530+
mkdir %{_sysconfdir}/libvirt/hooks
531+
fi
532+
cp -a ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib/libvirtqemuhook %{_sysconfdir}/libvirt/hooks/qemu
533+
/sbin/service libvirtd restart
534+
/sbin/chkconfig --add cloudstack-agent > /dev/null 2>&1 || true
535+
/sbin/chkconfig --level 345 cloudstack-agent on > /dev/null 2>&1 || true
536+
538537
# if saved configs from upgrade exist, copy them over
539538
if [ -f "%{_sysconfdir}/cloud.rpmsave/agent/agent.properties" ]; then
540539
mv %{_sysconfdir}/%{name}/agent/agent.properties %{_sysconfdir}/%{name}/agent/agent.properties.rpmnew

packaging/centos7/cloud.spec

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,7 @@ if [ "$1" == "2" ] ; then
393393
fi
394394

395395
%post management
396-
if [ "$1" == "1" ] ; then
397-
/usr/bin/systemctl on cloudstack-management > /dev/null 2>&1 || true
398-
fi
396+
/usr/bin/systemctl on cloudstack-management > /dev/null 2>&1 || true
399397

400398
grep -s -q "db.cloud.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.cloud.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties"
401399
grep -s -q "db.usage.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.usage.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties"
@@ -425,16 +423,16 @@ if [ -d "%{_sysconfdir}/cloud" ] ; then
425423
fi
426424

427425
%post agent
428-
if [ "$1" == "1" ] ; then
426+
if [ "$1" == "2" ] ; then
429427
echo "Running %{_bindir}/%{name}-agent-upgrade to update bridge name for upgrade from CloudStack 4.0.x (and before) to CloudStack 4.1 (and later)"
430428
%{_bindir}/%{name}-agent-upgrade
431-
if [ ! -d %{_sysconfdir}/libvirt/hooks ] ; then
432-
mkdir %{_sysconfdir}/libvirt/hooks
433-
fi
434-
cp -a ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib/libvirtqemuhook %{_sysconfdir}/libvirt/hooks/qemu
435-
/sbin/service libvirtd restart
436-
/sbin/systemctl enable cloudstack-agent > /dev/null 2>&1 || true
437429
fi
430+
if [ ! -d %{_sysconfdir}/libvirt/hooks ] ; then
431+
mkdir %{_sysconfdir}/libvirt/hooks
432+
fi
433+
cp -a ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib/libvirtqemuhook %{_sysconfdir}/libvirt/hooks/qemu
434+
/sbin/service libvirtd restart
435+
/sbin/systemctl enable cloudstack-agent > /dev/null 2>&1 || true
438436

439437
# if saved configs from upgrade exist, copy them over
440438
if [ -f "%{_sysconfdir}/cloud.rpmsave/agent/agent.properties" ]; then

systemvm/patches/debian/config/opt/cloud/bin/configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def add_rule(self):
150150
" -A FIREWALL_%s" % self.ip +
151151
" -s %s " % cidr +
152152
" -p %s " % rule['protocol'] +
153-
" %s -j RETURN" % rnge])
153+
" %s -j %s" % (rnge, self.rule['action'])])
154154

155155
sflag=False
156156
dflag=False

systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ def fw_router(self):
384384
self.fw.append(["mangle", "",
385385
"-A FIREWALL_%s -j DROP" % self.address['public_ip']])
386386
self.fw.append(["mangle", "",
387-
"-A VPN_%s -m state --state RELATED,ESTABLISHED -j ACCEPT" % self.address['public_ip']])
387+
"-I VPN_%s -m state --state RELATED,ESTABLISHED -j ACCEPT" % self.address['public_ip']])
388388
self.fw.append(["mangle", "",
389389
"-A VPN_%s -j RETURN" % self.address['public_ip']])
390390
self.fw.append(["nat", "",

systemvm/patches/debian/config/opt/cloud/bin/cs/CsRoute.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def add_network_route(self, dev, address):
6363
table = self.get_tablename(dev)
6464
logging.info("Adding route: dev " + dev + " table: " +
6565
table + " network: " + address + " if not present")
66-
cmd = "dev %s table %s %s" % (dev, table, address)
66+
cmd = "dev %s table %s throw %s proto static" % (dev, table, address)
6767
self.set_route(cmd)
6868

6969
def set_route(self, cmd, method="add"):

0 commit comments

Comments
 (0)