Bug 500169

Summary: Changing distro path does not reset cobbler kerne & initrd paths
Product: Red Hat Satellite 5 Reporter: Justin Sherrill <jsherril>
Component: ProvisioningAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: Steve Salevan <ssalevan>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: bperkins, pthomas
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-10 19:25:41 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: 457075    

Description Justin Sherrill 2009-05-11 13:50:42 UTC
1.  Create a distro that points to one path /var/satellite/rhn//kickstart/ks-rhel-i386-as-4-u7/
2.  run "cobbler distro report" to get a list of distros, find created distro and run:
3.  run "cobbler distro report --name=NAME", where NAME is the full cobbler name of the distro
4.  See that the initrd and kernel are correct.
5.  in the webUI change the distro to point to something else (such as a rhel 5 distro)
6.  re-run the distro report and see that the kernel and initrd have not changed. 
7.  Try to kickstart something with the distro and watch it crash and burn.





Output after changing distro to RHEL 5:

[root@columbia server]# cobbler distro report --name=myCustomRhel4:2:testOrg
distro               : myCustomRhel4:2:testOrg
architecture         : i386
breed                : redhat
created              : Fri May  8 09:52:42 2009
comment              : 
initrd               : /var/satellite/rhn//kickstart/ks-rhel-i386-as-4-u7/images/pxeboot/initrd.img
kernel               : /var/satellite/rhn//kickstart/ks-rhel-i386-as-4-u7/images/pxeboot/vmlinuz
kernel options       : {}
ks metadata          : {'org': '2', 'media_path': '/ks/dist/myCustomRhel4'}
tree build time      : Wed Dec 31 19:00:00 1969
modified             : Fri May  8 09:52:42 2009
mgmt classes         : []
os version           : 
owners               : ['admin']
post kernel options  : {}
redhat mgmt key      : <<inherit>>
redhat mgmt server   : <<inherit>>
template files       : {}

Comment 1 Justin Sherrill 2009-05-11 16:01:09 UTC
Fixed as part of 13bf3a913dd5ed8dc7e3b8c03a6d875ff68881a6

basically we needed to call Distro.save() after updating the kernel and initrd images and we were not doing that.

Comment 2 Steve Salevan 2009-06-08 16:37:29 UTC
VERIFIED on 6/5 build.

Comment 3 Preethi Thomas 2009-07-29 16:39:17 UTC
7/24 build on stage
https://dhcp77-153.rhndev.redhat.com

first time
[root@dhcp77-153 distros.d]# cobbler distro report --name=bug-500169:1:Mike-McCune
distro               : bug-500169:1:Mike-McCune
architecture         : i386
breed                : redhat
created              : Wed Jul 29 06:41:10 2009
comment              : 
initrd               : /var/satellite/rhn//kickstart/ks-rhel-i386-as-4-u7/images/pxeboot/initrd.img
kernel               : /var/satellite/rhn//kickstart/ks-rhel-i386-as-4-u7/images/pxeboot/vmlinuz
kernel options       : {}
ks metadata          : {'org': '1', 'media_path': '/ks/dist/bug-500169'}
tree build time      : Wed Dec 31 19:00:00 1969
modified             : Wed Jul 29 06:41:11 2009
mgmt classes         : []
os version           : 
owners               : ['admin']
post kernel options  : {}
redhat mgmt key      : <<inherit>>
redhat mgmt server   : <<inherit>>
template files       : {}


after the update 
[root@dhcp77-153 kickstart]# cobbler distro report --name=bug-500169:1:Mike-McCune
distro               : bug-500169:1:Mike-McCune
architecture         : i386
breed                : redhat
created              : Wed Jul 29 06:41:10 2009
comment              : 
initrd               : /var/satellite/rhn//kickstart/ks-rhel-i386-server-5-u3/images/pxeboot/initrd.img
kernel               : /var/satellite/rhn//kickstart/ks-rhel-i386-server-5-u3/images/pxeboot/vmlinuz
kernel options       : {}
ks metadata          : {'org': 1, 'media_path': '/ks/dist/bug-500169'}
tree build time      : Wed Dec 31 19:00:00 1969
modified             : Wed Jul 29 07:03:11 2009
mgmt classes         : []
os version           : 
owners               : ['admin']
post kernel options  : {}
redhat mgmt key      : <<inherit>>
redhat mgmt server   : <<inherit>>
template files       : {}

kickstart completed successfully after the update

Comment 4 Brandon Perkins 2009-09-10 19:25:41 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/RHEA-2009-1434.html