Bug 1458659

Summary: engine-setup doesn't stop engine service
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: Setup.EngineAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: bugs, lsvaty
Target Milestone: ovirt-4.2.0Keywords: Regression
Target Release: 4.2.0Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
lsvaty: testing_ack+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:38:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine log none

Description Michael Burman 2017-06-05 06:53:34 UTC
Created attachment 1284924 [details]
engine log

Description of problem:
engine-setup doesn't stopping engine service.

I noticed that engine-setup doesn't stopping the engine service, only starting it.
It means that admin/user stay logged in in the web admin UI on the old version and some operations don't working properly.
engine restart is required manually. 

[ INFO  ] Stage: Transaction setup
[ INFO  ] Stopping ovirt-fence-kdump-listener service
[ INFO  ] Stopping dwh service
[ INFO  ] Stopping Image I/O Proxy service
[ INFO  ] Stopping vmconsole-proxy service
[ INFO  ] Stopping websocket-proxy service
[ INFO  ] Stage: Misc configuration
[ INFO  ] Stage: Package installation

[ INFO  ] Stage: Transaction commit
[ INFO  ] Stage: Closing up
[ INFO  ] Starting engine service
[ INFO  ] Starting dwh service
[ INFO  ] Restarting ovirt-vmconsole proxy service

Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.0.master.20170604201000.git24e53f5.el7.centos.noarch
4.2.0-0.0.master.20170602194647.gitaf23eb5.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. Upgrade to latest master and run engine-setup

Actual results:
engine service wasn't stopped as it should, only started.

Expected results:
engine service should be stopped and started during the engine-setup.

Comment 1 Oved Ourfali 2017-06-05 06:59:41 UTC
Moving to integration.
Sandro - if that results in infra item, please move back.

Comment 2 Sandro Bonazzola 2017-06-06 07:52:36 UTC
Engine is started in oengcommcons.Stages.CORE_ENGINE_START stage.
It's stopped at plugin.Stages.STAGE_TRANSACTION_BEGIN if condition is True:
        condition=lambda self: not self.environment[
            osetupcons.CoreEnv.DEVELOPER_MODE
        ] and self.environment[
            oengcommcons.ConfigEnv.ENGINE_SERVICE_STOP_NEEDED
        ]

and service oenginecons.Const.ENGINE_SERVICE_NAME exists.
From the logs:

ENV OVESETUP_CORE/developerMode=bool:'False'
OVESETUP_CONFIG/engineServiceStopNeeded=bool:'False'

So the engine hasn't been stopped because it thought it didn't need to be stopped.

OVESETUP_CONFIG/engineServiceStopNeeded defaults to True in ovirt-engine/packaging/setup/plugins/ovirt-engine-common/ovirt-engine/core/engine.py

but after

commit eef289b982bcaf9c52e570e9bb7aa63440496fd2
Author: Yedidyah Bar David <didi>
Date:   Sun Apr 9 09:29:23 2017 +0300

    packaging: setup: Check health

it's forced to be False in ovirt-engine/packaging/setup/plugins/ovirt-engine-checks/ovirt-engine/db/engine.py.

Comment 3 Red Hat Bugzilla Rules Engine 2017-06-06 07:53:48 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 4 Michael Burman 2017-08-30 05:48:39 UTC
Verified on - 4.2.0-0.0.master.20170828065003.git0619c76.el7.centos

[ INFO  ] Stopping engine service

Comment 5 Sandro Bonazzola 2017-12-20 11:38:07 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.