[ https://issues.apache.org/jira/browse/CLOUDSTACK-9114?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15050367#comment-15050367 ]
ASF GitHub Bot commented on CLOUDSTACK-9114: -------------------------------------------- Github user wilderrodrigues commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1198#discussion_r47201591 --- Diff: engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java --- @@ -2558,6 +2575,62 @@ public boolean restartNetwork(Long networkId, Account callerAccount, User caller } } + /* If there are redundant routers in the isolated network, we follow the steps to make the network working better + * (1) destroy backup router if exists + * (2) create new backup router + * (3) destroy master router (then the backup will become master) + * (4) create a new router as backup router. + */ + private boolean restartGuestNetworkWithRedundantRouters(NetworkVO network, List<DomainRouterVO> routers, ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException { + Account caller = CallContext.current().getCallingAccount(); + long callerUserId = CallContext.current().getCallingUserId(); + + // check the master and backup redundant state + DomainRouterVO masterRouter = null; + DomainRouterVO backupRouter = null; + if (routers != null && routers.size() == 1) { + masterRouter = routers.get(0); + } if (routers != null && routers.size() == 2) { --- End diff -- Avoid magic numbers by putting them in constants. > restartnetwork with cleanup should not update/restart both routers at once > -------------------------------------------------------------------------- > > Key: CLOUDSTACK-9114 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9114 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Reporter: Wei Zhou > Assignee: Wei Zhou > > for now, restartnetwork with cleanup will stop both RVRs at first, then start > two new RVRs. > to reduce the downtime of network, we'd better restart the RVRs one by one. -- This message was sent by Atlassian JIRA (v6.3.4#6332)