Skip to content

Commit 860097c

Browse files
authored
Merge branch 'apache:main' into main
2 parents 31addad + cb67da5 commit 860097c

File tree

10 files changed

+30
-25
lines changed

10 files changed

+30
-25
lines changed

core/src/main/java/com/cloud/info/ConsoleProxyInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public ConsoleProxyInfo(boolean sslEnabled, String proxyIpAddress, int port, int
4646
}
4747

4848
} else {
49-
proxyImageUrl = "http://" + proxyAddress;
49+
proxyImageUrl = "//" + proxyAddress;
5050
if (proxyUrlPort != 80) {
5151
proxyImageUrl += ":" + proxyUrlPort;
5252
}

core/src/test/java/com/cloud/info/ConsoleProxyInfoTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020
package com.cloud.info;
2121

22-
import org.junit.Test;
23-
2422
import static org.junit.Assert.assertEquals;
2523

24+
import org.junit.Test;
25+
2626
public class ConsoleProxyInfoTest {
2727

2828
@Test
@@ -35,7 +35,7 @@ public void testGetProxyImageUrlHttps() {
3535
public void testGetProxyImageUrlHttp() {
3636
ConsoleProxyInfo cpi = new ConsoleProxyInfo(false, "10.10.10.10", 80, 80 , "console.example.com");
3737
String url = cpi.getProxyImageUrl();
38-
assertEquals("http://console.example.com", url);
38+
assertEquals("//console.example.com", url);
3939
}
4040
@Test
4141
public void testGetProxyImageUrlWildcardHttps() {
@@ -47,13 +47,13 @@ public void testGetProxyImageUrlWildcardHttps() {
4747
public void testGetProxyImageUrlWildcardHttp() {
4848
ConsoleProxyInfo cpi = new ConsoleProxyInfo(false, "1.2.3.4", 80, 8888 , "*.example.com");
4949
String url = cpi.getProxyImageUrl();
50-
assertEquals("http://1-2-3-4.example.com:8888", url);
50+
assertEquals("//1-2-3-4.example.com:8888", url);
5151
}
5252
@Test
5353
public void testGetProxyImageUrlIpHttp() {
5454
ConsoleProxyInfo cpi = new ConsoleProxyInfo(false, "1.2.3.4", 80, 8888, "");
5555
String url = cpi.getProxyImageUrl();
56-
assertEquals("http://1.2.3.4:8888", url);
56+
assertEquals("//1.2.3.4:8888", url);
5757
}
5858
@Test
5959
public void testGetProxyImageUrlIpHttps() {

plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node-add.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ write_files:
9393
### Binaries available offline ###
9494
echo "Installing binaries from ${BINARIES_DIR}"
9595
mkdir -p /opt/cni/bin
96-
tar -f "${BINARIES_DIR}/cni/cni-plugins-amd64.tgz" -C /opt/cni/bin -xz
96+
tar -f "${BINARIES_DIR}/cni/cni-plugins-"*64.tgz -C /opt/cni/bin -xz
9797
9898
mkdir -p /opt/bin
99-
tar -f "${BINARIES_DIR}/cri-tools/crictl-linux-amd64.tar.gz" -C /opt/bin -xz
99+
tar -f "${BINARIES_DIR}/cri-tools/crictl-linux-"*64.tar.gz -C /opt/bin -xz
100100
101101
mkdir -p /opt/bin
102102
cd /opt/bin

plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-control-node.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ write_files:
113113
### Binaries available offline ###
114114
echo "Installing binaries from ${BINARIES_DIR}"
115115
mkdir -p /opt/cni/bin
116-
tar -f "${BINARIES_DIR}/cni/cni-plugins-amd64.tgz" -C /opt/cni/bin -xz
116+
tar -f "${BINARIES_DIR}/cni/cni-plugins-"*64.tgz -C /opt/cni/bin -xz
117117
118118
mkdir -p /opt/bin
119-
tar -f "${BINARIES_DIR}/cri-tools/crictl-linux-amd64.tar.gz" -C /opt/bin -xz
119+
tar -f "${BINARIES_DIR}/cri-tools/crictl-linux-"*64.tar.gz -C /opt/bin -xz
120120
121121
mkdir -p /opt/bin
122122
cd /opt/bin

plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-node.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ write_files:
9393
### Binaries available offline ###
9494
echo "Installing binaries from ${BINARIES_DIR}"
9595
mkdir -p /opt/cni/bin
96-
tar -f "${BINARIES_DIR}/cni/cni-plugins-amd64.tgz" -C /opt/cni/bin -xz
96+
tar -f "${BINARIES_DIR}/cni/cni-plugins-"*64.tgz -C /opt/cni/bin -xz
9797
9898
mkdir -p /opt/bin
99-
tar -f "${BINARIES_DIR}/cri-tools/crictl-linux-amd64.tar.gz" -C /opt/bin -xz
99+
tar -f "${BINARIES_DIR}/cri-tools/crictl-linux-"*64.tar.gz -C /opt/bin -xz
100100
101101
mkdir -p /opt/bin
102102
cd /opt/bin

plugins/integrations/kubernetes-service/src/main/resources/script/upgrade-kubernetes.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ if [ -d "$BINARIES_DIR" ]; then
107107
cp "${BINARIES_DIR}/autoscaler.yaml" /opt/autoscaler/autoscaler_tmpl.yaml
108108
fi
109109

110-
tar -f "${BINARIES_DIR}/cni/cni-plugins-amd64.tgz" -C /opt/cni/bin -xz
111-
tar -f "${BINARIES_DIR}/cri-tools/crictl-linux-amd64.tar.gz" -C /opt/bin -xz
110+
tar -f "${BINARIES_DIR}/cni/cni-plugins-"*64.tgz -C /opt/cni/bin -xz
111+
tar -f "${BINARIES_DIR}/cri-tools/crictl-linux-"*64.tar.gz -C /opt/bin -xz
112112

113113
if [ "${IS_MAIN_CONTROL}" == 'true' ]; then
114114
set +e

server/src/main/java/com/cloud/consoleproxy/AgentHookBase.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@
2121
import java.security.SecureRandom;
2222
import java.util.Date;
2323

24-
import org.apache.commons.codec.binary.Base64;
25-
import org.apache.log4j.Logger;
26-
27-
import com.google.gson.Gson;
28-
import com.google.gson.GsonBuilder;
29-
3024
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
3125
import org.apache.cloudstack.framework.security.keys.KeysManager;
3226
import org.apache.cloudstack.framework.security.keystore.KeystoreManager;
27+
import org.apache.commons.codec.binary.Base64;
28+
import org.apache.commons.lang3.StringUtils;
29+
import org.apache.log4j.Logger;
3330

3431
import com.cloud.agent.AgentManager;
3532
import com.cloud.agent.api.AgentControlAnswer;
@@ -54,6 +51,8 @@
5451
import com.cloud.utils.Ternary;
5552
import com.cloud.vm.VirtualMachine;
5653
import com.cloud.vm.dao.VMInstanceDao;
54+
import com.google.gson.Gson;
55+
import com.google.gson.GsonBuilder;
5756

5857
/**
5958
* Utility class to manage interactions with agent-based console access
@@ -198,12 +197,15 @@ public void startAgentHttpHandlerInVM(StartupProxyCommand startupCmd) {
198197
String storePassword = Base64.encodeBase64String(randomBytes);
199198

200199
byte[] ksBits = null;
200+
201201
String consoleProxyUrlDomain = _configDao.getValue(Config.ConsoleProxyUrlDomain.key());
202-
if (consoleProxyUrlDomain == null || consoleProxyUrlDomain.isEmpty()) {
203-
s_logger.debug("SSL is disabled for console proxy based on global config, skip loading certificates");
204-
} else {
202+
String consoleProxySslEnabled = _configDao.getValue("consoleproxy.sslEnabled");
203+
if (!StringUtils.isEmpty(consoleProxyUrlDomain) && !StringUtils.isEmpty(consoleProxySslEnabled)
204+
&& consoleProxySslEnabled.equalsIgnoreCase("true")) {
205205
ksBits = _ksMgr.getKeystoreBits(ConsoleProxyManager.CERTIFICATE_NAME, ConsoleProxyManager.CERTIFICATE_NAME, storePassword);
206206
//ks manager raises exception if ksBits are null, hence no need to explicltly handle the condition
207+
} else {
208+
s_logger.debug("SSL is disabled for console proxy. To enable SSL, please configure consoleproxy.sslEnabled and consoleproxy.url.domain global settings.");
207209
}
208210

209211
cmd = new StartConsoleProxyAgentHttpHandlerCommand(ksBits, storePassword);

ui/src/views/AutogenView.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,9 @@ export default {
11351135
})
11361136
}
11371137
}
1138+
if ('successMethod' in action) {
1139+
action.successMethod(this, result)
1140+
}
11381141
resolve(true)
11391142
},
11401143
errorMethod: () => {

ui/src/views/compute/MigrateVMStorage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export default {
176176
} else if (migrateApi === 'migrateSystemVm') {
177177
jobId = response.migratesystemvmresponse.jobid
178178
} else {
179-
jobId = response.migratevirtualmachine.jobid
179+
jobId = response.migratevirtualmachineresponse.jobid
180180
}
181181
this.$pollJob({
182182
title: `${this.$t('label.migrating')} ${this.resource.name}`,

ui/src/views/network/CreateSharedNetworkForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ export default {
761761
// IPv4 (end)
762762
763763
// IPv6 (begin)
764-
if (this.isValidTextValueForKey(values, 'ip4gateway')) {
764+
if (this.isValidTextValueForKey(values, 'ip6gateway')) {
765765
params.ip6gateway = values.ip6gateway
766766
}
767767
if (this.isValidTextValueForKey(values, 'routerip')) {

0 commit comments

Comments
 (0)