Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1454368 - Unable to install OVN using engine-setup and answer-file
Unable to install OVN using engine-setup and answer-file
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network (Show other bugs)
4.2.0
Unspecified Unspecified
high Severity high (vote)
: ovirt-4.2.0
: ---
Assigned To: Marcin Mirecki
Meni Yakove
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-22 10:51 EDT by Mor
Modified: 2017-12-24 05:36 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
If you install/configure the OVN provider while running engine-setup interactively, engine-setup saves the OVN responses to the answer file, so that when you run engine-setup with the generated answer file, it will not ask the questions.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-20 05:59:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.2+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 77157 master ABANDONED packaging: make it possible to install ovirt-provider-ovn from answer file 2017-06-06 08:32 EDT
oVirt gerrit 77779 master POST packaging: check if ovirt-provider-ovn is installed based on provider id 2017-06-06 08:49 EDT

  None (edit)
Description Mor 2017-05-22 10:51:49 EDT
Description of problem:
When installing a new engine using engine-setup and supplying answer file with the following key/value: 'OVESETUP_OVN/ovirtProviderOvn=bool:True', ovirt-provider-ovn is being installed. Seems like engine-setup treats this flag as an indicator of whether it is installed or not.

Version-Release number of selected component (if applicable):
OVESETUP_OVN/ovirtProviderOvn=bool:True

How reproducible:
100%

Steps to Reproduce:
1. Run engine-setup with answer-file that has 'OVESETUP_OVN/ovirtProviderOvn' enabled: 'OVESETUP_OVN/ovirtProviderOvn=bool:True'.
2. Engine-setup completes the installation.

Actual results:
ovirt-provider-ovn package is not installed and the provider is not registered in the engine.

Expected results:
Package should be installed.

Additional info:
On engine:
# rpm -qa | grep ovirt-provider-ovn is empty.
Comment 2 Mor 2017-05-23 03:44:11 EDT
Correction:

Description of problem:
* ovirt-provider-ovn is NOT being installed.

Version-Release number of selected component (if applicable):
Version 4.2.0-0.0.master.20170521155744.gitb6f1a86.el7.centos
Comment 3 Marcin Mirecki 2017-05-23 05:26:28 EDT
The "ovirtProviderOvn" variable is an indicator whether we already asked the user to install OVN. If we did, we will not ask again, irrelevant of the answer (we do not want to bug the user again if he did not want it).

To solve the problem we will need to split the variable into two:

isOvirtProviderOvnInstalled - postinstallfile value (/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf), telling engine-setup if ovirt-provider-ovn has been installed.

ovirtProviderOvn - answer file value, allowing user to specify whether to install the provider in an answer file


Until now if the user chose not to install, we did not ask again.
Is this the desired behaviour? 
Or should we ask again each time?


Outcomes depending on the values of the two variables:

isOvirtProviderOvnInstalled:True   ovirtProviderOvn:ANY    => no action, no propmt for OVN
isOvirtProviderOvnInstalled:None   ovirtProviderOvn:True    => install OVN
isOvirtProviderOvnInstalled:None   ovirtProviderOvn:False    => no action, no propmt for OVN
isOvirtProviderOvnInstalled:None   ovirtProviderOvn:None    => ask user to install

???
isOvirtProviderOvnInstalled:False   ovirtProviderOvn:ANY    => no action, no propmt for OVN


In addition to ovirtProviderOvn, it would be good to add answer file variables for:
- using default credentials - only works during installation, not during update
- user
- password
Comment 4 Mor 2017-05-23 10:16:34 EDT
Marcin, I think that this is the expect

(In reply to Marcin Mirecki from comment #3)
> The "ovirtProviderOvn" variable is an indicator whether we already asked the
> user to install OVN. If we did, we will not ask again, irrelevant of the
> answer (we do not want to bug the user again if he did not want it).
> 
> To solve the problem we will need to split the variable into two:
> 
> isOvirtProviderOvnInstalled - postinstallfile value
> (/etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf), telling
> engine-setup if ovirt-provider-ovn has been installed.
> 
> ovirtProviderOvn - answer file value, allowing user to specify whether to
> install the provider in an answer file
> 
> 
> Until now if the user chose not to install, we did not ask again.
> Is this the desired behaviour? 
> Or should we ask again each time?
I'm not sure about it. On one hand, it's an accessible option to push OVN into the existing installations, on the other hand it is bugging.

> 
> 
> Outcomes depending on the values of the two variables:
> 
> isOvirtProviderOvnInstalled:True   ovirtProviderOvn:ANY    => no action, no
> propmt for OVN
> isOvirtProviderOvnInstalled:None   ovirtProviderOvn:True    => install OVN
> isOvirtProviderOvnInstalled:None   ovirtProviderOvn:False    => no action,
> no propmt for OVN
> isOvirtProviderOvnInstalled:None   ovirtProviderOvn:None    => ask user to
> install
> 
> ???
> isOvirtProviderOvnInstalled:False   ovirtProviderOvn:ANY    => no action, no
> propmt for OVN
> 
> 
> In addition to ovirtProviderOvn, it would be good to add answer file
> variables for:
> - using default credentials - only works during installation, not during
> update
> - user
> - password

As for 'OVESETUP_OVN/ovirtProviderOvn=bool:True' as answer-file value, if this is the only value that is being specified, engine-setup should retrieve the credentials from the existing admin user, and use it to configure the provider.

If the user specifies 'OVESETUP_OVN/ovirtProviderOvn=bool:True' and also want to supply custom credentials (user&pass), we should also support that.

Security point-of-view, once use use the password variable in the answer-file, it should be removed from there, in order to avoid storing it insecurely.
Comment 5 Marcin Mirecki 2017-06-09 04:10:05 EDT
OVESETUP_OVN/ovirtProviderOvn is not only an answer file property.
It can be used to indicate if ovn provider should be installed.
Note that if the provider has been installed previously by engine-setup (only after this change is in), this property will not have any effect.
Comment 6 Mor 2017-06-18 07:59:20 EDT
Verified on:
4.2.0-0.0.master.20170609091031.gitc86d08a.el7.centos
Comment 7 Sandro Bonazzola 2017-12-20 05:59:16 EST
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.
Comment 8 Yedidyah Bar David 2017-12-24 05:30:16 EST
We usually do not document the answer file.

The point in this bug was that the generated answer file did not include this var.

So doc text can be something like:

engine-setup, when ran interactively, and when choosing to install/configure the OVN provider, now correctly saves the questions about OVN to the answer file, so that running it with the generated answer file will not ask them.

Note You need to log in before you can comment on or make changes to this bug.