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
Summary: Package Profile generated with no packages for sync'ing when selecting Sync P...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Steve Salevan
URL:
Whiteboard:
Depends On:
Blocks: 173427
TreeView+ depends on / blocked
 
Reported: 2007-04-13 14:39 UTC by Clifford Perry
Modified: 2007-10-30 02:00 UTC (History)
2 users (show)

Fixed In Version: sat500
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-06-26 03:06:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Clifford Perry 2007-04-13 14:39:03 UTC
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:
https://www.redhat.com/mailman/private/rhn-satellite-users/2007-April/msg00028.html

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

Cliff.

Comment 2 Jan Pazdziora (Red Hat) 2007-04-20 11:40:52 UTC
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 (Red Hat) 2007-04-20 13:43:55 UTC
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 (Red Hat) 2007-04-20 18:59:16 UTC
Moving ON_QA with 5.0.0-26 ISO available.

Comment 5 Preethi Thomas 2007-04-24 17:22:59 UTC
verified

Comment 6 Steve Salevan 2007-06-19 15:58:33 UTC
Looks good on Stage-verified Satellite; moving to RELEASE_PENDING.

Comment 7 Brandon Perkins 2007-06-26 03:06:23 UTC
Closed for Satellite 500 Release.


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