Our Blog
Solutions. Made Simple.

Forced upgrade from Centos 6.8 to Centos 7.2

Last Friday I made the foolish mistake of getting bored with the endless sequence of manually updating our development servers with operating system and software patches. In a moment of wishful thinking, I decided that since the manual process hadn’t caused any problems in years, I’d take the rash step of automating it and relying on yum-cron to keep our proxy server up to date. Oh, what a good idea that proved to be.

Monday morning, and the office network is fairly upset, largely down to the proxy VM sitting with an unresponsive screen with just a lovely “Kernel Panic!” message. Haven’t seen one of those for a while, but it’s like getting the Blue Screen of Death or the Apple Bomb, you know it isn’t going to be a good day.

An hour or so later, I’ve abandoned the hope that loading an older kernel (which still worked) was going to get me to the cause of the problem, which seemed to be related to selinux (which was, in theory, disabled anyway). Documentation online was patchy – this is a fairly old OS, so most of the advice is to upgrade. Rather than waste all day fixing something which wasn’t worth that to me, I thought I’d either upgrade it or run up a new virtual machine. I decided on the former, even though prevailing opinion was that C6->C7 upgrading isn’t recommended, because I thought our minimal server fell into the “nothing unusual about the configuration” category that just might work. How wrong could I be?!

How wrong indeed… here’s what happened, with the more tedious stuff redacted. Basically the official upgrade process is – well, pants is an understatement, and I don’t like to swear in this blog, so I’ll just say… rubbish! It leaves behind no end of version 6 files that conflict with the new version 7 ones, or go missing, or refuse to update, or refuse not to update. You name it, if it can go wrong it will!

Geek stuff below. The end result – in parallel with this I did the fresh install solution too, and in a quarter of the time that I had wasted on trying to go this route I had a fresh C7.2 VM up and running and doing all the proxy/dns things that the old one did. Now, the question is, should I install yum-cron… ?!

[root@centos64 ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.clouvider.net
* epel: epel.check-update.co.uk
* extras: centos.serverspace.co.uk
* updates: centos.serverspace.co.uk
Resolving Dependencies
--> Running transaction check
---> Package apache-commons-collections.noarch 0:3.2.1-21.el7 will be updated
---> Package apache-commons-collections.noarch 0:3.2.1-22.el7_2 will be an update
---> Package apache-commons-discovery.noarch 2:0.5-9.el7 will be obsoleting
---> Package avahi-glib.x86_64 0:0.6.31-15.el7 will be updated

[... and more, very boring ...]

[... Wait a minute, what have we here? Centos 6 packages still? ...]

---> Package python-webhelpers.noarch 0:0.6.4-4.el6 will be updated
---> Package python-zope-sqlalchemy.noarch 0:0.4-3.el6 will be updated

[... and more, very boring ...]

---> Package python-repoze-lru.noarch 0:0.4-3.el7 will be installed
---> Package python2-ecdsa.noarch 0:0.13-4.el7 will be installed
--> Running transaction check
---> Package libtommath.x86_64 0:0.42.0-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================
Package Arch Version Repository Size
==============================================================================================================================================================================================================
Installing:
apache-commons-discovery noarch 2:0.5-9.el7 epel 81 k
replacing jakarta-commons-discovery.noarch 1:0.4-5.4.el6
kernel x86_64 3.10.0-327.36.1.el7 updates 33 M
python2-crypto x86_64 2.6.1-9.el7 epel 475 k

[... and more, still very boring ...]

perl-Linux-Pid x86_64 0.04-18.el7 epel 14 k
python-cherrypy noarch 3.2.2-4.el7 base 422 k
python-repoze-lru noarch 0.4-3.el7 epel 13 k
python2-ecdsa noarch 0.13-4.el7 epel 83 k

Transaction Summary
==============================================================================================================================================================================================================
Install 5 Packages (+7 Dependent packages)
Upgrade 190 Packages

Total download size: 263 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/202): avahi-glib-0.6.31-15.el7_2.1.x86_64.rpm | 24 kB 00:00:00
(2/202): avahi-libs-0.6.31-15.el7_2.1.x86_64.rpm | 61 kB 00:00:00
(3/202): apache-commons-collections-3.2.1-22.el7_2.noarch.rpm | 509 kB 00:00:00
(4/202): bind-license-9.9.4-29.el7_2.4.noarch.rpm | 82 kB 00:00:00

[... and more, still very, very boring ...]

(198/202): wireless-tools-29-13.el7.x86_64.rpm | 103 kB 00:00:00
(199/202): util-linux-2.23.2-26.el7_2.3.x86_64.rpm | 1.9 MB 00:00:00
(200/202): selinux-policy-targeted-3.13.1-60.el7_2.9.noarch.rpm | 3.9 MB 00:00:02
(201/202): qt-x11-4.8.5-12.el7_2.x86_64.rpm | 13 MB 00:00:05
grub2-tools-2.02-0.34.el7.cent FAILED 99% [============================================================================= ] 3.0 MB/s | 261 MB 00:00:00 ETA
http://centos.hyve.com/7.2.1511/updates/x86_64/Packages/grub2-tools-2.02-0.34.el7.centos.x86_64.rpm: [Errno 12] Timeout on http://centos.hyve.com/7.2.1511/updates/x86_64/Packages/grub2-tools-2.02-0.34.el7.centos.x86_64.rpm: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds')
Trying other mirror.
(202/202): grub2-tools-2.02-0.34.el7.centos.x86_64.rpm | 3.3 MB 00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 6.7 MB/s | 263 MB 00:00:39
Running transaction check
ERROR with transaction check vs depsolve:
python(abi) = 2.6 is needed by (installed) python-repoze-who-testutil-1.0-0.4.rc1.el6.noarch
python(abi) = 2.6 is needed by (installed) python-repoze-what-1.0.8-6.el6.noarch
python(abi) = 2.6 is needed by (installed) python-repoze-what-pylons-1.0-4.el6.noarch

[... and more, very boring ...]

httpd-mmn = 20051115 is needed by (installed) mod_extract_forwarded-2.0.2-8.el6.x86_64
** Found 75 pre-existing rpmdb problem(s), 'yum check' output follows:
classpathx-jaf-1.0-15.4.el6.x86_64 has missing requires of java-gcj-compat
cloog-ppl-0.15.7-1.2.el6.x86_64 has missing requires of libgmp.so.3()(64bit)
freetds-0.91-2.el6.x86_64 has missing requires of libgnutls.so.26()(64bit)
freetds-0.91-2.el6.x86_64 has missing requires of libgnutls.so.26(GNUTLS_1_4)(64bit)
grep-2.20-5.el6_8.x86_64 has missing requires of libpcre.so.0()(64bit)
hal-info-20090716-5.el6.noarch has missing requires of hal >= ('0', '0.5.10', None)
jakarta-commons-pool-1.3-12.7.el6.x86_64 has missing requires of java-gcj-compat
libgcj-4.4.7-17.el6.x86_64 has missing requires of libgmp.so.3()(64bit)
matahari-lib-0.6.0-14.el6.x86_64 has missing requires of libpcre.so.0()(64bit)
matahari-lib-0.6.0-14.el6.x86_64 has missing requires of libpython2.6.so.1.0()(64bit)
mod_extract_forwarded-2.0.2-8.el6.x86_64 has missing requires of httpd-mmn = ('0', '20051115', None)
mod_perl-2.0.4-11.el6_5.x86_64 has missing requires of httpd-mmn = ('0', '20051115', None)
mod_perl-2.0.4-11.el6_5.x86_64 has missing requires of perl(:MODULE_COMPAT_5.10.1)

[blah blah blah]

Your transaction was saved, rerun it with:
yum load-transaction /tmp/yum_save_tx.2016-10-10.16-12.CZ4VLB.yumtx