A possible fix for YUM update failure Scenario:
RHEL 6.X update OS patches, SSH session breaks and cause update stopped. RPM database corrupted, YUM history can’t redo transaction and undo transaction. When reboot server it report kernel panic.
Run YUM history, there are duplicated package or entry in RPM DB. To
fix the issue, Issue yum-complete-transaction, please don`t reboot server, as it may still has kernel panic. Yum-complete-transaction
Issue Yum history If
yum history looks good, issue package-cleanup --problems package-cleanup --problems
Check if there is duplicated packaget package-cleanup --dupes
Clean duplicated packages package-cleanup --cleandupes
Verify package rpm -Va --nofiles --nodigest
Rebuild rpm DB rpm –rebuilddb
Rebuild rpm DB yum clean all
Check yum history yum history If yum history shown like this, undo transactions highlighted. (Transaction 10 is the failed yum update)
[root@server ~]# yum history Loaded plugins: product-id, rhnplugin, security, subscription-manager This system is receiving updates from RHN Classic or RHN Satellite. ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 12 | root <root> | 2015-07-30 10:13 | Erase | 1 EE 11 | root <root> | 2015-07-30 10:04 | Erase | 250 PP 10 | root <root> | 2015-07-28 10:06 | E, I, U | 273 *< 9 | root <root> | 2015-02-02 08:59 | E, I, U | 296 >< 8 | root <root> | 2014-09-06 10:36 | I, U | 46 > 7 | root <root> | 2014-07-09 11:34 | Install | 1 6 | root <root> | 2014-07-09 11:34 | Install | 4 5 | root <root> | 2014-07-09 11:34 | Install | 16 4 | root <root> | 2014-07-09 11:34 | Install | 2 3 | root <root> | 2014-07-08 12:20 | I, U | 160 EE 2 | root <root> | 2014-06-30 15:36 | I, U | 132 E< 1 | System <unset> | 2013-09-12 13:47 | Install | 602 > Package may
downgrade to previous one or two level kernel.
[root@server ~]# yum history undo 12 [root@server ~]# yum history undo 11
Reboot server, after it come back with old kernel, run yum update again, OS will upgrade to the version we need, if no more interrupt happened during the updates.
[root@fmsbcclpfbw04 ~]# yum –y update
It is not a fully tested fix for yum update failure, if it can’t solve the problems, please open a ticket with RED HAT to get Technical Support. For production system, a good VM snapshot or a recent backup always a better method to recover.
RHEL 6.X update OS patches, SSH session breaks and cause update stopped. RPM database corrupted, YUM history can’t redo transaction and undo transaction. When reboot server it report kernel panic.
Run YUM history, there are duplicated package or entry in RPM DB. To
fix the issue, Issue yum-complete-transaction, please don`t reboot server, as it may still has kernel panic. Yum-complete-transaction
Issue Yum history If
yum history looks good, issue package-cleanup --problems package-cleanup --problems
Check if there is duplicated packaget package-cleanup --dupes
Clean duplicated packages package-cleanup --cleandupes
Verify package rpm -Va --nofiles --nodigest
Rebuild rpm DB rpm –rebuilddb
Rebuild rpm DB yum clean all
Check yum history yum history If yum history shown like this, undo transactions highlighted. (Transaction 10 is the failed yum update)
[root@server ~]# yum history Loaded plugins: product-id, rhnplugin, security, subscription-manager This system is receiving updates from RHN Classic or RHN Satellite. ID | Login user | Date and time | Action(s) | Altered ------------------------------------------------------------------------------- 12 | root <root> | 2015-07-30 10:13 | Erase | 1 EE 11 | root <root> | 2015-07-30 10:04 | Erase | 250 PP 10 | root <root> | 2015-07-28 10:06 | E, I, U | 273 *< 9 | root <root> | 2015-02-02 08:59 | E, I, U | 296 >< 8 | root <root> | 2014-09-06 10:36 | I, U | 46 > 7 | root <root> | 2014-07-09 11:34 | Install | 1 6 | root <root> | 2014-07-09 11:34 | Install | 4 5 | root <root> | 2014-07-09 11:34 | Install | 16 4 | root <root> | 2014-07-09 11:34 | Install | 2 3 | root <root> | 2014-07-08 12:20 | I, U | 160 EE 2 | root <root> | 2014-06-30 15:36 | I, U | 132 E< 1 | System <unset> | 2013-09-12 13:47 | Install | 602 > Package may
downgrade to previous one or two level kernel.
[root@server ~]# yum history undo 12 [root@server ~]# yum history undo 11
Reboot server, after it come back with old kernel, run yum update again, OS will upgrade to the version we need, if no more interrupt happened during the updates.
[root@fmsbcclpfbw04 ~]# yum –y update
It is not a fully tested fix for yum update failure, if it can’t solve the problems, please open a ticket with RED HAT to get Technical Support. For production system, a good VM snapshot or a recent backup always a better method to recover.