Bug 510785 - Need to deal with kickstart trees containing external kernels/initrd
Need to deal with kickstart trees containing external kernels/initrd
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: WebUI (Show other bugs)
530
All Linux
urgent Severity urgent
: ---
: ---
Assigned To: Partha Aji
Steve Salevan
:
: 511853 (view as bug list)
Depends On:
Blocks: 457075
  Show dependency treegraph
 
Reported: 2009-07-10 14:42 EDT by Mike McCune
Modified: 2009-09-10 15:27 EDT (History)
3 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:27:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike McCune 2009-07-10 14:42:24 EDT
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 14:33:22 EDT
*** Bug 511853 has been marked as a duplicate of this bug. ***
Comment 3 Partha Aji 2009-07-15 19:05:12 EDT
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 19:10:16 EDT
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 15:49:09 EDT
Part 1 ->
fbae80186729b8edd725e68b872af6f87f096299
Comment 6 Justin Sherrill 2009-07-16 15:51:43 EDT
Part 2 -> 0425575
Comment 7 Justin Sherrill 2009-07-16 18:04:36 EDT
updated provisioning schedule to ignore profiles without a cobbler id: bc8bf56
Comment 8 Partha Aji 2009-07-18 00:38:22 EDT
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 14:34:24 EDT
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 17:36:38 EDT
VERIFIED on 7/22 build.
Comment 11 Steve Salevan 2009-07-23 17:51:31 EDT
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 18:05:18 EDT
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 15:11:45 EDT
VERIFIED on 7/24 ISO (for real this time).
Comment 15 Preethi Thomas 2009-07-29 15:55:56 EDT
release pending
stage build 7/24
upgraded satellite rlx-2-04  with old kickstart distros.
Comment 16 Brandon Perkins 2009-09-10 15:27:15 EDT
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.