Skip to content

Commit b387bc1

Browse files
committed
Merge branch '4.20' of https://github.com/apache/cloudstack
2 parents d94aaa8 + 0427abf commit b387bc1

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/ha/KVMInvestigator.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
3939

4040
import javax.inject.Inject;
41+
import java.util.Arrays;
4142
import java.util.List;
4243

4344
public class KVMInvestigator extends AdapterBase implements Investigator {
@@ -81,15 +82,15 @@ public Status isAgentAlive(Host agent) {
8182
return haManager.getHostStatus(agent);
8283
}
8384

84-
List<StoragePoolVO> clusterPools = _storagePoolDao.listPoolsByCluster(agent.getClusterId());
85+
List<StoragePoolVO> clusterPools = _storagePoolDao.findPoolsInClusters(Arrays.asList(agent.getClusterId()), null);
8586
boolean storageSupportHA = storageSupportHa(clusterPools);
8687
if (!storageSupportHA) {
8788
List<StoragePoolVO> zonePools = _storagePoolDao.findZoneWideStoragePoolsByHypervisor(agent.getDataCenterId(), agent.getHypervisorType());
8889
storageSupportHA = storageSupportHa(zonePools);
8990
}
9091
if (!storageSupportHA) {
9192
logger.warn("Agent investigation was requested on host {}, but host does not support investigation because it has no NFS storage. Skipping investigation.", agent);
92-
return Status.Disconnected;
93+
return null;
9394
}
9495

9596
Status hostStatus = null;

plugins/integrations/prometheus/src/main/java/org/apache/cloudstack/metrics/PrometheusExporterImpl.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.math.BigDecimal;
2020
import java.util.ArrayList;
2121
import java.util.HashMap;
22+
import java.util.HashSet;
2223
import java.util.List;
2324
import java.util.Map;
2425
import java.util.stream.Collectors;
@@ -302,7 +303,7 @@ private void addHostTagsMetrics(final List<Item> metricsList, final long dcId, f
302303
.flatMap( h -> _hostTagsDao.getHostTags(h).stream())
303304
.distinct()
304305
.collect(Collectors.toList());
305-
List<String> allHostTags = new ArrayList<>();
306+
HashSet<String> allHostTags = new HashSet<>();
306307
allHostTagVOS.forEach(hostTagVO -> allHostTags.add(hostTagVO.getTag()));
307308

308309
for (final State state : State.values()) {

server/src/main/java/com/cloud/network/NetworkServiceImpl.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,7 @@ public Network createGuestNetwork(CreateNetworkCmd cmd) throws InsufficientCapac
17841784
}
17851785

17861786
Pair<Integer, Integer> interfaceMTUs = validateMtuConfig(publicMtu, privateMtu, zone.getId());
1787-
mtuCheckForVpcNetwork(vpcId, interfaceMTUs, publicMtu, privateMtu);
1787+
mtuCheckForVpcNetwork(vpcId, interfaceMTUs, publicMtu);
17881788

17891789
Network associatedNetwork = null;
17901790
if (associatedNetworkId != null) {
@@ -2079,15 +2079,15 @@ private NetworkOffering getAndValidateNetworkOffering(Long networkOfferingId) {
20792079
return ntwkOff;
20802080
}
20812081

2082-
protected void mtuCheckForVpcNetwork(Long vpcId, Pair<Integer, Integer> interfaceMTUs, Integer publicMtu, Integer privateMtu) {
2082+
protected void mtuCheckForVpcNetwork(Long vpcId, Pair<Integer, Integer> interfaceMTUs, Integer publicMtu) {
20832083
if (vpcId != null && publicMtu != null) {
20842084
VpcVO vpc = _vpcDao.findById(vpcId);
20852085
if (vpc == null) {
20862086
throw new CloudRuntimeException(String.format("VPC with id %s not found", vpcId));
20872087
}
20882088
logger.warn(String.format("VPC public MTU already set at VPC creation phase to: %s. Ignoring public MTU " +
20892089
"passed during VPC network tier creation ", vpc.getPublicMtu()));
2090-
interfaceMTUs.set(vpc.getPublicMtu(), privateMtu);
2090+
interfaceMTUs.set(vpc.getPublicMtu(), interfaceMTUs.second());
20912091
}
20922092
}
20932093

server/src/test/java/com/cloud/network/NetworkServiceImplTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ public void testUpdatePublicInterfaceMtuViaNetworkTiersForVpcNetworks() {
555555
Mockito.when(vpcVO.getPublicMtu()).thenReturn(vpcMtu);
556556

557557
Pair<Integer, Integer> updatedMtus = service.validateMtuConfig(publicMtu, privateMtu, zoneId);
558-
service.mtuCheckForVpcNetwork(vpcId, updatedMtus, publicMtu, privateMtu);
558+
service.mtuCheckForVpcNetwork(vpcId, updatedMtus, publicMtu);
559559
Assert.assertEquals(vpcMtu, updatedMtus.first());
560560
Assert.assertEquals(privateMtu, updatedMtus.second());
561561
}

ui/public/config.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"loginTitle": "CloudStack",
1414
"loginFavicon": "assets/logo.svg",
1515
"loginFooter": "",
16+
"resetPasswordFooter": "",
1617
"logo": "assets/logo.svg",
1718
"minilogo": "assets/mini-logo.svg",
1819
"banner": "assets/banner.svg",

ui/src/layouts/UserLayout.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
</div>
3838
<route-view></route-view>
3939
</div>
40-
<div class="user-layout-footer" v-if="$config.loginFooter">
41-
<label v-html="$config.loginFooter"></label>
40+
<div class="user-layout-footer" v-if="$config.loginFooter || $config.resetPasswordFooter">
41+
<label v-if="$route.name === 'resetPassword' && $config.resetPasswordFooter" v-html="$config.resetPasswordFooter"></label>
42+
<label v-else v-html="$config.loginFooter"></label>
4243
</div>
4344
</div>
4445
</template>

0 commit comments

Comments
 (0)