Damans227 commented on code in PR #13779:
URL: https://github.com/apache/cloudstack/pull/13779#discussion_r3713977379


##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -9267,17 +9267,24 @@ private void handleManagedStorage(UserVmVO vm, VolumeVO 
root) {
             Long hostId = vm.getHostId() != null ? vm.getHostId() : 
vm.getLastHostId();
 
             if (hostId != null) {
-                // default findById() won't search entries with removed field 
not null
-                Host host = _hostDao.findById(hostId);
+                Host host = _hostDao.findByIdIncludingRemoved(hostId);
+
+                // host row may have been hard-deleted from DB, treat like 
removed
                 if (host == null) {
-                    logger.warn("Host {} not found", hostId);
+                    s_logger.warn(String.format("Host with id %s not found in 
DB for VM %s (%s)",

Review Comment:
   `s_logger` doesn't exist in this class. It only has `logger` (see the line 
right below this one). This won't compile.



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