Bug 248385 - snapshot rollbacks not working as designed in production w/ yum-rhn-plugin-0.4.3-2.el5
snapshot rollbacks not working as designed in production w/ yum-rhn-plugin-0....
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin (Show other bugs)
5.0
All Linux
high Severity urgent
: rc
: ---
Assigned To: Justin Sherrill
Preethi Thomas
na
: Reopened
: 248404 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-16 11:52 EDT by wes hayutin
Modified: 2013-01-10 05:19 EST (History)
7 users (show)

See Also:
Fixed In Version: RHBA-2008-0360
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-05-21 10:27:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wes hayutin 2007-07-16 11:52:20 EDT
Description of problem:
snapshot rollbacks not working as designed in production (rhn.redhat.com) w/
yum-rhn-plugin-0.4.3-2.el5.  rollbacks in production are not rolling back :) on
RHEL 5 clients w/ latest yum-rhn plugin.

Here is my scheduled rollback of the errata xorg-x11-xfs

Package  	Current Version  	Snapshot Version  	Difference
xorg-x11-xfs 	1.0.2-4:1 	1.0.2-3.1:1 	Current profile newer


-----------------------------
Summary:  	Package Synchronization scheduled by whayutin
Details: 	This action will be executed after 2007-07-16 11:17:31 EDT.

This action's status is: Failed.
The client picked up this action on 2007-07-16 11:17:39 EDT.
The client completed this action on 2007-07-16 11:17:44 EDT.
Client execution returned "Error while executing packages action: Transaction
Check Error: package xorg-x11-xfs-1.0.2-4 (which is newer than
xorg-x11-xfs-1.0.2-3.1) is already installed [[6]]" (code -1)
Changes Scheduled:

    * Replace xorg-x11-xfs-1.0.2-4:1 with xorg-x11-xfs-1.0.2-3.1:1

Time: 	2007-07-16 11:17:31 EDT
---------------------------------


D: May free Score board((nil))
D: Sending back response ((6,), 'Error while executing packages action:
Transaction Check Error:   package xorg-x11-xfs-1.0.2-4 (which is newer than
xorg-x11-xfs-1.0.2-3.1) is already installed\n', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
D: local action status:  (0, 'rpm database not modified since last update (or
package list recently updated)', {})
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))
[root@fjs-0-19 ~]# rpm -qa | grep xorg-x11
xorg-x11-filesystem-7.1-2.fc6
xorg-x11-xfs-1.0.2-4
xorg-x11-font-utils-7.1-2
xorg-x11-fonts-ISO8859-1-75dpi-7.1-2.1.el5
[root@fjs-0-19 ~]# rpm -qa | grep yum rhn
grep: rhn: No such file or directory
[root@fjs-0-19 ~]# rpm -qa | grep rhn
rhnlib-2.2.5-1.el5
rhn-client-tools-0.4.13-1.el5
rhn-check-0.4.13-1.el5
rhn-setup-0.4.13-1.el5
yum-rhn-plugin-0.4.3-2.el5
rhnsd-4.6.1-1.el5



Recreate...
1. register a rhel5 box to production
2. install the upgrade to the yum-rhn-plugin
3. create a snapshot baseline.. (this may take a few attempts, maybe a regression)
4. install an errata or upgrade to a pkg.. ex. xorg-x11-xfs-1.0.2-4
5. rollback to snapshot

error.. 
Transaction Check Error:   package xorg-x11-xfs-1.0.2-4 (which is newer than
xorg-x11-xfs-1.0.2-3.1) is already installed\n', {})

The rollback should be successful
Comment 1 wes hayutin 2007-07-16 12:08:02 EDT
happens w/ multiple packages.. not just xorg

D: Sending back response ((6,), 'Error while executing packages action:
Transaction Check Error:   package autofs-5.0.1-0.rc2.43.0.2 (which is newer
than autofs-5.0.1-0.rc2.42) is already installed\n', {})
Comment 2 wes hayutin 2007-07-16 12:11:30 EDT
[Mon Jul 16 11:45:49 2007] up2date D: handle_action actionid = 56345441, version = 2
[Mon Jul 16 11:45:49 2007] up2date D: do_call packages.update ([['autofs',
'5.0.1', '0.rc2.43.0.2', '1']],)
[Mon Jul 16 11:45:49 2007] up2date D: Called update [['autofs', '5.0.1',
'0.rc2.43.0.2', '1']]
[Mon Jul 16 11:45:51 2007] up2date D: Downloading Packages:
[Mon Jul 16 11:45:52 2007] up2date D: Running Transaction Test
[Mon Jul 16 11:45:52 2007] up2date D: Finished Transaction Test
[Mon Jul 16 11:45:52 2007] up2date D: Transaction Test Succeeded
[Mon Jul 16 11:45:52 2007] up2date D: Running Transaction
[Mon Jul 16 11:45:54 2007] up2date Adding packages to package profile:
['autofs-5.0.1-0.rc2.43.0.2']
[Mon Jul 16 11:45:54 2007] up2date Removing packages from package profile: []
[Mon Jul 16 11:45:54 2007] up2date D: Sending back response (0, 'Update
Succeeded', {})
[Mon Jul 16 11:45:55 2007] up2date D: do_call packages.checkNeedUpdate ('rhnsd=1',)
[Mon Jul 16 11:45:55 2007] up2date D: Called refresh_rpmlist
[Mon Jul 16 11:45:55 2007] up2date Updating package profile
[Mon Jul 16 11:45:57 2007] up2date D: local action status:  (0, 'rpmlist
refreshed', {})
[Mon Jul 16 11:48:34 2007] up2date D: check_action {'action': "<?xml
version='1.0'?>\n<methodCall>\n<methodName>packages.runTransaction</methodName>\n<params
>\n<param>\n<value><struct>\n<member>\n<name>packages</name>\n<value><array><data>\n<value><array><data>\n<value><array><data>\n<value><string>autofs</string
></value>\n<value><string>5.0.1</string></value>\n<value><string>0.rc2.43.0.2</string></value>\n<value><string>1</string></value>\n<value><string></string></
value>\n</data></array></value>\n<value><string>e</string></value>\n</data></array></value>\n<value><array><data>\n<value><array><data>\n<value><string>autof
s</string></value>\n<value><string>5.0.1</string></value>\n<value><string>0.rc2.42</string></value>\n<value><string>1</string></value>\n<value><string></stri
ng></value>\n</data></array></value>\n<value><string>i</string></value>\n</data></array></value>\n</data></array></value>\n</member>\n</struct></value>\n</pa
ram>\n</params>\n</methodCall>\n", 'version': 2, 'id': 56345462}
[Mon Jul 16 11:48:34 2007] up2date updating login info
[Mon Jul 16 11:48:34 2007] up2date logging into up2date server
[Mon Jul 16 11:48:34 2007] up2date successfully retrieved authentication token
from up2date server
[Mon Jul 16 11:48:34 2007] up2date D: logininfo: {'X-RHN-Server-Id': 1007683522,
'X-RHN-Auth-Server-Time': '1184600945.8', 'X-RHN-Auth': 'Sr2PQed96C43B3/RqyA
AOg==', 'X-RHN-Auth-Channels': [['rhel-i386-server-5', '20070712051838', '1',
'1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'}
[Mon Jul 16 11:48:34 2007] up2date D: handle_action {'action': "<?xml
version='1.0'?>\n<methodCall>\n<methodName>packages.runTransaction</methodName>\n<param
s>\n<param>\n<value><struct>\n<member>\n<name>packages</name>\n<value><array><data>\n<value><array><data>\n<value><array><data>\n<value><string>autofs</strin
g></value>\n<value><string>5.0.1</string></value>\n<value><string>0.rc2.43.0.2</string></value>\n<value><string>1</string></value>\n<value><string></string><
/value>\n</data></array></value>\n<value><string>e</string></value>\n</data></array></value>\n<value><array><data>\n<value><array><data>\n<value><string>auto
fs</string></value>\n<value><string>5.0.1</string></value>\n<value><string>0.rc2.42</string></value>\n<value><string>1</string></value>\n<value><string></str
ing></value>\n</data></array></value>\n<value><string>i</string></value>\n</data></array></value>\n</data></array></value>\n</member>\n</struct></value>\n</p
aram>\n</params>\n</methodCall>\n", 'version': 2, 'id': 56345462}
[Mon Jul 16 11:48:34 2007] up2date D: handle_action actionid = 56345462, version = 2
[Mon Jul 16 11:48:34 2007] up2date D: do_call packages.runTransaction
({'packages': [[['autofs', '5.0.1', '0.rc2.43.0.2', '1', ''], 'e'], [['autofs',
'5.0.1'
, '0.rc2.42', '1', ''], 'i']]},)
[Mon Jul 16 11:48:38 2007] up2date D: Searching for installed package to remove:
('autofs', '', '1', '5.0.1', '0.rc2.43.0.2')
[Mon Jul 16 11:48:38 2007] up2date D: Found 1 package(s) to remove
[Mon Jul 16 11:48:38 2007] up2date D: Downloading Packages:
[Mon Jul 16 11:48:39 2007] up2date D: Running Transaction Test
[Mon Jul 16 11:48:40 2007] up2date D: Finished Transaction Test
[Mon Jul 16 11:48:40 2007] up2date D: Sending back response ((6,), 'Error while
executing packages action: Transaction Check Error:   package autofs-5.0.1-0.
rc2.43.0.2 (which is newer than autofs-5.0.1-0.rc2.42) is already installed\n', {})
[Mon Jul 16 11:48:40 2007] up2date D: do_call packages.checkNeedUpdate ('rhnsd=1',)
[Mon Jul 16 11:48:40 2007] up2date D: local action status:  (0, 'rpm database
not modified since last update (or package list recently updated)', {})

Comment 3 Bret McMillan 2007-07-26 16:29:09 EDT
So, the action the server handed down to the client basically works out to:

(({'packages': [[['autofs', '5.0.1', '0.rc2.43.0.2', '1', ''], 'e'], [['autofs',
'5.0.1', '0.rc2.42', '1', ''], 'i']]},), u'packages.runTransaction')


It removes 0.rc2.43.0.2 and installs 0.rc2.42, and no arch information is
provided.  My suspicion is that this is similar to the up2date issue we found
wrt to snapshot rollback & multilib machines.  We're pretty seamlessly handing
this data to the yum libraries; it's possible they deal w/ the above scenario
differently than we wish.

Moving this to pradeep for more client-side review; it'd be helpful to know more
about the state of the machine...
  rpm -qa --qf "%{NAME}-%{VERSION}-%{RELEASE}:%{EPOCH}.%{ARCH}\n" 
would be helpful...
Comment 4 RHEL Product and Program Management 2007-07-26 16:33:14 EDT
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Since this
bugzilla is in a component that is not approved for the current
release, it has been closed with resolution deferred.  You may
reopen this bugzilla for consideration in the next release.
Comment 8 Brandon Perkins 2007-08-16 15:53:53 EDT
*** Bug 248404 has been marked as a duplicate of this bug. ***
Comment 9 Pradeep Kilambi 2007-08-16 17:26:42 EDT
So from what I see This feature never worked since we release yum-plugin.. wes
and I tried older versions of yum-rhn-plugin to see if might have been a
regression. But all the older rpms give us the same result. Including the new beta. 

I was expecting some code in yum-rhn-plugin to deal with downgrading a package..
but nothing appeared.. iirc core yum doesn't support downgrades, its gotta be in
yum-plugin.

so as this isnt a regression and we have like 3 days for 5.1 freeze, we decided
to move this to 5.2

Comment 10 wes hayutin 2007-08-16 18:04:58 EDT
tried w/ [root@whayutin ~]# rpm -qa | grep yum-rhn
yum-rhn-plugin-0.4.2-1.el5

and got the same results... 
this never worked in RHEL 5

We also think the scope of this bug is a little bigger than we originally
thought because snapshot profiles, and profile syncs must also be broken in RHEL5
Comment 11 wes hayutin 2007-08-17 10:18:31 EDT
Ok.. confirmed.. Snapshot profile syncs are also broken in RHEL 5 due to this bug.

Recreate..
1. register two clean systems to sat.
2. update/upgrade errata on one system
3. enable provisioning on upgraded system
4. System ->SDC->Software->Profiles.. Sync upgraded system to NON-upgraded system..

will fail w/ a similar error to..
D: May free Score board((nil))
D: Sending back response ((6,), 'Error while executing packages action:
Transaction Check Error:   package bind-utils-9.3.3-9.0.1.el5 (which is newer
than bind-utils-9.3.3-7.el5) is already installed\n  package
cups-1.2.4-11.5.1.el5 (which is newer than cups-1.2.4-11.5.el5) is already
installed\n', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',)
D: local action status:  (0, 'rpm database not modified since last update (or
package list recently updated)', {})
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))

Comment 12 Pradeep Kilambi 2007-08-17 10:23:50 EDT
yep I would expect that, One thing what we might try is yum-utils has something
like an allow-downgrades flag i think, If we enable that flag yum might try
doing the downgrade requests sent by rhn_check.
Comment 13 Pradeep Kilambi 2007-08-17 10:29:56 EDT
Also jbowes mentioned that we could do that programmatic..I'm still digging deep
into the yum world to see if we can add that capability in the plugin.

Oh and just a note, customer was seeing something similar on rhel-4 as well.. so
t looks like this issue existed even before yum-plugin
Comment 14 wes hayutin 2007-08-17 10:30:54 EDT
My own personal opinion is that this bug should not be differed until 5.2.
This affects a couple important functions in RHN.  

1. Provisioning snapshot rollbacks
2. snapshot profiles

These functions work w/ RHEL 4, and would be very confusing to an admin when
they do not work w/ RHEL 5.  Are there any other functions in RHN that work in
RHEL4 but not RHEL5?  I hope we can figure out a way to get this fixed.

Thanks
Comment 15 wes hayutin 2007-08-17 10:32:49 EDT
I'll retest RHEL4 but in my latest tests... about a week ago.. it worked
Prad, can you ping me about the details of the RHEL4 failure..

Thanks
Comment 16 Pradeep Kilambi 2007-08-17 10:45:39 EDT
Agreed! but I don't see any other option.. we just have 3 days left for 5.1
freeze, and we are not allowed to release feature fixes in z-stream
releases(only regressions) I think(not sure though).If we're allowed to release
it as an async errata then great..

and regarding rhel-4 mizmo was mentioning it could be a flaky system that
customer had with unsupported packages. 

But it would'nt hurt to make sure its working on rhel-4.
Comment 17 wes hayutin 2007-08-17 11:10:00 EDT
RHEL4 U5 is working

Summary:  	Package Synchronization scheduled by admin
Details: 	This action will be executed after 2007-08-17 11:05:50 EDT.

This action's status is: Completed.
The client picked up this action on 2007-08-17 11:06:35 EDT.
The client completed this action on 2007-08-17 11:06:48 EDT.
Client execution returned "packages.transaction ran successfully" (code 0)
Changes Scheduled:

    * Replace bind-libs-9.2.4-27.0.1.el4:20 with bind-libs-9.2.4-24.EL4:20
    * Replace bind-utils-9.2.4-27.0.1.el4:20 with bind-utils-9.2.4-24.EL4:20
    * Replace bluez-utils-2.10-2.2 with bluez-utils-2.10-2.1
    * Replace device-mapper-1.02.17-3.0.1.el4 with device-mapper-1.02.17-3.el4
    * Replace file-4.10-3.0.2.el4 with file-4.10-3.EL4.5
    * Replace freetype-2.1.9-6.el4 with freetype-2.1.9-5.el4
    * Replace krb5-libs-1.3.4-49 with krb5-libs-1.3.4-47
    * Replace krb5-workstation-1.3.4-49 with krb5-workstation-1.3.4-47
    * Replace libpng-1.2.7-3.el4:2 with libpng-1.2.7-1.el4.2:2
    * Replace vixie-cron-4.1-47.EL4:4 with vixie-cron-4.1-44.EL4:4
Comment 20 Pradeep Kilambi 2007-08-29 11:51:13 EDT
This is not a regression for 5.1. We never had the supporting functionality for
this feature, since yum-rhn-plugin was released. 
Comment 21 wes hayutin 2007-08-29 12:45:57 EDT
Even though the function was never in the yum rhn-plugin an argument can be made
that since this does work for RHEL 4x but not yum  based RHEL 5 clients it could
be considered a regression.  
Comment 22 Mike Orazi 2007-09-18 10:02:06 EDT
Client side change, so I'm going to unaligned it from rhn503.
Comment 23 Pradeep Kilambi 2007-09-18 10:03:16 EDT
as this is a yum issue, moving to shughes plate for rhel-5.2
Comment 24 Filipe Miranda 2007-11-19 08:02:49 EST
Any hot-fix yet? 
Comment 25 Justin Sherrill 2007-12-11 16:57:26 EST
fixed in rev 134804.
Comment 26 Justin Sherrill 2007-12-11 16:58:45 EST
(In reply to comment #24)
> Any hot-fix yet? 

A hotfix has not yet been released or requested, but now that there is a fix
available, feel free to request one through support channels.
Comment 28 Pradeep Kilambi 2008-02-14 10:04:38 EST
moving to right owner..
Comment 29 Cameron Meadors 2008-04-22 11:00:58 EDT
What is the fix and how do I test it?  I am confused since this feature was
never in RHEL 5
Comment 30 Cameron Meadors 2008-04-22 14:44:15 EDT
Wes, do you have a setup/environment to test this?
Comment 31 wes hayutin 2008-04-22 15:25:20 EDT
all you need is a rhel 5 client registered to rhn hosted.

TestPlan
1. Register a rhel 5 machine to hosted rhn.   rhn.webqa.redhat.com for example
2. via the webui.. navigate to the system -> provisioning -> snapshot Tags
3. create a snapshot Tag, this takes a profile of the current software installed.

what was working..

install a package..
go back to the snapshot tag you created and rollback the changes. you should see
that package get removed.

what was not working...
update a package
go back to the snapshot tag you created and rollback the changes. you should see
that package update removed and the older version of the package installed.

Variations should include.
1. using just one package
2. using a lot of packages
3. register a RHEL 5.0 box, update the box to latest version 5_u1 +patches
rollback the updates.. and you your back at rhel 5.0

Oops.. one more scenario
Its similar, but also needs testing.
1. Register a rhel 5.0 to rhn hosted
2. go to system -> software -> packages -> profile
3. create a profile
4. update the system to rhel 5U1
5. go back to system -> software -> packages -> profile
6. compare the current profile to the one you created in step 2.
then sync the packages

after the sync you should be back at rhel 5.0

thanks




email me w/ questions or ping weshay.

Comment 32 Cameron Meadors 2008-04-22 16:04:21 EDT
I followed the steps in comment #31.  All was well until I looked to see what
version of the package was installed post rollback.  The package was not
installed.  So it didn't rollback, it removed.

Details:
Registered against hosted.
Created the snapshot tag
Updated to nscd-2.5-24
Scheduled the rollback snapshot
Waited for it to happen
Check version of nscd (not installed anymore)
Comment 33 Cameron Meadors 2008-04-22 16:06:13 EDT
Sorry, I have to retest.  The package the it was rolling back to was not in rhn
channels.
Comment 34 Cameron Meadors 2008-04-29 14:49:24 EDT
I was able to rollback to an older package.
Comment 36 errata-xmlrpc 2008-05-21 10:27:16 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0360.html

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