You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/03/18 11:08:50 UTC
[GitHub] [cloudstack] nvazquez commented on a change in pull request #6139: agent: Pass uefi support status as part of ready command
nvazquez commented on a change in pull request #6139:
URL: https://github.com/apache/cloudstack/pull/6139#discussion_r829901470
##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java
##########
@@ -367,10 +367,6 @@ public VmwareServerDiscoverer() {
details.put("url", hostMo.getHostName());
details.put("username", username);
details.put("password", password);
- boolean uefiLegacySupported = hostMo.isUefiLegacySupported();
Review comment:
I think these could be kept, same for other discoverers
##########
File path: engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java
##########
@@ -600,6 +600,19 @@ protected AgentAttache notifyMonitorsOfConnection(final AgentAttache attache, fi
// return the attache instead of null, even it is disconnectede
handleDisconnectWithoutInvestigation(attache, Event.AgentDisconnected, true, true);
}
+ if (answer instanceof ReadyAnswer) {
+ ReadyAnswer readyAnswer = (ReadyAnswer)answer;
+ Map<String, String> detailsMap = readyAnswer.getDetailsMap();
+ if (detailsMap != null) {
+ String uefiEnabled = detailsMap.get(Host.HOST_UEFI_ENABLE);
+ s_logger.debug(String.format("Got HOST_UEFI_ENABLE [%s] for hostId [%s]:", uefiEnabled, host.getUuid()));
+ if (uefiEnabled != null) {
+ _hostDao.loadDetails(host);
+ host.getDetails().put(Host.HOST_UEFI_ENABLE, uefiEnabled);
+ _hostDao.saveDetails(host);
Review comment:
What about checking first and persisting only in case it was not present or the value changed?
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org