Bug 924665 - [RHEVH] symbolic link /usr/share/rhev-hypervisor-advanced/rhevh-adv-latest-6.iso is pointing to the wrong file
Summary: [RHEVH] symbolic link /usr/share/rhev-hypervisor-advanced/rhevh-adv-latest-6....
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: rhev-hypervisor
Version: 3.2.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: 3.2.0
Assignee: Mike Burns
QA Contact: Artyom
URL:
Whiteboard: infra
: 954264 961179 (view as bug list)
Depends On:
Blocks: 961338
TreeView+ depends on / blocked
 
Reported: 2013-03-22 10:10 UTC by Martin Pavlik
Modified: 2016-02-10 19:44 UTC (History)
12 users (show)

Fixed In Version: rhev-hypervisor-advanced-6.4-20130410.0.el6ev
Doc Type: Known Issue
Doc Text:
Cause: A bug in the post uninstall script of rhev-hypervisor-advanced can cause the symbolic links to be incorrect when installing a new version. Consequence: links in /usr/share/rhev-hypervisor-advanced will appear broken. Workaround (if any): yum reinstall rhev-hypervisor-advanced The above should setup things correctly. The other option is to: yum remove rhev-hypervisor-advanced rm -rf /usr/share/rhev-hypervisor-advanced yum install rhev-hypervisor-advanced Result: Once all old versions of rhev-hypervisor-advanced are removed from the system, this problem will no long manifest
Clone Of:
Environment:
Last Closed: 2013-05-21 14:00:20 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Pavlik 2013-03-22 10:10:54 UTC
Description of problem:
After instalation of package rhev-hypervisor-advanced-6.4-20130321.0.el6ev.noarch.rpm

link /usr/share/rhev-hypervisor-advanced/rhevh-adv-latest-6.iso

is pointing to the file /usr/share/rhev-hypervisor-advanced/rhevh-6.4-20130321.0.el6ev.iso

which does not exist

real iso file is named 

/usr/share/rhev-hypervisor-advanced/rhev-hypervisor-advanced-6.4-20130321.0.el6ev.iso


Version-Release number of selected component (if applicable):
rhev-hypervisor-advanced-6.4-20130321.0.el6ev.iso

How reproducible:
100%

Steps to Reproduce:
1. install package rhev-hypervisor-advanced-6.4-20130321.0.el6ev.noarch.rpm
2. run ls -lah /usr/share/rhev-hypervisor-advanced/rhevh-adv-latest-6.iso
  
Actual results:
/usr/share/rhev-hypervisor-advanced/rhevh-adv-latest-6.iso
pointing to 
/usr/share/rhev-hypervisor-advanced/rhevh-6.4-20130321.0.el6ev.iso

Expected results:
/usr/share/rhev-hypervisor-advanced/rhevh-adv-latest-6.iso
pointing to 
/usr/share/rhev-hypervisor-advanced/rhev-hypervisor-advanced-6.4-20130321.0.el6ev.iso


Additional info:
[root@mp-rhevm32 ~]# ls -lah /usr/share/rhev-hypervisor-advanced/rhevh-adv-latest-6.iso
lrwxrwxrwx. 1 root root 66 Mar 22 09:47 /usr/share/rhev-hypervisor-advanced/rhevh-adv-latest-6.iso -> /usr/share/rhev-hypervisor-advanced/rhevh-6.4-20130321.0.el6ev.iso
[root@mp-rhevm32 ~]# ls -lah /usr/share/rhev-hypervisor-advanced/rhev-hypervisor-advanced-6.4-20130321.0.el6ev.iso
-rw-r--r--. 1 root root 179M Mar 21 15:46 /usr/share/rhev-hypervisor-advanced/rhev-hypervisor-advanced-6.4-20130321.0.el6ev.iso

Comment 1 Mike Burns 2013-03-22 12:59:47 UTC
Relevant diff:

--- a/rhev-hypervisor-advanced.spec
+++ b/rhev-hypervisor-advanced.spec
@@ -84,9 +84,9 @@ ln -snf %{app_root}/${nvr}.txt  %{app_root}/version.txt
 if [ -e %{app_root}/vdsm-compatibility-${nvr##version-}.txt ]; then
     ln -snf %{app_root}/vdsm-compatibility-${nvr##version-}.txt %{app_root}/vds
 fi
-ln -snf %{app_root}/rhevh-${nv#*-}.iso %{app_root}/%{product_code}-latest-${rhe
-ln -snf %{app_root}/rhevh-${nv#*-}.iso %{app_root}/%{name}.iso
-ln -snf %{app_root}/rhevh-${nvr#*-}.iso %{app_root}/%{name}.iso
+ln -snf %{app_root}/%{name}-${nv#*-}.iso %{app_root}/%{product_code}-latest-${r
+ln -snf %{app_root}/%{name}-${nv#*-}.iso %{app_root}/%{name}.iso
+ln -snf %{app_root}/%{name}-${nvr#*-}.iso %{app_root}/%{name}.iso

 %preun
 rhel_major=%{version}
@@ -128,14 +128,13 @@ for ver in %{app_root}/version-*txt; do
 done
 if [ ! "$nvr" = "0" ]; then
     ln -snf %{app_root}/${nvr}.txt  %{app_root}/version.txt
-    ln -snf %{app_root}/rhevh-${nvr#*-}.iso %{app_root}/%{base_name}.iso
     if [ -e %{app_root}/vdsm-compatibility-${nvr##version-}.txt ]; then
         ln -snf %{app_root}/vdsm-compatibility-${nvr##version-}.txt %{app_root}
     fi
 fi
 if [ ! "$nv" = "0" ]; then
-    ln -snf %{app_root}/rhevh-${nv#*-}.iso %{app_root}/%{name}.iso
-    ln -snf %{app_root}/rhevh-${nv#*-}.iso %{app_root}/%{product_code}-latest-$
+    ln -snf %{app_root}/%{name}-${nv#*-}.iso %{app_root}/%{name}.iso
+    ln -snf %{app_root}/%{name}-${nv#*-}.iso %{app_root}/%{product_code}-latest
 fi
 %postun
 if [ $1 -eq 0 ] ; then

Comment 2 Pavel Stehlik 2013-03-28 09:04:28 UTC
I'd like to add:
There are 2 links which are broken (they leads nowhere):

ll /usr/share/rhev-hypervisor-advanced/rhevh-6.4-20130321.0.el6ev.iso
ls: cannot access /usr/share/rhev-hypervisor-advanced/rhevh-6.4-20130321.0.el6ev.iso: No such file or directory

ll /usr/share/rhev-hypervisor-advanced/rhevh-advanced.iso
ls: cannot access /usr/share/rhev-hypervisor-advanced/rhevh-6.4-20130321.0.el6ev.iso: No such file or directory

Comment 3 Mike Burns 2013-03-28 11:39:25 UTC
(In reply to comment #2)
> I'd like to add:
> There are 2 links which are broken (they leads nowhere):
> 
> ll /usr/share/rhev-hypervisor-advanced/rhevh-6.4-20130321.0.el6ev.iso
> ls: cannot access
> /usr/share/rhev-hypervisor-advanced/rhevh-6.4-20130321.0.el6ev.iso: No such
> file or directory
> 
> ll /usr/share/rhev-hypervisor-advanced/rhevh-advanced.iso
> ls: cannot access
> /usr/share/rhev-hypervisor-advanced/rhevh-6.4-20130321.0.el6ev.iso: No such
> file or directory

These should be handled by the patch in Comment 2

Comment 5 Martin Pavlik 2013-04-11 13:17:18 UTC
today I've installed rhev-hypervisor-advanced-6.4-20130410.0.el6ev.noarch.rpm

it was an update to rhev-hypervisor-advanced-6.4-20130321.0.el6ev.noarch and several older rhevh builds

it resulted in wrong symlink

lrwxrwxrwx. 1 root root        66 Apr 11 13:58 rhevh-adv-latest-6.iso -> /usr/share/rhev-hypervisor-advanced/rhevh-6.4-20130410.0.el6ev.iso

which should be
lrwxrwxrwx. 1 root root        85 Apr 11 14:59 rhevh-adv-latest-6.iso -> /usr/share/rhev-hypervisor-advanced/rhev-hypervisor-advanced-6.4-20130410.0.el6ev.iso

please obsolete old broken builds (like 6.4-20130321.0)

when I cleaned all rhev-hypervisor packages and installed   rhev-hypervisor-advanced-6.4-20130410.0.el6ev.noarch.rpm again, link was created properly

Comment 6 Mike Burns 2013-04-11 14:05:49 UTC
obsoleting won't work, despite my suggestion that it would.  Because of the ability to install rhev-hypervisor-advanced side-by-side, obsoleting an old build results in a yum error because it wants to keep the old version but also remove it.

The only way to really fix this is to remove all old versions of rhev-hypervisor-advanced and then install only 6.4-20130410.0 or newer.  Once you're in a state that has only 20130410.0 or newer, then things should work as expected.

The issue is that there is a bug in the %postun script of the builds before 20130410.0.  That bug is fixed, but for yum transactions that remove one of the broken builds, the symlinks end up broken.

Comment 7 Mike Burns 2013-04-11 14:08:26 UTC
As a side note, even an obsolete would not solve this problem if it worked correctly.  The postun script in the broken rpm runs after the post script in the new rpm.

Comment 8 Mike Burns 2013-04-11 14:17:38 UTC
Adding known issue notes with workarounds.  

Nothing else I can do to fix this that I can see.

Moving back to ON_QA for verification that other symlinks are correct and upgrades starting with 20130410.0 are correct

Comment 9 Mike Burns 2013-04-25 15:20:11 UTC
*** Bug 954264 has been marked as a duplicate of this bug. ***

Comment 10 Artyom 2013-05-05 08:22:32 UTC
Tested on rhev-hypervisor-advanced-6.4-20130501.0.el6ev.iso
lrwxrwxrwx 1 root root        85 May  5 09:29 rhevh-adv-latest-6.iso -> /usr/share/rhev-hypervisor-advanced/rhev-hypervisor-advanced-6.4-20130501.0.el6ev.iso
-rw-r--r-- 1 root root 187695104 Apr 10 21:49 rhev-hypervisor-advanced-6.4-20130410.0.el6ev.iso
-rw-r--r-- 1 root root 187695104 May  1 14:47 rhev-hypervisor-advanced-6.4-20130501.0.el6ev.iso
lrwxrwxrwx 1 root root        85 May  5 09:29 rhev-hypervisor-advanced.iso -> /usr/share/rhev-hypervisor-advanced/rhev-hypervisor-advanced-6.4-20130501.0.el6ev.iso
-rw-r--r-- 1 root root         8 Apr 10 21:58 vdsm-compatibility-6.4-20130410.0.el6ev.txt
-rw-r--r-- 1 root root         8 May  1 14:57 vdsm-compatibility-6.4-20130501.0.el6ev.txt
lrwxrwxrwx 1 root root        79 May  5 09:29 vdsm-compatibility.txt -> /usr/share/rhev-hypervisor-advanced/vdsm-compatibility-6.4-20130501.0.el6ev.txt
-rw-r--r-- 1 root root        21 Apr 10 21:58 version-6.4-20130410.0.el6ev.txt
-rw-r--r-- 1 root root        21 May  1 14:57 version-6.4-20130501.0.el6ev.txt
lrwxrwxrwx 1 root root        68 May  5 09:29 version.txt -> /usr/share/rhev-hypervisor-advanced/version-6.4-20130501.0.el6ev.txt
All links look fine.

Comment 11 Mike Burns 2013-05-15 15:25:37 UTC
*** Bug 961179 has been marked as a duplicate of this bug. ***

Comment 13 Mike Burns 2013-05-21 14:00:20 UTC
This bug refers to the rhev-hypevisor-advanced component.  This component was supposed to be introduced in RHEV 3.2.  It was later decided to drop the inclusion of this component in favor of the existing rhev-hypervisor6 component in RHEL.  

Because we're dropping the component, this bug is not valid any longer.  It only ever appeared in the rhev-hypervisor-advanced component.

Comment 14 Cheryn Tan 2013-09-17 07:27:42 UTC
Removing requires_doc_text? flag as this is not relevant to the RHEV 3.3 release notes.


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