Bug 1031557 - /etc/exports is removed on cleanup
/etc/exports is removed on cleanup
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup (Show other bugs)
3.3.0
Unspecified Unspecified
high Severity high
: ---
: 3.3.0
Assigned To: Yedidyah Bar David
sefi litmanovich
integration
: Triaged
Depends On:
Blocks: 1034219 3.3snap3
  Show dependency treegraph
 
Reported: 2013-11-18 04:49 EST by Yedidyah Bar David
Modified: 2014-01-21 17:33 EST (History)
8 users (show)

See Also:
Fixed In Version: is24
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1034219 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 20715 None None None Never
oVirt gerrit 21343 None None None Never

  None (edit)
Description Yedidyah Bar David 2013-11-18 04:49:19 EST
Description of problem:

If engine-setup changed /etc/exports (to add an iso domain), engine-cleanup will remove it.

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


How reproducible:
Always

Steps to Reproduce:
1. Make sure you do not have /etc/exports.d and do have /etc/exports
2. engine-setup
3. engine-cleanup

Actual results:

/etc/exports is removed

Expected results:

/etc/exports should not be removed. Ideally it should probably have the same content it had before engine-setup.

Additional info:

On recent fedora, there is /etc/exports.d, and engine-setup adds a file there, and cleanup removes it. Still, if /etc/exports.d is removed and /etc/exports is used instead, the bug applies. el6 does not support /etc/exports.d so it always applies there.
Comment 1 Sandro Bonazzola 2013-11-19 02:46:18 EST
patch merged on upstream master and 3.3 branches
Comment 2 Yedidyah Bar David 2013-11-25 05:17:20 EST
After discussing this with Sefi who failed to reproduce, I think the bug actually affects only fedora, or, for that matter, systems with /etc/exports.d .

I think (but did not try to reproduce) that a scenario that can reproduce is:

1.
Do not have /etc/exports.d
Do not have /var/lib/exports/iso*
engine-setup, configure iso domain
engine-cleanup
rm -rf /var/lib/exports/iso (if not deleted by cleanup)

This leaves /etc/exports with /var/lib/exports/iso

2.
mkdir /etc/exports.d
engine-setup

This deletes /var/lib/exports/iso from /etc/exports and adds it to a file under /etc/exports.d .

This is done in the function _delete_path, which prior to http://gerrit.ovirt.org/20715 did not mark the file to be unremovable.

3.
engine-cleanup

This will delete /etc/exports.

It might have happened to me with a somewhat less complex scenario, involving a 3.2 setup (which edited /etc/exports) and upgrade to 3.3 or something like that.
I did not manage to find clear backups that show how it happened, although I am definitely certain it did happen :-)

In any case, it's quite unlikely to happen on a clean el6 machine, and also not very likely on fedora.

Still, the fix is trivial - it literally just marks the file unremovable, so that engine-cleanup will not delete the file, in a certain flow that otherwise could have deleted it - and I think we can leave it in even if reproduction is complex.
Comment 3 sefi litmanovich 2013-11-25 07:50:37 EST
Verified on RHEL6.5, RHEVM 3.3 IS23 and IS24.2.
Bug will be cloned to upstream for testing on Fedora.
Comment 4 Itamar Heim 2014-01-21 17:30:03 EST
Closing - RHEV 3.3 Released
Comment 5 Itamar Heim 2014-01-21 17:30:05 EST
Closing - RHEV 3.3 Released
Comment 6 Itamar Heim 2014-01-21 17:33:00 EST
Closing - RHEV 3.3 Released

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