DaanHoogland commented on code in PR #13719:
URL: https://github.com/apache/cloudstack/pull/13719#discussion_r3659048948


##########
server/src/main/java/com/cloud/resource/ResourceManagerImpl.java:
##########
@@ -1062,7 +1063,9 @@ public void doInTransactionWithoutResult(final 
TransactionStatus status) {
                 logger.debug("Deleting tags from database for host with UUID 
[{}].", host.getUuid());
                 _hostTagsDao.deleteTags(hostId);
 
-                host.setGuid(null);
+                // Note: the host GUID is intentionally preserved on the 
(soft-)deleted record so that a
+                // returning agent with the same GUID can be detected and 
refused re-registration when
+                // 'add.host.on.service.restart.kvm' is false. See 
getNewHost()/rejectReAddOfDeletedHost().

Review Comment:
   what about when someone wants to add a host to another cluster after a 
reinstall? Will that work?



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