Bug 1024732 - [RFE] engine-cleanup does not remove files that were not changed by engine-setup
Summary: [RFE] engine-cleanup does not remove files that were not changed by engine-setup
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Setup.Engine
Version: ---
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Yedidyah Bar David
QA Contact: Jiri Belka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-30 10:40 UTC by Yedidyah Bar David
Modified: 2017-06-08 06:12 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-06-07 21:39:40 UTC
oVirt Team: Integration
Embargoed:
ylavi: ovirt-future?
rule-engine: planning_ack?
sbonazzo: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1060529 0 high CLOSED [RFE] cleanup - support partial cleanup properly 2021-02-22 00:41:40 UTC

Internal Links: 1060529

Description Yedidyah Bar David 2013-10-30 10:40:18 UTC
Description of problem:

engine-setup does not add to uninstall.d files that were not changed by it. Therefore, engine-cleanup does not remove them.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. engine-setup
2. engine-cleanup, choose to not delete pki
3. engine-setup
4. engine-cleanup

Actual results:

/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf is not removed

Expected results:

/etc/ovirt-engine/engine.conf.d/10-setup-pki.conf is removed by cleanup

Additional info:

Comment 1 Alon Bar-Lev 2013-10-30 10:44:38 UTC
The idea is to not clean files that are not changed.

This whole partial cleanup is something that we should stop supporting.

But... if we do want to support it, just leave the uninstall information at partial cleanup for these groups that are not removed.

Comment 2 Sandro Bonazzola 2013-11-21 07:57:26 UTC
Proposing this for 3.3.1.

Comment 3 Yedidyah Bar David 2014-01-15 08:27:21 UTC
Some further thoughts: I think we should keep hashes of all files, not only ones we actually modified, and that upgrade should check them too and alert if files are missing or their hashes changed. Such files should not be deleted on cleanup. Actually I think that we should keep per file whether it existed or newly-created and only delete on cleanup files that did not exist.

Comment 4 Alon Bar-Lev 2014-01-15 08:31:05 UTC
(In reply to Yedidyah Bar David from comment #3)
> Some further thoughts: I think we should keep hashes of all files, not only
> ones we actually modified, and that upgrade should check them too and alert
> if files are missing or their hashes changed. Such files should not be
> deleted on cleanup. Actually I think that we should keep per file whether it
> existed or newly-created and only delete on cleanup files that did not exist.

we do not write rpm (or any package management) replacement.
what we do not touch (create/modify) we leave for the distro package management to handle using its standard procedures.

Comment 5 Sandro Bonazzola 2014-01-15 08:40:19 UTC
Going with solution proposed in comment #1?

Comment 6 Alon Bar-Lev 2014-01-15 08:44:29 UTC
(In reply to Sandro Bonazzola from comment #5)
> Going with solution proposed in comment #1?

what I think is that the uninstall file should be left if any component is left.

Comment 7 Yedidyah Bar David 2014-01-15 08:48:08 UTC
(In reply to Sandro Bonazzola from comment #5)
> Going with solution proposed in comment #1?

Seems so, but as commented later, that's only part of the issue.

Not sure it should be considered for zstream. I'll try to find a scenario where this solves a real problem, besides partial cleanup.

Comment 8 Alon Bar-Lev 2014-01-15 08:52:19 UTC
(In reply to Yedidyah Bar David from comment #7)
> Not sure it should be considered for zstream. I'll try to find a scenario
> where this solves a real problem, besides partial cleanup.

I too do not think this worth z-stream, partial uninstallation is something I consider experimental.

Comment 9 Yedidyah Bar David 2014-01-15 09:12:01 UTC
(In reply to Alon Bar-Lev from comment #4)
> we do not write rpm (or any package management) replacement.
> what we do not touch (create/modify) we leave for the distro package
> management to handle using its standard procedures.

If an upgrade overwritten /etc/sysconfig/iptables, an admin did some manual changes, I think it's nice if a later upgrade will warn the admin that his changes will be overwritten.

Comment 10 Sandro Bonazzola 2014-01-15 09:18:05 UTC
(In reply to Alon Bar-Lev from comment #8)
> (In reply to Yedidyah Bar David from comment #7)
> > Not sure it should be considered for zstream. I'll try to find a scenario
> > where this solves a real problem, besides partial cleanup.
> 
> I too do not think this worth z-stream, partial uninstallation is something
> I consider experimental.

I agree, moving this to 3.4.0.

Comment 11 Sandro Bonazzola 2014-04-29 06:02:04 UTC
Re-targeting to 3.4.1

Comment 13 Yedidyah Bar David 2014-11-05 10:38:04 UTC
Some other changes in cleanup are planned for 3.6. I do not think we'll backport, and this bug in itself is not urgent. Postponing for now.

Comment 14 Yaniv Kaul 2017-06-07 21:39:40 UTC
Closing old RFEs (this one specifically has been dragging for ~4 years from release to release).

Comment 15 Yedidyah Bar David 2017-06-08 06:12:22 UTC
(In reply to Yaniv Kaul from comment #14)
> Closing old RFEs (this one specifically has been dragging for ~4 years from
> release to release).

I tend to agree about the specific subject of current bug, but we still might consider comment 3 and comment 9. In practice, the specific issue of comment 9 was already handled later on (bug 1109326) - if we handled current earlier, it would (partially) make the other redundant. Quickly reviewing our setup code, I think we have almost no other similar examples - all the rest is either edited in-place, not blindly overwritten - e.g. /etc/httpd/conf.d/ssl.conf - or is owned by engine-setup - e.g. all stuff under /etc/ovirt-engine and /etc/pki/ovirt-engine. For the latter, it would still be nice if we checked and alerted if user changed them manually.


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