weizhouapache commented on PR #9037:
URL: https://github.com/apache/cloudstack/pull/9037#issuecomment-2100372952

   > > @sureshanaparti #7214 has refactored this code snippet in main/4.20 
branch we can consider the backport to 4.18/4.19, and fix the issue like
   > > ```
   > >      private DeployDestination deployInVmLastHost(VirtualMachineProfile 
vmProfile, DeploymentPlan plan, ExcludeList avoids,
   > >              DeploymentPlanner planner, VirtualMachine vm, DataCenter 
dc, ServiceOffering offering, int cpuRequested, long ramRequested,
   > >              boolean volumesRequireEncryption) throws 
InsufficientServerCapacityException {
   > >          HostVO host = _hostDao.findById(vm.getLastHostId());
   > > +        if (host == null) {
   > > +            logger.warn(String.format("The last host [id=%s] does not 
exist, it may have been removed.", vm.getLastHostId()));
   > > +            return null;
   > > +        }
   > >          _hostDao.loadHostTags(host);
   > >          _hostDao.loadDetails(host);
   > > ```
   > 
   > @weizhouapache I think, better to fix this issue (no backport for that 
refactored code). PR #7214 also doesn't fix load tags issue, needs to be fixed 
here - https://github.com/apache/cloudstack/pull/7214/files#r1593867688
   
   @sureshanaparti 
   right, #7214 does not fix any issue.
   if no backport (and then fix), this PR will only be applicable for 
4.18/4.19, we need a separated pr for 4.20/main


-- 
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]

Reply via email to