Bug 236376 - Package Profile generated with no packages for sync'ing when selecting Sync Package profile: With system's existing package profile under Advanced Kickstart Configuration
Package Profile generated with no packages for sync'ing when selecting Sync P...
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Pazdziora
Steve Salevan
Depends On:
Blocks: 173427
  Show dependency treegraph
Reported: 2007-04-13 10:39 EDT by Clifford Perry
Modified: 2007-10-29 22:00 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat500
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-06-25 23:06:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Clifford Perry 2007-04-13 10:39:03 EDT
Description of problem:
If I go to schedule the reinstall of a registered client within a 4.2 or 5.0 (in
QA Satellite -20 ISO version) where the OS is the same, so no change in OS, such
as RHEL 4 AS -> RHEL 4 AS - and after selecting the kickstart profile I wish to
use, hit the 'Advanced Configuration' button to get to the Advanced Kickstart
Configuration section, and then choose: 

Sync Package Profile: 	With system's existing package profile

And hit 'Schedule Kickstart and Finish' the resultant kickstart session shows on
the right side:
Sync system to package profile

Where 'package profile' has a link to - /network/profiles/details.pxt?prid=1

which when you then click on it and then 'packages' goes to
/network/profiles/package-list.pxt?prid=1 and states:

The following packages are associated with this stored profile.
No packages in this profile.

So, even if I let the kickstart proceed, which I did the kickstart sucessfully
picks up the request to sync package profile, but because it is empty, nothing
useful happens. 

This creation of packages into the package profile needs to occurr successfully
for systems using kickstart profiles who wish to reinstall a system, keeping the
same registration and ensure it is reinstalled with the same package set. 

Creation of this bug was due to a review of this code path/usage of Satellite
kickstart due to question posted on rhn-satellite-users list:

Keeping this bug report public and placing under rhn 500 Satellite triage for
main developer review. 

Comment 2 Jan Pazdziora 2007-04-20 07:40:52 EDT
The following patch seems to do the trick -- populating that newly created profile:

Index: java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
--- java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
       (revision 115103)
+++ java/code/src/com/redhat/rhn/manager/kickstart/KickstartScheduleCommand.java
       (working copy)
@@ -538,7 +538,7 @@
             retval = ProfileManager.createProfile(
                     ProfileFactory.TYPE_SYNC_PROFILE, this.user, 
                         this.server.getBaseChannel(), pname, pname);
+            ProfileManager.copyFrom(this.server, retval);
         // Profile of 'stored profile'
         else if (profileTypeIn.equals(TARGET_PROFILE_TYPE_PACKAGE)) {
Comment 3 Jan Pazdziora 2007-04-20 09:43:55 EDT
Based on Cliff's not in bug 236379 comment 2, I've committed the fix to SVN,
trunk, revision 115155.

Taking over this bug for possible kickbacks, Mike, shout if you want to keep it.
Comment 4 Jan Pazdziora 2007-04-20 14:59:16 EDT
Moving ON_QA with 5.0.0-26 ISO available.
Comment 5 Preethi Thomas 2007-04-24 13:22:59 EDT
Comment 6 Steve Salevan 2007-06-19 11:58:33 EDT
Looks good on Stage-verified Satellite; moving to RELEASE_PENDING.
Comment 7 Brandon Perkins 2007-06-25 23:06:23 EDT
Closed for Satellite 500 Release.

Note You need to log in before you can comment on or make changes to this bug.