Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 863479

Summary: KickstartFileSyncTask will be repeated endlessly for kickstart profiles renamed before upgrade to Satellite 5.5
Product: Red Hat Satellite 5 Reporter: Milan Zázrivec <mzazrivec>
Component: UpgradesAssignee: Tomas Lestach <tlestach>
Status: CLOSED ERRATA QA Contact: Pavel Studeník <pstudeni>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 550CC: jhutar, mmello, mminar, mzazrivec, nigjones, pstudeni, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-java-1.7.54-103 Doc Type: Bug Fix
Doc Text:
Consequence: Any kickstart profile rename on RHN Satellite 5.4 causes issues after Satellite upgrade to 5.5. The profile is unusable and any tries to sync the profile fail with a 'kickstart not found' exception and get repeated endlessly Result: Renamed kickstart profiles get properly synced to cobbler.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-23 06:38:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 819027    

Description Milan Zázrivec 2012-10-05 14:59:01 UTC
Description of problem:
A taskomatic task "KickstartFileSyncTask" will be repeated endlessly for
kickstart profiles renamed before upgrade to Satellite 5.5.

Version-Release number of selected component (if applicable):
spacewalk-taskomatic-1.7.54-100

How reproducible:
Deterministic

Steps to Reproduce:
1. Have a 5.4 Satellite, kickstart profile "profile01"
2. Rename "profile01" to "profile02"
2. Upgrade to Satellite 5.5
3. Check taskomatic & cobbler logs after upgrade
  
Actual results:
1. Taskomatic will endlessly try to run KickstartFileSyncTask for kickstart
profile "profile02", leaving messages like:

com.redhat.rhn.taskomatic.task.KickstartFileSyncTask - Syncing profile02

in /var/log/rhn/rhn_taskomatic_daemon.log

2. kickstart path for the "profile02" profile will not be updated in
cobbler's records.


Expected results:
1. Kickstart profile "profile02" will be synced only once.
2. kickstart path for the "profile02" profile will be updated in
cobbler's records.

Additional info:
On Satellite before the upgrade:
1. Kickstart file for "profile01" is at

      /var/lib/rhn/kickstarts/wizzard/profile01.cfg

2. cobbler's record for "profile01" points to the above file.
3. "profile01" will be renamed to "profile02"
4. Kickstart file for "profile02" will still be

      /var/lib/rhn/kickstarts/wizzard/profile01.cfg

5. cobbler's record will remain unchanged

During the upgrade to Satellite 5.5, content of

    /var/lib/rhn/kickstarts/wizzard/

will be deleted.

After the upgrade to Satellite 5.5, "KickstartFileSyncTask" will wake up.

The taskomatic task "KickstartFileSyncTask" does the following:
1. Lists all available kickstart profiles
2. For every kickstart profile, it contacts cobbler and asks for the path to
the kickstart file for the kickstart profile. Next, it checks whether
the kickstart file is present on the filesystem. If not, it creates this
file.

In case of "profile02", KickstartFileSyncTask will create the following file:

      /var/lib/rhn/kickstarts/wizzard/profile02.cfg

but will never tell cobbler back that the path to the kickstart file has
changed.

Next time KickstartFileSyncTask will run, it will do the same procedure
for "profile02" again.

Comment 1 Tomas Lestach 2012-10-08 12:00:12 UTC
There's a need to update also cobbler profile configuration ... enhancing ks file sync ...

spacewalk.git: 1c7490e39d859179573e2c735e82bc3acb8e3f05

Comment 6 errata-xmlrpc 2012-10-23 06:38:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-1398.html

Comment 7 Pavel Studeník 2012-10-24 13:37:26 UTC
*** Bug 862144 has been marked as a duplicate of this bug. ***