Bug 246300 - Installation number and repos missing after upgrade to Satellite 5.0
Summary: Installation number and repos missing after upgrade to Satellite 5.0
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Upgrades   
(Show other bugs)
Version: 500
Hardware: All Linux
high
high
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Steve Salevan
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-29 21:37 UTC by Scott Dodson
Modified: 2007-08-29 15:34 UTC (History)
3 users (show)

Fixed In Version: sat501
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-29 15:34:30 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Scott Dodson 2007-06-29 21:37:29 UTC
Description of problem:
key --skip must have been implied under Satellite 4.2. Profiles that existed
under 4.2 lack Installation Number line which causes installation to halt
waiting for user input (skip or enter IN)

Version-Release number of selected component (if applicable):
Satellite 5.0

How reproducible:
100%

Steps to Reproduce:
1. create RHEL5 kickstart profile under Satellite 4.2
2. Upgrade to Satellite 5.0
3. Provision a machine with kickstart profile created in step #1
  
Actual results:
Kickstart stalls waiting for the user to input an Installation Number or skip

Expected results:
Kickstart completes without interaction

Additional info:

Comment 1 Mike McCune 2007-06-29 21:38:48 UTC
moving to 501 maint and Upgrades component.

Comment 3 Clifford Perry 2007-07-12 23:02:28 UTC
https://satellite.gsslab.rdu.redhat.com/rhn/kickstart/KickstartOptionsEdit.do?ksid=707
http://satellite.gsslab.rdu.redhat.com/kickstart/ks/label/inventory


Basically with Satellite 4.2.1 we did the:
repo 
and
key

lines for RHEL 5 kickstarts statically in Java as they are rendered. 

With Satellite 5.0 these were added as options, which show up under advanced
options for kickstart profile. Scott fixed his 'key' issues by editing under
advanced options. 

What we need to do with the schema upgrade script is to pre-populate within the
schema for RHEL 5 kickstart profiles the 'standard' entries that we place :

http://rlx-1-12.rhndev.redhat.com/kickstart/ks/label/cliff-test-rhel5

repo --name=Cluster
--baseurl=http://rlx-1-12.rhndev.redhat.com/kickstart/dist/ks-rhel-i386-server-5/Cluster
repo --name=ClusterStorage
--baseurl=http://rlx-1-12.rhndev.redhat.com/kickstart/dist/ks-rhel-i386-server-5/ClusterStorage
repo --name=VT
--baseurl=http://rlx-1-12.rhndev.redhat.com/kickstart/dist/ks-rhel-i386-server-5/VT
repo --name=Workstation
--baseurl=http://rlx-1-12.rhndev.redhat.com/kickstart/dist/ks-rhel-i386-server-5/Workstation
key --skip

Think this is rhnKickstartCommand and rhnKickstartCommandName tables are the
ones of interest. 



Comment 4 Jan Pazdziora 2007-07-19 14:32:40 UTC
This is a SQL to add "key --skip" to any RHEL 5 kickstart which doesn't have any
key yet:

insert into rhnkickstartcommand
        ( id, kickstart_id, ks_command_name_id, arguments, created, modified )
select rhn_kscommand_id_seq.nextval,
rhnkickstartdefaults.kickstart_id,key_id.id, '--skip', sysdate, null
from rhnkickstartdefaults, (
        select rhnkickstartcommandname.id
        from rhnkickstartcommandname
        where rhnkickstartcommandname.name = 'key'
        ) key_id, rhnkickstartabletree, rhnksinstalltype
where rhnkickstartdefaults.kstree_id = rhnkickstartabletree.id
        and rhnkickstartabletree.install_type = rhnksinstalltype.id
        and rhnksinstalltype.label = 'rhel_5'
        and not exists (
                select 1
                from rhnkickstartcommand
                where rhnkickstartdefaults.kickstart_id =
rhnkickstartcommand.kickstart_id
                        and rhnkickstartcommand.ks_command_name_id = key_id.id
        )


Comment 5 Jan Pazdziora 2007-07-19 15:55:54 UTC
For the repo command, is it alright to put in

repo --name=Cluster
--baseurl=http://rlx-1-12.rhndev.redhat.com/kickstart/dist/ks-rhel-i386-server-5/Cluster

even if the base URL will be in the ty form

url --url http://rlx-1-12.rhndev.redhat.com/ty/v49bP9JB

?

Comment 6 Jan Pazdziora 2007-07-19 16:06:07 UTC
(In reply to comment #5)
> For the repo command, is it alright to put in
> 
> repo --name=Cluster
>
--baseurl=http://rlx-1-12.rhndev.redhat.com/kickstart/dist/ks-rhel-i386-server-5/Cluster
> 
> even if the base URL will be in the ty form
> 
> url --url http://rlx-1-12.rhndev.redhat.com/ty/v49bP9JB
> 
> ?

Yes, Jan, this seems exactly what Satellite 5.0.0 is doing when you create a new
RHEL 5 kickstart.

Comment 7 Jan Pazdziora 2007-07-19 16:33:48 UTC
And here's the URL to add that those four missing repo commands:

insert into rhnkickstartcommand
        ( id, kickstart_id, ks_command_name_id, arguments, created, modified )
select rhn_kscommand_id_seq.nextval, rhnkickstartdefaults.kickstart_id, repo_id.id, 
        '--name=' || names.name || ' --baseurl='
                || rtrim(replace(replace(rhnkickstartcommand.arguments, '--url
', ''), 'rhn/kickstart', 'kickstart/dist'), '/')
                || '/' || names.name,
        sysdate, null
from rhnkickstartdefaults, (
        select rhnkickstartcommandname.id
        from rhnkickstartcommandname
        where rhnkickstartcommandname.name = 'repo'
        ) repo_id, rhnkickstartabletree, rhnksinstalltype,
        (
        select rhnkickstartcommandname.id
        from rhnkickstartcommandname
        where rhnkickstartcommandname.name = 'url'
        ) url_id, rhnkickstartcommand,
        (
        select 'Cluster' name from dual
        union all
        select 'ClusterStorage' name from dual
        union all
        select 'Workstation' name from dual
        union all
        select 'VT' name from dual
        ) names
where rhnkickstartdefaults.kstree_id = rhnkickstartabletree.id
        and rhnkickstartabletree.install_type = rhnksinstalltype.id
        and rhnksinstalltype.label = 'rhel_5'
        and not exists (
                select 1
                from rhnkickstartcommand x
                where rhnkickstartdefaults.kickstart_id = x.kickstart_id
                        and x.ks_command_name_id = repo_id.id
        )
        and rhnkickstartdefaults.kickstart_id = rhnkickstartcommand.kickstart_id
        and rhnkickstartcommand.ks_command_name_id = url_id.id
        and rhnkickstartcommand.arguments like '--url http%'


Comment 9 Clifford Perry 2007-07-19 19:26:56 UTC
Hi Jan - for me - option #2 is the most ideal solution. 

We look to have a set of SQL scripts (which you do) which will know for (by
checking) for existing RHEL 5 kickstart profiles and for these profiles, during
the upgrade add in the additional options into the DB which are needed under
advanced options to provide the additional repo and key options still with the
RHEL 5 kickstart profile post upgrade from 4.2 to 5.0 Sat. 

We should also have this script seperate and available to SEG and other to
provide to customers who already have upgraded to 'fix' the missing data. 

Cliff. 

PS - nice to see I'm not the only person to talk to myself over bugzilla :)

Comment 10 Jan Pazdziora 2007-07-20 07:11:39 UTC
A fix to the satellite-4.2-to-5.0.sql script committed to SVN, trunk revision
118458, branch RELEASE-5.0 revision 118459.

Comment 13 Jan Pazdziora 2007-08-02 20:37:07 UTC
Moving ON_QA because:

Satellite 5.0.1-1 and Proxy 5.0.1-1 are now available on webqa hosted
channels.  Satellite 5.0.1-1 ISOs are now available.

Comment 14 Steve Salevan 2007-08-06 20:23:14 UTC
Followed test plan and kickstart w/ 420 KS profile on upgraded 501 Satellite
proceeded without interaction.  Thus, I'm moving this bug to VERIFIED.

Comment 15 Corey Welton 2007-08-27 15:15:38 UTC
RELEASE_PENDING


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