mlsorensen commented on code in PR #6710:
URL: https://github.com/apache/cloudstack/pull/6710#discussion_r968633017
##########
server/src/main/java/com/cloud/network/NetworkModelImpl.java:
##########
@@ -2551,6 +2553,10 @@ public List<String[]> generateVmData(String userData,
String serviceOffering, lo
final String zoneName = dcVo.getName();
IPAddressVO publicIp = _ipAddressDao.findByAssociatedVmId(vmId);
+ VirtualMachine vm = _vmDao.findById(vmId);
+ if (vm == null) {
+ throw new CloudRuntimeException("Cannot generate VM instance data,
no VM exists by given ID");
Review Comment:
Good idea. I think the cloudruntimeexception will be logged at some stage,
committing Daan's suggestion.
--
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]