Skip to content

Commit a2323e1

Browse files
committed
Merge remote-tracking branch 'origin/4.11' into 4.12
2 parents 018bba3 + 2408783 commit a2323e1

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

systemvm/debian/opt/cloud/bin/cs/CsDhcp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ def delete_leases(self):
139139
logging.error("Caught error while trying to delete entries from dnsmasq.leases file: %s" % e)
140140

141141
def preseed(self):
142-
self.add_host("127.0.0.1", "localhost %s" % CsHelper.get_hostname())
142+
self.add_host("127.0.0.1", "localhost")
143+
self.add_host("127.0.1.1", "%s" % CsHelper.get_hostname())
143144
self.add_host("::1", "localhost ip6-localhost ip6-loopback")
144145
self.add_host("ff02::1", "ip6-allnodes")
145146
self.add_host("ff02::2", "ip6-allrouters")

utils/src/main/java/org/apache/cloudstack/utils/imagestore/ImageStoreUtil.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ public static String generatePostUploadUrl(String ssvmUrlDomain, String ipAddres
3030

3131
//if ssvm url domain is present, use it to construct hostname in the format 1-2-3-4.domain
3232
// if the domain name is not present, ssl validation fails and has to be ignored
33-
if(StringUtils.isNotBlank(ssvmUrlDomain)) {
33+
if(StringUtils.isNotBlank(ssvmUrlDomain) && ssvmUrlDomain.startsWith("*")) {
3434
hostname = ipAddress.replace(".", "-");
3535
hostname = hostname + ssvmUrlDomain.substring(1);
36+
} else if (StringUtils.isNotBlank(ssvmUrlDomain)) {
37+
hostname = ssvmUrlDomain;
3638
}
3739

3840
//only https works with postupload and url format is fixed

0 commit comments

Comments
 (0)