I’ve been working on setting up Spacewalk 1.4 on CentOS 6 to have a shiny new deployment server for my company and it has been a bumpy ride to get everything working correctly. Most of the instructions from the Spacewalk wiki are reusable for CentOS 6 and it is also a good idea to follow some of the steps from the CentOS Spacewalk HowTos if you want to import the ISO images and set-up custom channels.
I made a few notes that might be helpful to someone else:
Installation
I did an initial installation with Oracle 11gR2 and the OracleXE. Oracle 11gR2 has no issues but with OracleXE if your time zone is set to Indian/Mauritius or GMT +4, when you start Spacewalk you get a blank screen and a quick look at /var/log/tomcat/catalina.out will display ORA errors related to the time zone. Just change the time zone to GMT, restart Spacewalk and you should see the user account creation page. You can adjust the time zone under Preferences — Local Preferences. If someone has found another workaround for this bug, please let me know.
Channels/Activation Keys and Configuration Management works like a charm.
Distributions and Kickstarts
These items caused some issues I have never seen with Spacewalk. Importing ISO images and setting up distributions work as expected but the actual Kickstarts (Anaconda) causes some serious issues.
CentOS 5: python-ethtool is missing from the Spacewalk client tools so I have downloaded it from EPEL5 and pushed it into the Spacewalk client tools custom channel I have set-up.
There is also a dependency on python-hashlib which is also available from EPEL5. I have created a custom channel which is a child channel of CentOS 5 and uploaded (rhnpush) the package for the kickstart to complete without errors and register the system. Remember the Spacewalk client Tools and EPEL channel for the missing packages must be child channels and made available to Anaconda during install time to avoid Kickstart failures.
You will also notice that Spacewalk refuses to install client tools from it’s own repository if you follow the tutorial on the CentOS Spacewalk HowTos. This happens because by default Spacewalk will refuse to distribute unsigned packages and for some strange reason the packages in the repositories have been signed by the RPM-GPG-KEY-spacewalk-2010 instead of RPM-GPG-KEY-spacewalk as described in the CentOS wiki:
wget http://spacewalk.redhat.com/yum/RPM-GPG-KEY-spacewalk mv RPM-GPG-KEY-spacewalk /etc/pki/rpm-gpg/RPM-GPG-KEY-spacewalk rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-spacewalk
The correct key to import should be:
wget http://spacewalk.redhat.com/yum/RPM-GPG-KEY-spacewalk-2010 mv RPM-GPG-KEY-spacewalk /etc/pki/rpm-gpg/RPM-GPG-KEY-spacewalk-2010 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-spacewalk-2010
Make sure you enable the Key (GPG) in the Kickstart or the install will be incomplete and you will need to manually import the key.
CentOS 6: All packages are present in the repositories so importing the client channel should be good enough. However the install will not complete if you select the Installer Generation as Red Hat Enterprise 6. Anaconda just freaks out and will not continue. I have filed a bug report so let’s see what comes out of it.
Description of problem: The CentOS 6 installer fails to download the install.img during the install. A check on /var/log/tomcat6/catalina.out shows 404 errors. Changing the Installer Generation to Red Hat Enterprise Linux 5 allows the install to proceed and complete successfully. RHEL 6 and CentOS 5.6 using the same method works which bothers me. So if the installer generation is set to Red Hat Enterprise Linux 5 or Fedora the Kickstart will complete successfully.
The most annoying issue I have come across till now is related to partitioning. I did a mass deployment of RHEL 6 Servers using Spacewalk 1.3 on CentOS 5.5 a few months back and it worked flawlessly. I had a look at one of my previous Kickstarts and I do remember using the grow option with partitions. Below is an extract:
bootloader --location mbr --driveorder=sda,sdb zerombr clearpart --all part raid.01 --size=500 --ondisk=sda part raid.02 --size=500 --ondisk=sdb part raid.03 --size=10240 --ondisk=sda part raid.04 --size=10240 --ondisk=sdb part raid.05 --size=10240 --ondisk=sda part raid.06 --size=10240 --ondisk=sdb part raid.07 --size=10240 --ondisk=sda part raid.08 --size=10240 --ondisk=sdb part raid.09 --grow --size=10240 --ondisk=sda part raid.10 --grow --size=10240 --ondisk=sdb part swap --size=8192 --ondisk=sda part swap --size=8192 --ondisk=sdb raid / --fstype=ext4 --level=1 --device=md3 raid.07 raid.08 raid /boot --fstype=ext4 --level=1 --device=md0 raid.01 raid.02 raid /tmp --fstype=ext4 --level=1 --device=md2 raid.05 raid.06 raid /var --fstype=ext4 --level=1 --device=md1 raid.03 raid.04 raid /opt --fstype=ext4 --level=1 --device=md4 raid.09 raid.10
While this Kickstart works flawlessly on RHEL6/CentOS6 the following slightly modified scheme to include LVM fails and it took me a while to figure out why, as I kept searching for errors in the partitioning scheme instead of looking at the traceback message
clearpart --drives=sda,sdb --initlabel # Raid 1 SATA config part swap --size=8192 --ondisk=sda part raid.01 --size 500 --asprimary --ondrive=sda part raid.02 --size 200 --grow --ondrive=sda part swap --size=8192 --ondisk=sdb part raid.03 --size 500 --asprimary --ondrive=sdb part raid.04 --size 200 --grow --ondrive=sdb raid /boot --fstype ext4 --device md0 --level=RAID1 raid.01 raid.03 raid pv.01 --fstype ext4 --device md1 --level=RAID1 raid.02 raid.04 # LVM configuration volgroup sysvg pv.01 logvol /var --vgname=sysvg --size=10240 --name=var logvol /tmp --vgname=sysvg --size=10240 --name=temp logvol / --vgname=sysvg --size=10240 --name=root
No matter what size I set the logical volumes, Anaconda came up with a traceback error indicating that there was no free space to allocate the logical volumes. It took me a while to realize that the grow option was not working as per the first kickstart and the volume created was only 200MB even though the Red Hat Official documentation for RHEL6 states that the following works:
clearpart --drives=hda,hdc --initlabel # Raid 1 IDE config part raid.11 --size 1000 --asprimary --ondrive=hda part raid.12 --size 1000 --asprimary --ondrive=hda part raid.13 --size 2000 --asprimary --ondrive=hda part raid.14 --size 8000 --ondrive=hda part raid.15 --size 1 --grow --ondrive=hda part raid.21 --size 1000 --asprimary --ondrive=hdc part raid.22 --size 1000 --asprimary --ondrive=hdc part raid.23 --size 2000 --asprimary --ondrive=hdc part raid.24 --size 8000 --ondrive=hdc part raid.25 --size 1 --grow --ondrive=hdc # You can add --spares=x raid / --fstype ext3 --device md0 --level=RAID1 raid.11 raid.21 raid /safe --fstype ext3 --device md1 --level=RAID1 raid.12 raid.22 raid swap --fstype swap --device md2 --level=RAID1 raid.13 raid.23 raid /usr --fstype ext3 --device md3 --level=RAID1 raid.14 raid.24 raid pv.01 --fstype ext3 --device md4 --level=RAID1 raid.15 raid.25 # LVM configuration so that we can resize /var and /usr/local later volgroup sysvg pv.01 logvol /var --vgname=sysvg --size=8000 --name=var logvol /var/freespace --vgname=sysvg --size=8000 --name=freespacetouse logvol /usr/local --vgname=sysvg --size=1 --grow --name=usrlocal
So no matter if you use RHEL 6 or CentOS 6 the Kickstart fails unless you allocate an initial size which is equal or greater than the total size of the logical volumes. In my case the following worked.
# Raid 1 SATA config part swap --size=8192 --ondisk=sda part raid.01 --size 500 --asprimary --ondrive=sda part raid.02 --size 40960 --grow --ondrive=sda
part swap --size=8192 --ondisk=sdb part raid.03 --size 500 --asprimary --ondrive=sdb part raid.04 --size 40960 --grow --ondrive=sdb
Registration: There are some minor changes that affect the way packages are described in the Kickstarts.
On CentOS 5 I used to simply specify @ base and enable Configuration Management which would include the rhncfg-* tools and register the system with Spacewalk.
Below are the rhncfg-* tools that are added automatically when Configuration Management is enabled.
Under CentOS 6 unless I explicitly include rhn-setup, rhn-check and some dependencies (not really needed) the Kickstart installs correctly but ignores completely the registration process and does not install the rhn-tools.
There has been talks about why the spacewalk tools have been removed (again) from CentOS 6 and I really hope Karanbir does not remove them in the upcoming CentOS 6.1 release as this would greatly simplify the setup/registration of CentOS clients with Spacewalk.
Despite these issues, I still consider Spacewalk as one of the best tools available and of course CentOS 6 has just been released so extensive QA has not yet been done. Spacewalk 1.5 is lurking around so I expect things to get stable pretty soon. If you’re interested on setting up Spacewalk on CentOS 6 you should watch the official wiki and the CentOS wiki which most of the time provides much better documentation that the official site.
Update 21/07/2011
Spacewalk 1.5 has been released with a change set of:
- 81 bugs solved
- 624 changesets committed
- 904 commits done
So a lot of the issues described above may have been solved.
The Anaconda issue with RAID devices not working with –grow option has been reported since Fedora 14 and mind you it is not a bug. A bright mind has decided that –grow option is not a needed/supported feature and removed it. See bug 649768, a few people have asked clarifications as to why the feature is no more supported but no reply.






