Description of problem:
After an upgrade to 5.3.0 the taskomatic task that syncs distros and profiles to cobbler will fail partway through if a certain situation exists. (most likely this situation existed before the upgrade.)
Two symptoms are seen:
1. When you click on some (but not necessarily all) kickstarts an error will be displayed saying that the distro is invalid.
2. Within /var/log/rhn/rhn_Taskomatic.conf, you'll see the following error:
INFO | jvm 1 | 2009/09/21 15:08:00 | java.lang.NullPointerException
INFO | jvm 1 | 2009/09/21 15:08:00 | at com.redhat.rhn.manager.kickstart.cobbler.CobblerProfileCommand.getDistroForKickstart(CobblerProfileCommand.java:133)
INFO | jvm 1 | 2009/09/21 15:08:00 | at com.redhat.rhn.manager.kickstart.cobbler.CobblerProfileCreateCommand.store(CobblerProfileCreateCommand.java:65)
INFO | jvm 1 | 2009/09/21 15:08:00 | at com.redhat.rhn.manager.kickstart.cobbler.CobblerProfileSyncCommand.createProfile(CobblerProfileSyncCommand.java:102)
INFO | jvm 1 | 2009/09/21 15:08:00 | at com.redhat.rhn.manager.kickstart.cobbler.CobblerProfileSyncCommand.store(CobblerProfileSyncCommand.java:76)
INFO | jvm 1 | 2009/09/21 15:08:00 | at com.redhat.rhn.taskomatic.task.CobblerSyncTask.execute(CobblerSyncTask.java:108)
INFO | jvm 1 | 2009/09/21 15:08:00 | at com.redhat.rhn.taskomatic.task.SingleThreadedTestableTask.execute(SingleThreadedTestableTask.java:54)
INFO | jvm 1 | 2009/09/21 15:08:00 | at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
INFO | jvm 1 | 2009/09/21 15:08:00 | at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
INFO | jvm 1 | 2009/09/21 15:08:00 | 2009-09-21 15:08:00,305 [DefaultQuartzScheduler_Worker-4] ERROR com.redhat.rhn.taskomatic.task.CobblerSyncTask - Not re-throwing any more err
This error will repeat every 5 or 10 minutes.
The cause of this error is that there is a rhnKSData entry without a corresponding rhnKickstartDefaults entry. The only reason I can think that this would exist is by using the sat-rm.py script while having a profile associated with a distro that belongs to that channel.
To confirm that the data is bad, simply run this query:
sql> select ks.label, dk.kickstart_id from rhnKSData ks,
where ks.id = dk.kickstart_id (+) where dk.kickstart_id is null;
If any rows are returned, then that is the confirmation that this is the problem.
To fix the issue we could either do a code change to handle the issue, or have the customer run something like:
sql> delete from rhnKSData where id not in (select kickstart_id from
That should delete any of the bad entries. Note: due to the way they are displayed, these bad entries will NOT show up in the webUI, so they will be 'hidden' from any view except the database itself.
That select query had a small typo in it. It should be:
select ks.label, dk.kickstart_id from rhnKSData ks, rhnKickstartDefaults dk where ks.id = dk.kickstart_id (+) and dk.kickstart_id is null;
You should be able to reproduce doing the following:
1) Install some pre-5.3 satellite (i.e 5.0, 5.1, 5.2).
2) Create one or more kickstarts and make sure to keep track of their id (the ksid=# part of the url after you create them).
3) Run the following query:
sql> delete from rhnKickstartDefaults where kickstart_id = 102;
replacing 102 with the kickstart id from step #2. Re-run this for each kickstart id that you want to put in a 'bad' state.
Fixed in spacewalk master: 1ae5ebbdc7f1cf7adb5202dbf3151009769f1278
This looks to have been already released.