Hi,
The engine will monitor that host. Once it's reachable and we can get information from it the status will change accordingly.
Please check out the HostMonitoring class.

On Thu, Nov 5, 2020 at 11:57 AM lifuqiong@sunyainfo.com <lifuqiong@sunyainfo.com> wrote:

Hi, 
    I checkout ovirt-engine's code with branch 4.2;  When execute Host's Management --> Active  command,  ovirt engine just set vds's status to "Unassigned" but how the vds's status changed to "UP" in ovirt-engine?  The code in ActiveVdsCommand.executeCommand() as follows:
protected void executeCommand() {

        final VDS vds = getVds();
        try (EngineLock monitoringLock = acquireMonitorLock("Activate host")) {
            executionHandler.updateSpecificActionJobCompleted(vds.getId(), ActionType.MaintenanceVds, false);
            setSucceeded(setVdsStatus(VDSStatus.Unassigned).getSucceeded());

            if (getSucceeded()) {
                TransactionSupport.executeInNewTransaction(() -> {
                    // set network to operational / non-operational
                    List<Network> networks = networkDao.getAllForCluster(vds.getClusterId());
                    networkClusterHelper.setStatus(vds.getClusterId(), networks);
                    return null;
                });

                // Start glusterd service on the node, which would haven been stopped due to maintenance
                if (vds.getClusterSupportsGlusterService()) {
                    runVdsCommand(VDSCommandType.ManageGlusterService,
                            new GlusterServiceVDSParameters(vds.getId(), Arrays.asList("glusterd"), "restart"));
                    // starting vdo service
                    GlusterStatus isRunning = glusterUtil.isVDORunning(vds.getId());
                    switch (isRunning) {
                    case DOWN:
                        log.info("VDO service is down in host : '{}' with id '{}', starting VDO service",
                                vds.getHostName(),
                                vds.getId());
                        startVDOService(vds);
                        break;
                    case UP:
                        log.info("VDO service is up in host : '{}' with id '{}', skipping starting of VDO service",
                                vds.getHostName(),
                                vds.getId());
                           break;
                    case UNKNOWN:
                        log.info("VDO service is not installed host : '{}' with id '{}', ignoring to start VDO service",
                                vds.getHostName(),
                                vds.getId());
                        break;
                    }

                }
            }
        }
    }


Your Sincerely
Mark Lee
_______________________________________________
Devel mailing list -- devel@ovirt.org
To unsubscribe send an email to devel-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/devel@ovirt.org/message/36745S77NLH3KINTB4MQMGTBE5EDWTUW/