Bug 528884

Summary: Satellite 5.3: Cloning a kickstart profile (with virtualization) loses information
Product: Red Hat Satellite 5 Reporter: Xixi <xdmoon>
Component: ProvisioningAssignee: Tomas Lestach <tlestach>
Status: CLOSED ERRATA QA Contact: Dimitar Yordanov <dyordano>
Severity: medium Docs Contact:
Priority: medium    
Version: 530CC: cperry, dyordano, fnadge, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Consequence: Fix: Result:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-01 10:32:42 UTC Type: ---
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: 518253    

Description Xixi 2009-10-14 07:47:25 UTC
Description of problem:
On 5.3.0 satellite, cloning a kickstart profile (with virt) loses virtualization related information. For example, cloning a kickstart profile which has non-default Virtual memory, Number of CPUs, Virtual Bridge options results in cloned profile that has default values instead of the ones from original profile.

Version-Release number of selected component (if applicable):
Red Hat Network (RHN) Satellite 5.3.0

System architecture(s):
RHEL5 U3 i386 platform

How reproducible:
Always.

Steps to Reproduce:
- Create kickstart profile with the following options:
  - Virt type: KVM Virtualized guest
  - Virtual memory: 1024
  - Number of CPUs: 2
  - Virtual Disk Space: 8
  - Virtual Bridge: mybridge
  - Kernel Options: somestring
  - Kernel Post Options: somestring
* Clone the profile you created
* View the details of the cloned profile:

Actual results:
Memory, vCPU, Disk space, Bridge and both kernel options have default values.

Expected results:
Memory, vCPU, Disk space, Bridge and both kernel options should have the values set in the kickstart profile from which it was cloned.

Additional info:
KVM Virtualized guest ks profile best illustrates the problem but other types of virtualization settings also has the info, so please QA all cases.

Comment 1 Xixi 2009-10-14 07:54:59 UTC
The problem looks to be KickstartData deep copying neglects the Cobbler profile data.

Proposed fix:
In com.redhat.rhn.domain.kickstart.deepCopy() or updateCloneDetails(), add deep copying of associated cobbler profile.  

Such as in com.redhat.rhn.frontend.action.kickstart.KickstartDetailsEditAction:

        CobblerXMLRPCHelper helper = new CobblerXMLRPCHelper();
        Profile prof = Profile.lookupById(helper.getConnection(user),
                ksdata.getCobblerId());
        if (prof == null) {
            return;
        }

        prof.setVirtRam((Integer) form.get(VIRT_MEMORY));
        prof.setVirtCpus((Integer) form.get(VIRT_CPU));
        prof.setVirtFileSize((Integer) form.get(VIRT_DISK_SIZE));
        prof.setVirtBridge(form.getString(VIRT_BRIDGE));
        prof.setVirtPath(form.getString(VIRT_PATH));

        prof.save();

(above is not proposed patch)

Comment 2 Justin Sherrill 2010-05-10 20:19:42 UTC
Fixed in master:
simply added the cloning of those 5 items
b93e4b78768fa96f80e36bcfbcf11c8c35132182

Comment 3 Justin Sherrill 2010-05-10 22:21:45 UTC
small additional fix:
b142f39761b55653b07eaedf5c7c4d5598771753

Comment 5 Florian Nadge 2011-01-17 13:53:04 UTC
Please be so kind and add a few key words to the Technical Notes of this
Bugzilla entry using the following structure:

Cause:

Consequence:

Fix:

Result:

For details, see:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes

Thanks

Comment 6 Florian Nadge 2011-01-17 13:53:04 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause:

Consequence:

Fix:

Result:

Comment 7 Dimitar Yordanov 2011-01-19 23:36:49 UTC
Verified.
RHEL4, RHEL5 - x86_64, s390x

Comment 8 errata-xmlrpc 2011-02-01 10:32:42 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0189.html