wido commented on code in PR #13719:
URL: https://github.com/apache/cloudstack/pull/13719#discussion_r3664633049
##########
server/src/main/java/com/cloud/resource/ResourceManagerImpl.java:
##########
@@ -3213,9 +3216,61 @@ private HostVO getNewHost(StartupCommand[]
startupCommands) {
}
logger.debug(String.format("Could not find Host by guid %s",
fullGuid));
+
+ // No live host matches this GUID. Before letting the caller create a
brand-new host,
+ // make sure this GUID does not belong to a host that was previously
deleted. Otherwise a
+ // still-running agent whose host was deleted would silently
re-register itself as a new host.
Review Comment:
Yes, you can move a host, but that's a wipe. For CloudStack that will be a
completely new host. We don't track the hostname, we only track the GUID.
I think its an oversight that we allow the same GUID/UUID to re-register
itself after an admin like mentioned in #13693 by @Eddi1306 and @sbrueseke
I have no idea why we currently wipe the UUID from the DB. We should just
mark the host as removed and if you want it back, re-add it (or manually fiddle
with the DB).
--
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]