weizhouapache commented on a change in pull request #5723:
URL: https://github.com/apache/cloudstack/pull/5723#discussion_r762200321
##########
File path:
server/src/main/java/com/cloud/network/element/VpcVirtualRouterElement.java
##########
@@ -348,6 +348,9 @@ public Provider getProvider() {
//1st time it runs the domain router of the VM shall be returned
List<DomainRouterVO> routers = super.getRouters(network, dest);
+ if (routers == null) {
Review comment:
@ravening
I think the normal way to fix NPE is adding a check like below.
```
//1st time it runs the domain router of the VM shall be returned
List<DomainRouterVO> routers = super.getRouters(network, dest);
- if (routers.size() > 0) {
+ if (routers != null && routers.size() > 0) {
return routers;
}
```
then I got following error when I create the 24th vpc tier
`
Unable to add NIC to VM instance {id: \"1693\", name: \"i-2-1693-VM\", uuid:
\"f79f121f-65bb-4212-82b8-99f3be9d3654\", type=\"User\"}:
com.cloud.exception.ResourceUnavailableException: Resource [DataCenter:1] is
unreachable: Unable to apply network rules as a part of network
Ntwk[3521|Guest|11] implement`
What is the error in your testing result ?
both options are good to me.
--
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]