Change in ovirt-engine[master]: core: Block moving host to maintenance if it's running jobs

Code Review gerrit at ovirt.org
Mon Apr 24 16:40:19 UTC 2017


>From Liron Aravot <laravot at redhat.com>:

Liron Aravot has submitted this change and it was merged.

Change subject: core: Block moving host to maintenance if it's running jobs
......................................................................


core: Block moving host to maintenance if it's running jobs

When a host is running jobs (and specifically storage jobs) we should
block moving it to maintenance until the jobs are completed.
This patch adds support to get the operations running on a host and adds
a validation when it's moved to maintenance.

The following changes are made:
1. Added stored procedure (with tests) that returns steps related to a
subject entity.

2. Add validation in MaintenanceNumberOfVdssCommand.

Regardless of this change, the validation is racey as a job (or a task)
could be started after the validation. Locks should be added in order to
sync between the maintenance flow and the start of jobs on a host.
As this issue existed always, it'll be handled in a separate change -
this patch adds the validation.

Change-Id: Ibfa5947a39844b22bacf28f873bc6842bcf15040
Bug-Url: https://bugzilla.redhat.com/1444982
Signed-off-by: Liron Aravot <laravot at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MaintenanceNumberOfVdssCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/EngineMessage.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/StepDao.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/StepDaoImpl.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/StepDaoTest.java
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M frontend/webadmin/modules/frontend/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M packaging/dbscripts/job_sp.sql
12 files changed, 128 insertions(+), 1 deletion(-)

Approvals:
  Ravi Nori: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Moti Asayag: Looks good to me, approved
  Liron Aravot: Verified



-- 
To view, visit https://gerrit.ovirt.org/75522
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfa5947a39844b22bacf28f873bc6842bcf15040
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list