mirror of https://github.com/apache/cloudstack.git
CS-15116: When GetDomRVersion failed, let VR creation fail
Because there are more commands after GetDomRVersion command. Though GetDomRVersion command itself is not that critical, the commands after it may including DHCP and firewall related commands. The failure of GetDomRVersion command would result in the following commands fail to be executed. So it should fail, and fail loudly.
This commit is contained in:
parent
96e7e3d1ca
commit
79c276ba6b
|
|
@ -1936,19 +1936,21 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
result = false;
|
||||
}
|
||||
if (result == false) {
|
||||
return false;
|
||||
return result;
|
||||
}
|
||||
answer = cmds.getAnswer("getDomRVersion");
|
||||
if (answer != null && answer instanceof GetDomRVersionAnswer) {
|
||||
GetDomRVersionAnswer versionAnswer = (GetDomRVersionAnswer)answer;
|
||||
if (answer == null || !answer.getResult()) {
|
||||
/* Try to push on because it's not a critical error */
|
||||
s_logger.warn("Unable to get the template/scripts version of router " + router.getInstanceName() + " due to: " + versionAnswer.getDetails() + ", but we would continue");
|
||||
s_logger.warn("Unable to get the template/scripts version of router " + router.getInstanceName() + " due to: " + versionAnswer.getDetails());
|
||||
result = false;
|
||||
} else {
|
||||
router.setTemplateVersion(versionAnswer.getTemplateVersion());
|
||||
router.setScriptsVersion(versionAnswer.getScriptsVersion());
|
||||
router = _routerDao.persist(router);
|
||||
}
|
||||
} else {
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in New Issue