Bug 510785 - Need to deal with kickstart trees containing external kernels/initrd
Summary: Need to deal with kickstart trees containing external kernels/initrd
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI
Version: 530
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Partha Aji
QA Contact: Steve Salevan
URL:
Whiteboard:
: 511853 (view as bug list)
Depends On:
Blocks: 457075
TreeView+ depends on / blocked
 
Reported: 2009-07-10 18:42 UTC by Mike McCune
Modified: 2009-09-10 19:27 UTC (History)
3 users (show)

Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 19:27:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike McCune 2009-07-10 18:42:24 UTC
Using a copy of a customer's database we generate errors such as:

ERROR: No kernel found in this path: [http://somehost.example.com/distros/baz-desktop/images/pxeboot/vmlinuz] Spacewalk cant create the distro in cobbler which makes this kickstart distribution: [BAZ-Desktop-Old] unusable to Spacewalk.

ERROR: No kernel found in this path: [http://somehost.example.com/distros/baz-desktop/images/pxeboot/vmlinuz] Spacewalk cant create the distro in cobbler which makes this kickstart distribution: [BAZ-Desktop] unusable to Spacewalk.

after the upgrade to 530.

Need to either fetch these files and convert them into locally pathed files so the upgrade can work or come up with some other strategy.

Comment 2 Justin Sherrill 2009-07-15 18:33:22 UTC
*** Bug 511853 has been marked as a duplicate of this bug. ***

Comment 3 Partha Aji 2009-07-15 23:05:12 UTC
So we were going to resolve this issue in the following manner.

1) The upgrade process will run normally through the schema, .
2) In the cobbler distro sync task run by taskomatic trees with invalid paths will NOT be synced to cobbler and thus will remain null. 
3) User can then visit  https://<host>/rhn/kickstart/ViewTrees.do, see a list of Invalid Distributions, 
4) The user will be allowed to click the invalid distro and update the base path in the UI. The distribution will then get synced to cobbler as soon as the user updates.
5) Kickstart Profiles associated to this tree will not get synced to cobbler UNTIL the distro path is corrected. The user wanting to work with this profile will be redirected to page which will enable them to change their distribution. for the profile or be given a link to the distro edit page. After which they will be synced to cobbler.

Comment 4 Partha Aji 2009-07-15 23:10:16 UTC
Correction to step 2 in the above comment.. I meant to say cobbler id for the tree will remain null.

Comment 5 Partha Aji 2009-07-16 19:49:09 UTC
Part 1 ->
fbae80186729b8edd725e68b872af6f87f096299

Comment 6 Justin Sherrill 2009-07-16 19:51:43 UTC
Part 2 -> 0425575

Comment 7 Justin Sherrill 2009-07-16 22:04:36 UTC
updated provisioning schedule to ignore profiles without a cobbler id: bc8bf56

Comment 8 Partha Aji 2009-07-18 04:38:22 UTC
Final Part
http://git.fedorahosted.org/git/?p=spacewalk.git;a=commit;h=5b88e84ef9c2101700433cbbf81e99383e855fa9

Changes were made in the following pages and would need to be tested.

1) Distributions -> 
List/Edit/Delete pages
After an upgrade of the external distro

List: -> Systems -> Kickstarts ->  Distributions

A new column called Valid? got added to the UI , which basically means (as the tool tip down should explain) that your initrd or kernel path is wrong so the distro is in a dirty state and should be fixed before it'll get synced to cobbler.


Edit: (click on the link from list)
Edit page should show some error like "Wrong path for initrd or kernel"
Update will not happen, the distro will not get synced to cobbler until the path has been fixed

Variables: You should NOT be able to set variables on a distribution until it has been validated

Delete: should work ok with NO errors


2) Profiles:
List/Edit/Delete/Operating System

List: -> Systems -> Kickstarts ->  Distributions
Similar to distros a new column called Valid? got added to the UI , which basically means (as the tool tip down should explain) that the distro associated to your profile is NOT valid and so the profile NEVER got synced to cobbler in the first place.

Edit:
* Raw Kickstarts pointing to Invalid trees:
All the menu items other than Details should be hidden.
On the details page all UI items other than the Distros List and Update button should be hidden. 
A summary paragraph guiding the user to go and fix the distro (with a link to the distro edit page) should be available.
The User may choose an alternate distro to be associated to the profile and hit update (Note ONLY valid distros will be available for selection here). Once updated things should proceed normally.
If OTOH the user chooses to go to the distro page and edit the path correctly, and make the distro valid, then ALL the profiles associated to this distro should automatically get updated.

* Wizard Kickstart pointing to invalid trees:
All the menu items other than Details AND Operating Systems should be hidden.
On the details page all html form elements should be hidden.
A summary paragraph guiding the user to go and fix the distro (with a link to the distro edit page) OR guiding the user to go to Operating Systems page and change the associated distro should be available.
The user should be able to be able to do both operations successfully. If they choose the operating systems route then Only valid distros will be displayed for them to change. Once they hit update their profile should be ok.
If OTOH the user chooses to go to the distro page and edit the path correctly, and make the distro valid, then ALL the profiles associated to this distro should automatically get updated.

* SDC & SSM Schedule Provisioning and Guest Provisioning pages 
Only Valid profiles should get displayed on those pages.

Comment 9 Partha Aji 2009-07-20 18:34:24 UTC
One minor correction to the above comment. We decided to remove the "Valid" column from the  Profile's list page because 99% of the time it will be true and so won;t server any purpose to the user.

Comment 10 Steve Salevan 2009-07-23 21:36:38 UTC
VERIFIED on 7/22 build.

Comment 11 Steve Salevan 2009-07-23 21:51:31 UTC
Bumping back to ON_QA to test profile sync functionality, which was not covered in my original test.

Comment 12 Steve Salevan 2009-07-23 22:05:18 UTC
Upon discussion with Partha, we're going to push this bug to FAILS_QA, as a bug he discovered in the 7/22 ISO's code will prevent profiles based upon old custom distros from re-syncing to Cobbler after the custom distros are updated with a valid kernel/initrd location, and we'll retest this upgrade scenario after the next ISO drops.

Comment 14 Steve Salevan 2009-07-24 19:11:45 UTC
VERIFIED on 7/24 ISO (for real this time).

Comment 15 Preethi Thomas 2009-07-29 19:55:56 UTC
release pending
stage build 7/24
upgraded satellite rlx-2-04  with old kickstart distros.

Comment 16 Brandon Perkins 2009-09-10 19:27:15 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


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