Bug 1452131

Summary: [HE] deploy of ovirt-engine-appliance-4.2 Failed to enable service 'openvswitch'
Product: [oVirt] ovirt-appliance Reporter: Kobi Hakimi <khakimi>
Component: Packaging.rpmAssignee: Yuval Turgeman <yturgema>
Status: CLOSED CURRENTRELEASE QA Contact: Gonza <grafuls>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: bugs, danken, didi, lsvaty, mgoldboi, stirabos, ylavi
Target Milestone: ovirt-4.2.0Flags: rule-engine: ovirt-4.2+
lsvaty: testing_ack+
Target Release: 4.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 10:12:25 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
ovirt-hosted-engine-setup
none
ovirt-engine-setup none

Description Kobi Hakimi 2017-05-18 12:11:20 UTC
Created attachment 1279971 [details]
ovirt-hosted-engine-setup

Description of problem:
[HE] deploy of ovirt-engine-appliance-4.2 Failed to enable service 'openvswitch'

Version-Release number of selected component (if applicable):
ovirt-engine-appliance-4.2-20170517.1.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy the ovirt appliance by run:
 "hosted-engine --deploy --config-append=/etc/ansible-ovirt/answers"

Actual results:
The deploy failed with the following error:
[ ERROR ] Failed to execute stage 'Misc configuration': Failed to enable service 'openvswitch'(see attached logs).

Expected results:
To handle the openvswitch as part of the appliance installation process.

Additional info:
I talked with Simone about it and he said that ovn stuff is not a direct dependency of engine-setup so it's not there, when we create the appliance.
but the engine-setup is now looking for it.

Comment 1 Kobi Hakimi 2017-05-18 12:12:09 UTC
Created attachment 1279972 [details]
ovirt-engine-setup

Comment 2 Simone Tiraboschi 2017-05-18 13:28:58 UTC
openvswitch (and other OVN dependencies) are not in the appliance although engine-setup try to enable it by default.

2017-05-18 12:41:40,276+0300 DEBUG otopi.context context._executeMethod:128 Stage misc METHOD otopi.plugins.ovirt_engine_setup.ovirt_engine.network.ovirtproviderovn.Plugin._restart_ovn_services
2017-05-18 12:41:40,276+0300 DEBUG otopi.plugins.otopi.services.systemd systemd.startup:99 set service openvswitch startup to True
2017-05-18 12:41:40,276+0300 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/bin/systemctl', 'show', '-p', 'Id', 'openvswitch.service'), executable='None', cwd='None', env=None
2017-05-18 12:41:40,286+0300 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/bin/systemctl', 'show', '-p', 'Id', 'openvswitch.service'), rc=0
2017-05-18 12:41:40,286+0300 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/bin/systemctl', 'show', '-p', 'Id', 'openvswitch.service') stdout:
Id=openvswitch.service

2017-05-18 12:41:40,287+0300 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'show', '-p', 'Id', 'openvswitch.service') stderr:


2017-05-18 12:41:40,287+0300 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: ('/bin/systemctl', 'enable', u'openvswitch.service'), executable='None', cwd='None', env=None
2017-05-18 12:41:40,295+0300 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: ('/bin/systemctl', 'enable', u'openvswitch.service'), rc=1
2017-05-18 12:41:40,295+0300 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: ('/bin/systemctl', 'enable', u'openvswitch.service') stdout:


2017-05-18 12:41:40,295+0300 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: ('/bin/systemctl', 'enable', u'openvswitch.service') stderr:
Failed to execute operation: No such file or directory

Comment 3 Sandro Bonazzola 2017-05-18 13:34:09 UTC
Yaniv, Moran, we discussed about this over devel mailing list at http://lists.ovirt.org/pipermail/devel/2017-May/030420.html without a final decision.
Is openvswitch to be considered optional (so default=no in engine-setup) or a main feature (so it has to be an engine dependency as dwh)?

Comment 4 Dan Kenigsberg 2017-05-18 13:53:30 UTC
(In reply to Sandro Bonazzola from comment #3)
> Yaniv, Moran, we discussed about this over devel mailing list at
> http://lists.ovirt.org/pipermail/devel/2017-May/030420.html without a final
> decision.
> Is openvswitch to be considered optional (so default=no in engine-setup) or
> a main feature (so it has to be an engine dependency as dwh)?

there's a third option, which I prefer: openvswitch is still optional, but defaults to true. A user can opt out and not configure OVN, but most users should not.

Comment 5 Yedidyah Bar David 2017-05-18 14:57:27 UTC
(In reply to Dan Kenigsberg from comment #4)
> there's a third option, which I prefer: openvswitch is still optional, but
> defaults to true. A user can opt out and not configure OVN, but most users
> should not.

Please clarify. Based on previous discussions, I understand that what you mean is:

1. It defaults to True in normal run of engine-setup, and is not a direct dependency of the engine. So if a user installs only 'ovirt-engine', engine-setup will then install ovs if the user accepted the default True.

2. It defaults to False in the answer file supplied on the appliance, so running engine-setup there with the supplied file will not install/configure ovs.

This will indeed solve all problems, including current bug, but as I said in private, I am not sure it makes sense to me. I do not see the appliance as a special kind of installation - imo the defaults in it should be identical to normal run except for very specific reasons. Do we have such a reason for ovs?

Comment 6 Simone Tiraboschi 2017-05-19 07:53:13 UTC
(In reply to Yedidyah Bar David from comment #5)
> 1. It defaults to True in normal run of engine-setup, and is not a direct
> dependency of the engine. So if a user installs only 'ovirt-engine',
> engine-setup will then install ovs if the user accepted the default True.

From hosted-engine-setup we are going to run engine-setup in offline mode and so it will not work there.

Comment 7 Yaniv Lavi 2017-05-21 08:09:23 UTC
(In reply to Sandro Bonazzola from comment #3)
> Yaniv, Moran, we discussed about this over devel mailing list at
> http://lists.ovirt.org/pipermail/devel/2017-May/030420.html without a final
> decision.
> Is openvswitch to be considered optional (so default=no in engine-setup) or
> a main feature (so it has to be an engine dependency as dwh)?

I would guess most users would want this enabled.
I suggest to have it installed with appliance like other optional components unless the impact of appliance size it considerable.

Comment 8 Gonza 2018-01-17 13:34:39 UTC
Verified with:
rhvm-appliance-4.2-20171207.0.el7.noarch

Hosted engine successfully deployed.

Comment 9 Sandro Bonazzola 2018-02-12 10:12:25 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.