thanks very much
--------------原始邮件--------------
发件人:"Liran Rotenberg "<lrote...@redhat.com>;
发送时间:2020年11月5日(星期四) 晚上11:52
收件人:"lifuqi...@sunyainfo.com" <lifuqi...@sunyainfo.com>;
抄送:"users "<users@ovirt.org>;"devel "<de...@ovirt.org>;
主题:[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 lifuqi...@sunyainfo.com
<lifuqi...@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 -- de...@ovirt.org
To unsubscribe send an email to devel-le...@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/de...@ovirt.org/message/36745S77NLH3KINTB4MQMGTBE5EDWTUW/
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@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/users@ovirt.org/message/VPGD6TUF5UE22NZUFUPXIGG6W5KO7OA7/