CodeBleu commented on code in PR #9079:
URL: https://github.com/apache/cloudstack/pull/9079#discussion_r1958929330


##########
plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java:
##########
@@ -360,7 +360,8 @@ protected IpAddress getVpcTierKubernetesPublicIp(Network 
network) {
             return null;
         }
         IpAddress address = ipAddressDao.findByUuid(detailsVO.getValue());
-        if (address == null || !network.getVpcId().equals(address.getVpcId())) 
{
+       // Under certain circumstances, Long objects may differ even though 
they have the same primitive value. Compare the primitive values
+       if (address == null || network.getVpcId() == null || address.getVpcId() 
== null || network.getVpcId().longValue() != address.getVpcId().longValue()) {

Review Comment:
   > It seems that the issue was already fixed on 4.20.0+ with #8906, but it 
wasn't ported to 4.19.
   > 
   > @JSpon, could you target 4.19 and backport the code from main?
   
   @winterhazel that to me doesn't look like the code that is in this PR.  I 
still think 4.20+ needs this change. Unless I'm looking at it wrong.
   
   I'm basically just looking at this file, since this is the file I changed 
and re-compiled and deployed and it worked for me. 
`plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java`
   
   #8906 shows these changes which is different from above.
   
![image](https://github.com/user-attachments/assets/eb56feab-d4b8-4ffc-ac00-28339809e11b)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to