This is an automated email from the ASF dual-hosted git repository.

weizhou pushed a commit to branch 4.18
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.18 by this push:
     new f5a1f4130d5 server: fix global setting 
system.vm.public.ip.reservation.mode.strictness is not really dynamic (#7909)
f5a1f4130d5 is described below

commit f5a1f4130d554c648d030c14cdd7ad212976e9cf
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Aug 25 11:35:31 2023 +0200

    server: fix global setting system.vm.public.ip.reservation.mode.strictness 
is not really dynamic (#7909)
    
    If the original value is `false`, and search build is configured without 
the condition. Now change the value to `true`, it will not get effective due to 
missing condition.
---
 server/src/main/java/com/cloud/network/IpAddressManagerImpl.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java 
b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
index 60e7c5d12bf..bb5371ed271 100644
--- a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
+++ b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java
@@ -496,9 +496,8 @@ public class IpAddressManagerImpl extends ManagerBase 
implements IpAddressManage
         AssignIpAddressSearch.and("dc", 
AssignIpAddressSearch.entity().getDataCenterId(), Op.EQ);
         AssignIpAddressSearch.and("allocated", 
AssignIpAddressSearch.entity().getAllocatedTime(), Op.NULL);
         AssignIpAddressSearch.and("vlanId", 
AssignIpAddressSearch.entity().getVlanId(), Op.IN);
-        if (SystemVmPublicIpReservationModeStrictness.value()) {
-            AssignIpAddressSearch.and("forSystemVms", 
AssignIpAddressSearch.entity().isForSystemVms(), Op.EQ);
-        }
+        AssignIpAddressSearch.and("forSystemVms", 
AssignIpAddressSearch.entity().isForSystemVms(), Op.EQ);
+
         SearchBuilder<VlanVO> vlanSearch = _vlanDao.createSearchBuilder();
         vlanSearch.and("type", vlanSearch.entity().getVlanType(), Op.EQ);
         vlanSearch.and("networkId", vlanSearch.entity().getNetworkId(), Op.EQ);

Reply via email to