thanks very much
--------------原始邮件--------------
发件人:"Liran Rotenberg "<lrotenbe(a)redhat.com&gt;;
发送时间:2020年11月5日(星期四) 晚上11:52
收件人:"lifuqiong(a)sunyainfo.com" <lifuqiong(a)sunyainfo.com&gt;;
抄送:"users "<users(a)ovirt.org&gt;;"devel
"<devel(a)ovirt.org&gt;;
主题:[ovirt-devel] Re: Host's status how to change to UP when I execute
Management--> Active command
-----------------------------------
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(a)sunyainfo.com
<lifuqiong(a)sunyainfo.com&gt; 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(a)ovirt.org
To unsubscribe send an email to devel-leave(a)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/36745S77NLH...