Skip to content

Commit 27ea1fe

Browse files
committed
fixup
1 parent 939a4c3 commit 27ea1fe

4 files changed

Lines changed: 4 additions & 6 deletions

File tree

plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterResourceModifierActionWorker.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,7 @@ protected UserVm createKubernetesNode(String joinIp) throws ManagementServerExce
401401
if (StringUtils.isNotBlank(kubernetesCluster.getKeyPair())) {
402402
keypairs.add(kubernetesCluster.getKeyPair());
403403
}
404-
if (kubernetesCluster.getSecurityGroupId() != null &&
405-
networkModel.checkSecurityGroupSupportForNetwork(zone, networkIds,
406-
List.of(kubernetesCluster.getSecurityGroupId()))) {
404+
if (kubernetesCluster.getSecurityGroupId() != null && networkModel.checkSecurityGroupSupportForNetwork(zone, networkIds, List.of(kubernetesCluster.getSecurityGroupId()))) {
407405
List<Long> securityGroupIds = new ArrayList<>();
408406
securityGroupIds.add(kubernetesCluster.getSecurityGroupId());
409407
nodeVm = userVmService.createAdvancedSecurityGroupVirtualMachine(zone, serviceOffering, clusterTemplate, networkIds, securityGroupIds, owner,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2764,7 +2764,7 @@ public boolean isSecurityGroupSupportedForZone(Long zoneId) {
27642764
@Override
27652765
public boolean checkSecurityGroupSupportForNetwork(DataCenter zone, List<Long> networkIds,
27662766
List<Long> securityGroupsIds) {
2767-
if (zone.isSecurityGroupEnabled() || isSecurityGroupSupportedForZone(zone.getId())) {
2767+
if (zone.isSecurityGroupEnabled()) {
27682768
return true;
27692769
}
27702770
if (CollectionUtils.isNotEmpty(networkIds)) {

server/src/main/java/org/apache/cloudstack/storage/template/VnfTemplateManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ protected Map<Network, String> getManagementNetworkAndIp(VirtualMachineTemplate
291291
@Override
292292
public SecurityGroup createSecurityGroupForVnfAppliance(DataCenter zone, VirtualMachineTemplate template, Account owner,
293293
DeployVnfApplianceCmd cmd) {
294-
if (zone == null || !zone.isSecurityGroupEnabled() || !networkModel.isSecurityGroupSupportedForZone(zone.getId())) {
294+
if (zone == null || !(zone.isSecurityGroupEnabled() || networkModel.isSecurityGroupSupportedForZone(zone.getId()))) {
295295
return null;
296296
}
297297
if (!cmd.getVnfConfigureManagement()) {

services/secondary-storage/controller/src/main/java/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ protected NetworkVO getDefaultNetworkForAdvancedZone(DataCenter dc) {
566566
throw new CloudRuntimeException(String.format("%s is not advanced.", dc.toString()));
567567
}
568568

569-
if (dc.isSecurityGroupEnabled() || _networkModel.isSecurityGroupSupportedForZone(dc.getId())) {
569+
if (dc.isSecurityGroupEnabled()) {
570570
List<NetworkVO> networks = _networkDao.listByZoneSecurityGroup(dc.getId());
571571
if (CollectionUtils.isEmpty(networks)) {
572572
throw new CloudRuntimeException(String.format("Can not found security enabled network in SG %s.", dc.toString()));

0 commit comments

Comments
 (0)