Project

General

Profile

Actions

Bug #9918

closed

kickstart template for mirrorlist with proxy has problem in .repo file

Added by Shivendra Ashish about 9 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I'm trying to use Kickstart template for deploying Centos 7.0 using foreman. There is a line in the template file
repo --name="EPEL" --mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-<%= @host.operatingsystem.major >&arch=<= @host.architecture ><= proxy_string %>

So while deploying due to above repo command yum will try to have EPEL.repo file which will have mirrorlist and proxy. But If I see EPEL.repo file it will have an entry like this
"mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64proxy=http://abc.com:8080"
which is woring, actually it should create the entry like this
"mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=x86_64
proxy=http://abc.com:8080"

Meaning proxy should go in next line. Since proxy is coming in same line of mirrorlist, my deployment is failing in package installation because it should not able to retrieve the correct mirror.

I want to make this defect as high priority because there is no workaround for this.
Only workaround I could figure out to use baseurl instead mirrorlist.
Please suggest if you this this defect is normal priority


Files

kickstart default kickstart default 5.54 KB kickstart template preview Shivendra Ashish, 03/27/2015 05:59 AM
Actions #1

Updated by Dominic Cleal about 9 years ago

  • Status changed from New to Need more information
  • Priority changed from High to Normal

Can you paste the template preview? (From the host page, Templates on the left, then review next to the provision template.)

Perhaps check the kickstart template and ensure it has a space in front of "--proxy" on this line, like this example: https://github.com/theforeman/community-templates/blob/master/kickstart/provision.erb#L21

You can change the template to work around problems like this, they are meant to be edited.

Actions #2

Updated by Shivendra Ashish about 9 years ago

Here is my proxy string line taken from my template, there is already a space before --proxy.

proxy_string = @host.params['http-proxy'] ? " --proxy=http://#{@host.params['http-proxy']}:#{@host.params['http-proxy-port']}" : ''

Here is the full repo command line from my template.
repo --name=EPEL --mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-<%= @host.operatingsystem.major >&arch=<= @host.architecture ><= proxy_string %>

Actions #3

Updated by Shivendra Ashish about 9 years ago

One good information that might be useful is, this is not happening If I'm deploying Centos 6.6, it is only happening for CentOS 7.0

Actions #4

Updated by Dominic Cleal about 9 years ago

Could you look at the preview please to see how it renders? Follow the instructions from my last comment.

Actions #5

Updated by Shivendra Ashish about 9 years ago

I have uploaded the template preview file

Actions #6

Updated by Dominic Cleal about 9 years ago

  • Category set to Templates
  • Status changed from Need more information to New

Ok, thanks does indeed seem to be valid. Perhaps a bug in EL 7.0 then, which a change to the template could workaround if it's not already being fixed.

Actions #7

Updated by Anonymous almost 7 years ago

  • Status changed from New to Resolved

looks like the problem was elsewhere

Actions

Also available in: Atom PDF