Skip to content

Commit 238c483

Browse files
committed
Merge pull request apache#1073 from ustcweizhou/CLOUDSTACK-9055
CLOUDSTACK-9055: fix NPE in updating Redundant State of VPC networksThis issue happened when the KVM nodes is down.It might also happen when the cloudstack-agent is killed unexpectedly. * pr/1073: CLOUDSTACK-9055: fix NPE in updating Redundant State of VPC networks Signed-off-by: Remi Bergsma <github@remi.nl>
2 parents 401693e + 66fc7c6 commit 238c483

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,10 +1013,12 @@ protected void updateRoutersRedundantState(final List<DomainRouterVO> routers) {
10131013
s_logger.warn("Unable to update router " + router.getHostName() + "'s status");
10141014
}
10151015
RedundantState state = RedundantState.UNKNOWN;
1016-
if (answer != null && answer.getResult()) {
1017-
state = answer.getState();
1018-
} else {
1019-
s_logger.info("Agent response doesn't seem to be correct ==> " + answer.getResult());
1016+
if (answer != null) {
1017+
if (answer.getResult()) {
1018+
state = answer.getState();
1019+
} else {
1020+
s_logger.info("Agent response doesn't seem to be correct ==> " + answer.getResult());
1021+
}
10201022
}
10211023
router.setRedundantState(state);
10221024
updated = true;

0 commit comments

Comments
 (0)