Bug 988685 - yum leaves empty directory when upgrading rhevm-setup
Summary: yum leaves empty directory when upgrading rhevm-setup
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-setup
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: 3.3.0
Assignee: Alon Bar-Lev
QA Contact: sefi litmanovich
URL:
Whiteboard: integration
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-26 06:51 UTC by Jiri Belka
Modified: 2015-09-22 13:09 UTC (History)
11 users (show)

Fixed In Version: is8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 17377 0 None None None Never

Description Jiri Belka 2013-07-26 06:51:05 UTC
Description of problem:

# engine-upgrade 
++ readlink -f /usr/bin/engine-upgrade
+ script=/usr/share/ovirt-engine/setup/bin/ovirt-engine-setup
++ dirname /usr/share/ovirt-engine/setup/bin/ovirt-engine-setup
+ scriptdir=/usr/share/ovirt-engine/setup/bin
+ . /usr/share/ovirt-engine/setup/bin/ovirt-engine-setup.env
++ DEV_PYTHON_DIR=
++ ENV=/etc/ovirt-engine-setup.env.d
+++ '[' -d /etc/ovirt-engine-setup.env.d ']'
+++ readlink -f /usr/bin/engine-upgrade
++ script=/usr/share/ovirt-engine/setup/bin/ovirt-engine-setup
+++ dirname /usr/share/ovirt-engine/setup/bin/ovirt-engine-setup
++ scriptdir=/usr/share/ovirt-engine/setup/bin
++ extraenv=
++ '[' -z '' ']'
++ '[' -n '' ']'
++ '[' -x /usr/share/ovirt-engine/setup/bin/otopi ']'
++ otopidir=/usr/sbin
+++ cd /usr/share/ovirt-engine/setup/bin
+++ pwd
++ export PYTHONPATH=/usr/share/ovirt-engine/setup/bin/..::
++ PYTHONPATH=/usr/share/ovirt-engine/setup/bin/..::
+ baseenv='"APPEND:BASE/pluginPath=str:/usr/share/ovirt-engine/setup/bin/../plugins" APPEND:BASE/pluginGroups=str:ovirt-engine-common:ovirt-engine-setup'
+ otopienv=
+ environment=
+ '[' -n '' ']'
+ OTOPI_NONROOT=1
+ exec /usr/sbin/otopi '"APPEND:BASE/pluginPath=str:/usr/share/ovirt-engine/setup/bin/../plugins" APPEND:BASE/pluginGroups=str:ovirt-engine-common:ovirt-engine-setup  '
***L:ERROR Internal error: No module named releasepreview

# rpm -qf /usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/releasepreview/
file /usr/share/ovirt-engine/setup/plugins/ovirt-engine-setup/releasepreview is not owned by any package

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

How reproducible:


Steps to Reproduce:
1. try to upgrade from is6 to is7
2.
3.

Actual results:
ERROR

Expected results:


Additional info:

Comment 1 Jiri Belka 2013-07-26 07:00:07 UTC
# ls -l /usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/releasepreview/
total 0

Comment 2 Lukas Svaty 2013-07-26 08:59:27 UTC
same behaviour with clean installation:

my steps:
1. engine-upgrade: Failed
2. engine-cleanup: Success
3. engine-setup: Failed

Comment 3 yeylon@redhat.com 2013-07-26 10:42:57 UTC
workaround - one can use old engine-upgrade.py directly instead of new
redesigned ovirt-engine-setup.

* works for upgrade:

/usr/share/ovirt-engine/scripts/engine-upgrade.py

* broken (new upgrade style):

# ls -l `which engine-upgrade`
lrwxrwxrwx. 1 root root 52 Jul 26 11:00 /usr/bin/engine-upgrade -> /usr/share/ovirt-engine/setup/bin/ovirt-engine-setup

Comment 4 Itamar Heim 2013-07-28 07:30:54 UTC
alon, similar to http://lists.ovirt.org/pipermail/users/2013-July/015436.html ?

Comment 5 Alon Bar-Lev 2013-07-28 07:49:00 UTC
(In reply to Itamar Heim from comment #4)
> alon, similar to
> http://lists.ovirt.org/pipermail/users/2013-July/015436.html ?

yes. I don't understand why yum do not cleanup files properly. files were in package then are not, they should have been removed.

jiri, you can just remove manually:

/usr/share/ovirt-engine/setup/plugins/ovirt-engine-setup/releasepreview/

I will try to find some workaround for yum.

Comment 6 Alon Bar-Lev 2013-07-28 09:07:22 UTC
I can confirm that this happens with rhevm-setup, I cannot reproduce this with my own specs.

Attempting to understand the root cause.

Comment 7 Alon Bar-Lev 2013-07-28 11:41:36 UTC
So we have this issue with is6, and we cannot fix it in is7 as it already out... and even so, not sure it worth to fix issues from unstable to unstable.

But definitely this issue is important for future.

Comment 8 Alon Bar-Lev 2013-07-28 11:41:55 UTC
packaging: spec: setup: do not leave empty directories on remove


when installing files via wildcards, for example:
%{_datadir}/*/*.py

rpm does not record the directory within his archive, so upon removal
this directory is left, while the files are removed.

we do want to avoid the need to specify each file within the spec file,
as source tree is organized properly, we can add the top level.

however, in future if we have the need to split the directory structure
into two packages, we will have to work a bit harder while maintaining
the spec file, we may consider to generate it(?).

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988685
Change-Id: I63fe12c6f29ff82588dfabb5df93eaca12154c12
Signed-off-by: Alon Bar-Lev <alonbl>

Comment 9 Alon Bar-Lev 2013-08-01 09:25:16 UTC
QA NOTICE:

As this is fixed in is8, verify can only be done at is9 or using custom build.

Comment 10 sefi litmanovich 2013-09-03 14:43:40 UTC
Upgrede from is11 to is12 works fine.
Proccess has changed and is done so:

1. Update REPO files
2. engine-upgrade-check
3. yum update rhevm-setup
4. engine-setup

No empty directory is left.

Comment 13 Itamar Heim 2014-01-21 22:30:24 UTC
Closing - RHEV 3.3 Released

Comment 14 Itamar Heim 2014-01-21 22:30:30 UTC
Closing - RHEV 3.3 Released

Comment 15 Itamar Heim 2014-01-21 22:33:29 UTC
Closing - RHEV 3.3 Released


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