Bug 1429855

Summary: hosted-engine-setup should require cockpit-ovirt since now host-deploy requires it
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Simone Tiraboschi <stirabos>
Component: Packaging.rpmAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: high Docs Contact:
Priority: high    
Version: 2.1.0.4CC: bugs, mavital, nsednev, ylavi
Target Milestone: ovirt-4.2.0Keywords: TestOnly, Triaged
Target Release: 2.2.0Flags: ylavi: ovirt-4.2+
nsednev: testing_plan_complete-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-20 11:28:27 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:
Bug Depends On: 1460609, 1487915    
Bug Blocks: 1235200    

Description Simone Tiraboschi 2017-03-07 10:05:39 UTC
Description of problem:
Since https://bugzilla.redhat.com/show_bug.cgi?id=1408942 host-deploy is requiring (it installs it at execution time since host-deploy get deployed as a tar.gz and not as an rpm) cockpit-ovirt-dashboard and tries to start it.

hosted-engine-setup is a bit special on this context: since host-deploy is running while the engine VM is already running on the host, it must avoid any package upgrade since it could kill the running engine VM, that's why it forces host-deploy to run in offline mode.
So, if host-deploy requires something to be installed/upgraded, hosted-engine-setup should require it as well to ensure that the package is there before starting the engine VM.

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-2.1.0.4
ovirt-host-deploy-1.6.2

How reproducible:
100%

Steps to Reproduce:
1. run hosted-engine-setup and ensure that the engine appliance contains > ovirt-host-deploy-1.6.2-1.el7ev.noarch


Actual results:

host-deploy fails:
2017-03-06 20:05:20 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'start', 'cockpit.service') stderr:
Failed to start cockpit.service: Unit not found.

2017-03-06 20:05:20 DEBUG otopi.context context._executeMethod:142 method exception
Traceback (most recent call last):
  File "/tmp/ovirt-fiObiWABAk/pythonlib/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/tmp/ovirt-fiObiWABAk/otopi-plugins/ovirt-host-common/cockpit/packages.py", line 70, in _closeup
    self.services.state('cockpit', True)
  File "/tmp/ovirt-fiObiWABAk/otopi-plugins/otopi/services/systemd.py", line 141, in state
    service=name,
RuntimeError: Failed to start service 'cockpit'
2017-03-06 20:05:20 ERROR otopi.context context._executeMethod:151 Failed to execute stage 'Closing up': Failed to start service 'cockpit'

Expected results:
host-deploy successfully completes

Comment 1 Yaniv Lavi 2017-03-07 10:12:53 UTC
How did we miss this?

Comment 2 Sandro Bonazzola 2017-03-07 10:13:20 UTC
This will also need a change in cockpit-ovirt in order to avoid circular dependency

Comment 3 Nikolai Sednev 2017-03-07 10:40:39 UTC
Its interesting, but although I've had cockpit-ovirt-dashboard-0.10.7-0.0.11.el7ev.noarch on host, the backup still failed on engine during HE deployment as appears in https://bugzilla.redhat.com/show_bug.cgi?id=1235200

Comment 4 Sandro Bonazzola 2017-03-07 11:40:29 UTC
I'm reverting changes from https://bugzilla.redhat.com/show_bug.cgi?id=1408942, breaking too many things at once.

Comment 5 Nikolai Sednev 2017-03-07 14:21:01 UTC
(In reply to Yaniv Dary from comment #1)
> How did we miss this?

Why missed? Here I've seen that its not working and reported back and reassigned:
https://bugzilla.redhat.com/show_bug.cgi?id=1235200#c8

Comment 6 Simone Tiraboschi 2017-03-07 16:15:28 UTC
(In reply to Yaniv Dary from comment #1)
> How did we miss this?

It's just with ovirt-host-deploy-1.6.2 which is from this week. The engine-appliance is probably outdated and so it includes an older ovirt-host-deploy which was fine.

Comment 8 Sandro Bonazzola 2017-09-06 14:50:31 UTC
We changed the dependency tree introducing ovirt-host package.
Please check everything is ok now.

Comment 9 Nikolai Sednev 2017-09-17 08:13:25 UTC
With manually pre-installed rhvm-appliance-1:4.1.20170811.0-1.el7, ovirt-hosted-engine-setup-2.2.0-0.0.master.20170913082146.git120d800.el7.centos.noarch deployed successfully, with ovirt-host-deploy-1.6.6-1.el7ev.noarch on HE-VM.
Moving to verified.

Comment 10 Nikolai Sednev 2017-09-17 10:53:02 UTC
Refining my previous comment #9:
Deployment was successful with ovirt-engine-appliance-4.2-20170916.1.el7.centos.noarch installed on RHEL7.4 host with ovirt-hosted-engine-setup-2.2.0-0.0.master.20170913082146.git120d800.el7.centos.noarch and ovirt-host-deploy-1.7.0-0.0.master.20170912090102.git1eeb5a2.el7.centos.noarch was installed on the appliance.

Comment 11 Sandro Bonazzola 2017-12-20 11:28:27 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.