Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What cerconstances are those @JSpon ? as both
network.getVpcId()andaddress.getVpcId()return an object of typeLong, this should work with theLong.equals()method.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.

Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CodeBleu
network.getVpcId() == null || address.getVpcId() == null || network.getVpcId().longValue() != address.getVpcId().longValue()(the changes in this PR) and!Objects.equals(network.getVpcId(), address.getVpcId())(the existing code in main and 4.20) will have the same result here.See the code in the 4.19 branch, its comparing the
Longobjects instead, resulting in the issue that the comment mentions:cloudstack/plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetes/cluster/actionworkers/KubernetesClusterActionWorker.java
Line 363 in 212f2a3