Bug 902390 - repos from <repos> section are missing in RHEL5 kickstarts during installation
Summary: repos from <repos> section are missing in RHEL5 kickstarts during installation
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: scheduler
Version: 0.11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: 0.12
Assignee: Amit Saha
QA Contact: Qixiang Wan
URL:
Whiteboard: Kickstart
Keywords:
: 926045 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-21 14:50 UTC by Jakub Dorňák
Modified: 2018-02-06 00:41 UTC (History)
10 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2013-04-11 04:57:38 UTC


Attachments (Terms of Use)

Description Jakub Dorňák 2013-01-21 14:50:14 UTC
Description of problem:

If I use <repos> section in job's XML to define repositories and <packages> section to define packages to be installed from the repos, it does not work, because repos from <repos> section are being added after the installation.

Steps to Reproduce:
1. submit job with some <repo> in <repos> and some <package> in <packages>
2. see the kickstart
  
Actual results:
package appears in %packages section of kickstart (which makes it a part of installation), while repo appears in %post section of kickstart (which is being executed after the installation).


Expected results:
Either the packages from <packages> should be installed in %post section after the creation of repos from <repos> or the repos should be specified directly in the kickstart using "repo" keyword.

Comment 1 Bill Peck 2013-01-21 16:01:41 UTC
Please include some links to an example job and mark the comment private.

Thanks

Comment 3 Bill Peck 2013-01-21 18:32:26 UTC
I don't see a bug here except that you referenced a repo that is invalid.

Both the repo and package are in the kickstart where I would expect them.

What is the problem?

Comment 5 Bill Peck 2013-01-21 19:55:11 UTC
Hello Jakub,

The reason you are having trouble is because beaker doesn't add the repo to rhel5 kickstarts.   I believe there is some problem with the version of anaconda on rhel5 that had us remove it.

I'll let the beaker devs confirm this.

You could install the package in ks_append as a work around.

<ks_appends>
 <ks_append>yum -y install $PACKAGE</ks_append>
</ks_appends>

Comment 6 Jakub Dorňák 2013-01-22 09:13:04 UTC
That is nice workaround.
I believe there is a serious reason not to use "repo" keyword in RHEL5 kickstarts.
But is there any not to create repos in %pre section?
It would be solved and the behaviour would be much more transparent.
The XML job specification is sort of "interface" and it is up to the developer to implement it §;o)

This may turn this issue back to RFE, bud I'll keep this up to You.

Comment 7 Dan Callaghan 2013-02-05 07:06:30 UTC
For the record, bug 590951 was where this was originally implemented and then reverted. The comments on that bug don't indicate what went wrong with Anaconda, and we can assume Bill doesn't remember otherwise he would have mentioned it here already. :-)

Amit is going to do some testing with the repo command on older Anacondas, to see if we can figure out what does and doesn't work.

Comment 8 Dan Callaghan 2013-02-05 07:09:35 UTC
(In reply to comment #6)
> But is there any not to create repos in %pre section?
> It would be solved and the behaviour would be much more transparent.

It's an interesting idea, but I am reasonably sure that Anaconda doesn't load repos from /etc/yum.repos.d (although I haven't checked).

Amit, it might be worth also investigating this as a possibility.

Comment 9 Dan Callaghan 2013-02-05 07:37:44 UTC
(In reply to comment #7)
> For the record, bug 590951 was where this was originally implemented and
> then reverted. The comments on that bug don't indicate what went wrong with
> Anaconda

I'm pretty sure this was the reason we dropped the custom repos from RHEL5: bug 754133.

So, maybe we can add them back but avoid the --cost option on RHEL5.

Comment 10 Bill Peck 2013-02-05 15:23:01 UTC
(In reply to comment #9)
> (In reply to comment #7)
> > For the record, bug 590951 was where this was originally implemented and
> > then reverted. The comments on that bug don't indicate what went wrong with
> > Anaconda
> 
> I'm pretty sure this was the reason we dropped the custom repos from RHEL5:
> bug 754133.
> 
> So, maybe we can add them back but avoid the --cost option on RHEL5.

Hi Dan,

I'm reaching back into the cob webs in my brain on this one..  But I think it was a conflict over the key variable enabling repos and then us adding the same repos again.  And because the rhel5 anaconda doesn't support the --cost variable it gets confused if the same package is available from two different repos.

Amit should verify though..  If so, maybe we can exclude the OS repos but still include any custom ones?

Comment 11 Amit Saha 2013-02-07 07:44:14 UTC
Some experiments and observations so far:

- Reproduced https://bugzilla.redhat.com/show_bug.cgi?id=754133 when an attempt is made to add repositories with the --cost option during install (using the print_anaconda_repos snippet). 

- If I remove the --cost option, the install task passes.

- Now, in addition if I specify a custom repo with an additional package to install available *only* in this repo, the package install also succeeds.


To summarize, the distro repos and the custom repos are both present, without the --cost option and the custom package specified via <package> is installed correctly. This seems like a possible solution. But, as Bill comments regarding a possible issue with this approach, may be we can just add the custom repos to the kickstart file for RHEL 5.

Comment 13 Dan Callaghan 2013-02-10 23:25:41 UTC
(In reply to comment #12)
> I think, it may just be a good idea to simply print the custom repos without
> the --cost option in the Kickstart file.

Sounds like a good approach. Thanks for doing all this testing, Amit.

Comment 14 Amit Saha 2013-02-18 02:16:12 UTC
On  Gerrit: http://gerrit.beaker-project.org/#/c/1729/

Comment 15 Amit Saha 2013-03-24 21:43:29 UTC
*** Bug 926045 has been marked as a duplicate of this bug. ***

Comment 17 Qixiang Wan 2013-03-29 06:57:02 UTC
Verified with beaker-0.11.3-1.git.210.bda2c22.

steps:

schedule a job with the following xml elements against RHEL5 distro:
---
<packages>
    <package name="xxx"/>
</packages>
<repos>
    <repo name="blah" url="http://example.com/blah/"/>
</repos>
---

The package 'xxx' with is only available in the 'blah' repo can be installed successfully after provision. And confirmed there is no issue when some packages are available from multiple repos.

Comment 18 Dan Callaghan 2013-04-11 04:57:38 UTC
Beaker 0.12 has been released.


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