November 13th, 2010repos not updating in spacewalk. taskomatic!
Spacewalk, it’s pretty damn awesome. Or at least, I think it is. It’s an open source linux systems management solution from Redhat (GPLv2).
Once you get spacewalk up and running, you’ll be amazed by some of the things it does. It can push config files, packages, inventory systems, group them and allow you to work exclusively with those groups in a very easy way. That’s only scratching the surface of what spacewalk is capable of.
I like it because I can setup custom channels where I can push custom software to each of my servers. From time to time though, I notice that the repos don’t really rebuild automatically. If you look at the “details” section of your channel, you’ll notice something like this

The times don’t match. It probably means that the taskomatic daemon is not running or is running but isn’t really pulling tasks from the database.
To verify, login to sqlplus and run this query
sqlplus spacewalk/spacewalk@xe
SQL*Plus: Release 10.2.0.4.0 - Production on Sat Nov 13 14:14:00 2010
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
SQL> select * from rhnTaskQueue;
ORG_ID TASK_NAME
---------- ----------------------------------------------------------------
TASK_DATA PRIORITY EARLIEST
---------- ---------- ---------
1 update_errata_cache_by_channel
143 0 13-NOV-10
1 update_errata_cache_by_channel
122 0 12-NOV-10
1 update_errata_cache_by_channel
208 0 13-NOV-10
ORG_ID TASK_NAME
---------- ----------------------------------------------------------------
TASK_DATA PRIORITY EARLIEST
---------- ---------- ---------
1 update_errata_cache_by_channel
122 0 13-NOV-10
Notice how some tasks are older? This table should almost always be empty or only have data for a small period of time as the name suggests.
Restarting taskomatic is as simple as
[root@spacewalk init.d]# ./taskomatic stop
Stopping RHN Taskomatic...
Stopped RHN Taskomatic.
[root@spacewalk init.d]# ./taskomatic start
Starting RHN Taskomatic...
Wait about 10 minutes, because that’s the polling time for taskomatic, and then check the database again. There should be no rows
SQL> select * from rhnTaskQueue;
no rows selected
SQL>
Also check the spacewal UI and look for something like this
or
Spacewalk is still very much in its infancy but it shows great promise and there is a great community of people who are willing to help and are dedicated to making it a rich and feature full product. Spacewalk 1.1 was released recently and we haven’t had a chance to upgrade yet but I continue to see great things coming from spacewalk and that makes me happy.



