Created attachment 632918 [details] access_log Description of problem: Adding custom repos in a recipeset xml $basearch is not interpreted correclty by Beaker during install. The resulting URL during install is invalid. Only a problem w/ RHEL6 because of snippet used in RHEL6 kickstart template to make available custom repos during install. Version-Release number of selected component (if applicable): Beaker 0.9.4 How reproducible: 100% Steps to Reproduce: 1. add the following line or similar containing $basearch to your recipeset <repos> <repo name="rt-devel" url="http://download.devel.redhat.com/rel-eng/repos/mrg-rt-2.0-rhel-6-devel/\$basearch"/> </repos> 2. Provision RHEL 6 via Beaker 3. Provision will hang. Actual results: Provision will hang because of a invalid URL. Seen in the apache access_log on target web server. (Attached) Anaconda.log Cannot retrieve repository metadata (repomd.xml) for repository: mrg-rhel6-optional. Please verify its path and try again ('custom', ['_Exit installer', 'Edit', '_Retry', '_Continue']) Expected results: $basearch will be expanded correctly and used to build the kickstart resulting in valid repo URL during install Additional info: ~ ~
It would be nice if Beaker could substitute $basearch and $releasever and put the right URL into the repo command for Anaconda. But there's no way we can do that correctly. Yum has a *lot* of complicated logic for figuring out $basearch [1] and $releasever comes from whatever RPM provides redhat-release or whatever. So there's no practical way for Beaker to figure this stuff out for you. I think the best we can do here is to exclude any repos with a $ variable from Anaconda, so that it doesn't get confused and hang the installation. I'm also not sure why you have escaped the $ in your repo URL? Is that to work around an escaping bug in Beaker? If so I would like to fix that. [1] http://yum.baseurl.org/gitweb?p=yum.git;a=blob;f=rpmUtils/arch.py;hb=HEAD
(In reply to comment #1) > I'm also not sure why you have escaped the $ in your repo URL? Is that to > work around an escaping bug in Beaker? If so I would like to fix that. The extract you refer to is from our XSLT template. In XSLT, you need to escape the $ character, otherwise it's considered a local XSLT variable. Running '\$basearch' through an XSLT processor results in '$basearch' in the XML output.
(In reply to comment #3) Right, Beaker uses a bash heredoc like <<EOF to write out the repo configurations to /etc/yum.repos.d/ so $basearch is interpreted as a shell variable. We should be using <<"EOF" instead. I will clone a new bug for that.
(In reply to comment #4) > I will clone a new bug for that. Bug 880039.
On Gerrit: http://gerrit.beaker-project.org/1514
Beaker 0.11.0 has been released.