Bug 345721 - virt-manager cannot install from kickstartable tree provided by Satellite server.
virt-manager cannot install from kickstartable tree provided by Satellite ser...
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Provisioning (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Shannon Hughes
wes hayutin
Depends On:
Blocks: 248627
  Show dependency treegraph
Reported: 2007-10-22 14:55 EDT by Paul Batkowski
Modified: 2010-10-22 15:42 EDT (History)
11 users (show)

See Also:
Fixed In Version: sat510
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-02 20:18:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Virt-manager log from rhel 5 showing successful install start. (2.33 KB, text/plain)
2007-10-22 19:03 EDT, Paul Batkowski
no flags Details
Virt-manager log from rhel 5.1 beta showing install start failure. (1.49 KB, text/plain)
2007-10-22 19:04 EDT, Paul Batkowski
no flags Details
tcpdump from rhel 5.0 client. (6.91 MB, application/x-bzip2)
2007-10-22 19:06 EDT, Paul Batkowski
no flags Details
tcpdump from rhel 5.1 client. (82.60 KB, application/x-bzip2)
2007-10-22 19:08 EDT, Paul Batkowski
no flags Details
Patch for python-virtinst against rhel5 cvs (3.62 KB, patch)
2007-11-01 12:20 EDT, Cole Robinson
no flags Details | Diff
Fix xen guest installs against Satellite (3.71 KB, patch)
2007-12-14 16:25 EST, Daniel Berrange
no flags Details | Diff
Log snippet of /root/.virt-manager/virt-manager.log (2.21 KB, text/plain)
2008-01-14 21:05 EST, Jim Roland
no flags Details

  None (edit)
Description Paul Batkowski 2007-10-22 14:55:10 EDT
Description of problem:

Using virt-manager or virt-install in RHEL 5.1 beta, I cannot build a vm from
the URL (Install Media) provided by Red Hat Satellite Server 4.2.2. 
Virt-manager/virt-install from RHEL 5.0 are able to successfully build from the
same URL on the Satellite server.

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

These don't work:


These versions work:

How reproducible:


Steps to Reproduce:

1) Launch virt-manager and in the screen that asks you for the Install Media,
input the tinyurl generated by satellite for accessing the kickstart-able
install tree. 

2) In the kickstart, provide the URL of the Bare Metal Kickstart as specified by
the Satellite server kickstart profile.

3) Continue the installation...
Actual results:

virt-manager/virt-install in RHEL 5.1/Fedora 7 issue a GET /ty/<random_url>/ and
the Satellite server responds with a 404 (page not found) message and the
install fails.

Expected results:

virt-manager/virt-install issue a GET /ty/<random_url>/images/xen/vmlinuz to
pull down the kernel and later the initrd so that the installation can continue.
This was the behavior with RHEL 5.0 virt-manager.

Additional info:
Comment 1 Daniel Berrange 2007-10-22 15:03:22 EDT
Please provide the *EXACT*  virt-install command line you are running. Also, run
virt-install with the --debug  flag added & paste the complete output into this

For virt-manager attach, /root/.virt-manager/virt-manager.log
Comment 2 Paul Batkowski 2007-10-22 19:03:53 EDT
Created attachment 234611 [details]
Virt-manager log from rhel 5 showing successful install start.
Comment 3 Paul Batkowski 2007-10-22 19:04:49 EDT
Created attachment 234621 [details]
Virt-manager log from rhel 5.1 beta showing install start failure.
Comment 4 Paul Batkowski 2007-10-22 19:06:15 EDT
Created attachment 234631 [details]
tcpdump from rhel 5.0 client.
Comment 5 Paul Batkowski 2007-10-22 19:08:08 EDT
Created attachment 234641 [details]
tcpdump from rhel 5.1 client.
Comment 6 Paul Batkowski 2007-10-22 19:12:17 EDT
Please see this test case I have run. In both cases, the same Dom0 is accessing
the same satellite server. The URL it should be using to pull down the kernel
and initrd for the installer to run is found at

In RHEL 5.0 (as seen in the tcpdump), urlgrabber issues GET

In RHEL 5.1 (see tcpdump), urlgrabber issues GET
http://satellite.battlestar.local/ty/ioBUrib1  to which the satellite server
responds with a 404. 

Looks like in 5.1, the url, urlgrabber is trying to get is truncated.
Comment 7 Daniel Berrange 2007-10-22 19:41:18 EDT
The URL is not truncated. This is a delibrate fetch to validate the install base
URL actually exists we fetch the root URL. We need todo this because
virt-install has to cope with my different kinds of distro & can't blind go
straight for the images/xen/vmlinuz file. The logs show satellite is giving back:

 http://satellite.battlestar.local/ty/ioBUribl [Errno 14] HTTP Error 404: Not Found

Any valid installation tree must always return content for this URL, since at
the very least the distro base has the directories for RPMs, and the kernel
images. Satellite is giving back a bogus Error 404 for the base distro tree &
thus we do not find a valid distro present. Satellite needs to be fixed to
return valid content for the base URL, ie a 200 OK code, not a 404 not found.

Comment 12 Daniel Berrange 2007-10-29 12:34:50 EDT
There are two options for python-virtinst here really

 - Remove/re-write the code which checks the base URL. This will remove some of
the error reporting capabilities we added. 
 - In the code which catche the 404, put in some check against the HTTP response
headers to identify & special case handling for RHN.

Both have some element of risk, the second option is probably less risky though
because it won't result in significant changes to the non-RHN based provisioning
on virtual machines.

Neither of these are suitable for 5.1 day-0 errata because from painfull
experiance (this ticket included), everytime we change something in this bit of
code, an unexpected thing breaks. Thus any change here will require significant
testing to ensure we don't cause regressions.
Comment 14 Cole Robinson 2007-10-29 17:31:08 EDT
using wget -S doesn't seem to show any rhn specific information in the http
headers from a 404 response.

An interesting thing though: if the link to a tree generated by rhn is still
valid, attempting to access it throws a 404 error. If this link has expired, no
404 error is thrown, just a redirection to a generic 404 page. As such, trying
to run virt-install on an expired link bypasses this error, downloading the 404
page as the intended file, and then barfing when it tries to use said file as a
kernel etc.
Comment 15 Cole Robinson 2007-10-30 12:58:16 EDT
Does anyone on the rhn side know of a way to determine if an install tree is
being managed by a satellite server? Is there a satellite specific file we can
check for, or maybe even anything to determine the system in general is running

We would like to be able to do a one-off check to see if we are talking to a
satellite server if the tree URL resolution fails, so that we can safely ignore
the error.
Comment 23 Cole Robinson 2007-11-01 12:20:52 EDT
Created attachment 245821 [details]
Patch for python-virtinst against rhel5 cvs
Comment 24 Paul Batkowski 2007-11-01 13:07:45 EDT
patch in comment #23 works for me with a 5.1 client and Satellite Server 4.2.2.
Comment 29 AJ Hettema 2007-12-14 09:21:25 EST

I experienced the same problem, and after using the patch it worked fine for me.
But, when I try to do a virt-install for a paravirtualized RHEL4 system, it 
fails again. Is it possible to make a workaround for that as well???
Comment 30 AJ Hettema 2007-12-14 09:44:29 EST
output of virt-install of rhel4 installation tree.

[root@inc0002 /]# virt-install --name=inv0010 --ram=2048 --vcpus=2 --
file=/sysmnt/inv0010/inv0010.img --file-size=30 --bridge=xenbr0 --accelerate --
paravirt --location=http://inv0001.nxdi.nl-htc01.nxp.com/ty/DRyo31R9 --extra-
64 ip= netmask= gateway= 
dns= ksdevice=eth0" --debug
Would you like to enable graphics support? (yes or no) yes

Starting install...
Fri, 14 Dec 2007 15:43:05 DEBUG    Validation failed for http://inv0001.nxdi.nl-
htc01.nxp.com/ty/DRyo31R9 [Errno 14] HTTP Error 404: Not Found
Fri, 14 Dec 2007 15:43:05 DEBUG    Tree URL could not be opened. Checking ahead 
for valid RH distro.
Fri, 14 Dec 2007 15:43:05 DEBUG    Fetching URI http://inv0001.nxdi.nl-
Fri, 14 Dec 2007 15:43:05 DEBUG    Cannot find file Fedora
Fri, 14 Dec 2007 15:43:05 DEBUG    Fetching URI http://inv0001.nxdi.nl-
Fri, 14 Dec 2007 15:43:05 DEBUG    Cannot find file centosdocs-man.css
Fri, 14 Dec 2007 15:43:05 DEBUG    Fetching URI http://inv0001.nxdi.nl-
Fri, 14 Dec 2007 15:43:05 DEBUG    Cannot find file RPM-GPG-KEY-redhat-release
Fri, 14 Dec 2007 15:43:05 DEBUG    Fetching URI http://inv0001.nxdi.nl-
Fri, 14 Dec 2007 15:43:05 DEBUG    Saved file to /var/lib/xen/virtinst-
Retrieving autorun...     100% |=========================|  248 B    00:00
Fri, 14 Dec 2007 15:43:05 DEBUG    Fetching URI http://inv0001.nxdi.nl-
Fri, 14 Dec 2007 15:43:05 DEBUG    Saved file to /var/lib/xen/virtinst-RPM-GPG-
Retrieving RPM-GPG-KEY... 100% |=========================| 1.9 kB    00:00
Fri, 14 Dec 2007 15:43:05 DEBUG    Detected a RHEL-4 distro
ERROR:  Invalid install location
Comment 31 Daniel Berrange 2007-12-14 16:25:25 EST
Created attachment 289501 [details]
Fix xen guest installs against Satellite 

The previous attached patch is buggy wrt to RHEL4 - attaching the patch we
actually applied to the RPMS.
Comment 32 Brandon Perkins 2008-01-07 13:33:18 EST
Correct me if I'm wrong, but with Bugzilla Bug 412061 in a CLOSED ERRATA state,
and RHBA-2008:0026 - Bug Fix Advisory out:


is there still a bug in Satellite/Hosted to fix?  Or can we call this notabug or
a dupe of bug 412061?
Comment 33 Daniel Berrange 2008-01-07 13:39:39 EST
Satellite must still be fixed. We merely put a hack into virt-install to
workaround the RHN limitation in the short term. This hack is not suitable for
feeding upstream, so long term it is desirable to get RHN Satellite correctly
responding to HTTP GET's on the install trees so they are browsable in the same
way as normal non-RHN install trees. Without such a fix its inevitable that this
or similar problems will recurr.
Comment 35 Jim Roland 2008-01-14 21:05:44 EST
Created attachment 291668 [details]
Log snippet of /root/.virt-manager/virt-manager.log

Attempting to install via localized media as the help file instructs.
Comment 36 Jim Roland 2008-01-14 21:06:37 EST
Also unable to install via locally mounted media.  log snippet indicates it's 
looking for files to identify a valid install, however it does not find CentOS, 
Fedora, and attempts to look for RHEL media, and unable to locate autorun.  
Using RHEL 5.1 DVD media.  Have attempted using subdirs Server, VT, etc, same 

Log snippet attached.
Comment 37 Cole Robinson 2008-01-15 15:20:39 EST
Jim, I believe this is a seperate issue. Could you file a new bug for this
please, including the above log and any other info that might help. Thanks!
Comment 38 Jim Roland 2008-01-15 18:37:24 EST
Will do
Comment 41 Shannon Hughes 2008-01-25 14:58:37 EST
going to get this into sat510 branch
Comment 42 Shannon Hughes 2008-01-28 09:44:27 EST
qa test plan:

1) create a kickstart profile 
2) copy the distribution url that is part of the kickstart profile, i.e.
something like, http://shaggy.rdu.redhat.com/ty/aQb9OYHs
3) the url above points to a distribution tree on the satellite
4) try using wget to grab the content, u should see a 200 response
5) now trying to add a directory to the url, for example on a rhel 4 tree this
is possible, http://shaggy.rdu.redhat.com/ty/aQb9OYHs/RedHat. confirm again a 200.
6) now trying pinging a bogus directory,
http://shaggy.rdu.redhat.com/ty/aQb9OYHs/RedHats, you should see a 404
Comment 43 Shannon Hughes 2008-01-30 16:05:41 EST
mass move to onqa
Comment 44 wes hayutin 2008-02-05 13:30:35 EST
actually ran the whole virt guest install from virt-manager w/ the urls provided
by an rhn kickstart..

works great.. good job..
Comment 45 Jesus M. Rodriguez 2008-03-26 17:23:56 EDT
1) took existing rhel5 kickstart profile
2) copied dist url: http://test10-64.rhndev.redhat.com/ty/UjjsThDC
3) ran wget against url got a 200 response
4) ran wget against url with directory:
http://test10-64.rhndev.redhat.com/ty/UjjsThDC/RedHat -
results in 404 which is expected because this is a RHEL5 kickstart
http://test10-64.rhndev.redhat.com/ty/UjjsThDC/Fedora -
results in 404 which is expected because this doesn't exist
http://test10-64.rhndev.redhat.com/ty/UjjsThDC/Server -
results in 200 expected because this is a RHEL5 kickstart

release pending.

Comment 46 Brandon Perkins 2008-04-02 20:18:14 EDT
5.1 Sat GA so Closed for Current Release.

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