Bug 1701121 - /etc/ovirt-provider-ovn/ovirt-provider-ovn.conf is a config file, although it's not meant to be
Summary: /etc/ovirt-provider-ovn/ovirt-provider-ovn.conf is a config file, although it...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-provider-ovn
Classification: oVirt
Component: provider
Version: 1.2.20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.4.0
: 1.2.30
Assignee: Dominik Holler
QA Contact: msheena
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-18 07:02 UTC by Yedidyah Bar David
Modified: 2020-05-20 20:00 UTC (History)
6 users (show)

Fixed In Version: ovirt-provider-ovn-1.2.30-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-20 20:00:37 UTC
oVirt Team: Network
Embargoed:
sbonazzo: ovirt-4.4?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 105783 0 master MERGED Add comment to ovirt-provider-ovn.conf 2020-05-07 08:40:10 UTC
oVirt gerrit 106409 0 master MERGED spec: ovirt-provider-ovn.conf is no config file 2020-05-07 08:40:11 UTC

Description Yedidyah Bar David 2019-04-18 07:02:04 UTC
Description of problem:

ovirt-provider-ovn's spec file has:

%config(noreplace) %{_sysconfdir}/ovirt-provider-ovn

Which turns into:

# rpm -qc ovirt-provider-ovn
/etc/logrotate.d/ovirt-provider-ovn
/etc/ovirt-provider-ovn/conf.d/README
/etc/ovirt-provider-ovn/logger.conf
/etc/ovirt-provider-ovn/ovirt-provider-ovn.conf

However, /etc/ovirt-provider-ovn/ovirt-provider-ovn.conf itself was not meant to be so, and the documentation [1] only says to add/change files inside /etc/ovirt-provider-ovn/conf.d .

What to do next?

If we can be certain that people did not change ovirt-provider-ovn.conf itself, we can simply exclude it from %config in the spec file. If we know that many people did change it, we should probably stop changing it ourselves via rpm updates, and instead create a new file e.g. ovirt-provider-ovn.conf.example or whatever, where we introduce our changes. We then also have to make sure that the defaults for new items are as they are in the .example file, and/or add a new file for defaults inside conf.d.

See also: bug 1630824. For that bug, which is about backup/restore, we are going to assume, for now, that it's enough to backup/restore conf.d. If it turns out that we decide to officially support ovirt-provider-ovn.conf as a conf file, we need to patch engine-backup accordingly.

Comment 2 Yedidyah Bar David 2019-04-18 07:57:19 UTC
gerrit hook it too greedy

Comment 3 Miguel Duarte Barroso 2019-04-24 10:19:31 UTC
I think it would be feasible to always overwrite the ovirt-provider-ovn.conf with the default for the release being installed *if* the current one is backed-up during the upgrade. 

We could print something to the users during update highlighting this happened, and indicate they would have to merge the two files.

This would allow us to remove the ovirt-provider-ovn.conf from the %config section, and provide a way out (I'm aware it's not a perfect one) for the impacted users.

Comment 4 Dominik Holler 2019-04-30 14:09:38 UTC
We should also add a comment in /etc/ovirt-provider-ovn/setup-ovirt-provider-ovn.conf, that this file might be overwritten during updates.

Comment 5 Yedidyah Bar David 2019-05-01 05:53:22 UTC
(In reply to Dominik Holler from comment #4)
> We should also add a comment in
> /etc/ovirt-provider-ovn/setup-ovirt-provider-ovn.conf, that this file might
> be overwritten during updates.

You might want to do that in 4.3, ASAP, add this to the release notes, and only change it to be non-%config in 4.4. This way, people have better chances to notice.

Comment 8 Dominik Holler 2020-03-05 10:55:04 UTC
Even the bug is in state MODIFIED, I do not reflect this in the bug state, because this would cause changing to ON_QE before a new version, which contains the related code changes, is released.

Comment 9 msheena 2020-04-07 08:42:01 UTC
Verified on
===========
ovirt-provider-ovn-1.2.30-1.el8ev.noarch
ovirt-engine-4.4.0-0.31.master.el8ev.noarch

Comment 10 Sandro Bonazzola 2020-05-20 20:00:37 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

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


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