Bug 1091666

Summary: virt-install fails when pointed at rawhide tree (invalid literal for int() with base 10: 'rawhide')
Product: Red Hat Enterprise Linux 7 Reporter: Pavel Raiskup <praiskup>
Component: virt-managerAssignee: Giuseppe Scrivano <gscrivan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: berrange, codong, crobinso, dyuan, gscrivan, hbrock, honli, jforbes, ls, mail, mzhan, sochotni, tzheng, virt-maint
Target Milestone: rcKeywords: Reopened, Upstream
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-1.1.0-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 989162
: 1321719 (view as bug list) Environment:
Last Closed: 2015-03-05 10:06:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 989162    
Bug Blocks: 1321719    

Description Pavel Raiskup 2014-04-27 06:31:38 UTC
+++ This bug was initially created as a clone of Bug #989162 +++

As the rawhide compose now generates install images again[1] I pointed virt-install at a suitable install tree (--location=$url). Virt-install fails with the following line:

ERROR (cli:451) Error validating install location: invalid literal for int() with base 10: 'rawhide'

The corresponding backtrace points to FedoraDistro.isValidStore in virtinst/OSDistro.py. After collecting version information from the treeinfo it checks if the returned version is "development". This doesn't seem to be true for current rawhide trees which return "rawhide".

When encountering a version of "rawhide" the os_variant should be set to the latest Fedora version, as is done for "development". The attached trivial patch (against virt-manager.git) does this.

If a version of "development" is no longer used at all it additionally might be possible to remove the check for it.

Version-Release number of selected component (if applicable):
virt-manager-common-0.10.0-1.fc19.noarch

Additional info:
[1] https://lists.fedoraproject.org/pipermail/devel-announce/2013-July/001201.html

--- Additional comment from Cole Robinson on 2013-07-29 18:29:21 CEST ---

Thanks Lars, I pushed your patch upstream:

https://git.fedorahosted.org/cgit/virt-manager.git/commit/?id=72648c9185e3ccb27fb9896a4e7a48f1769c8a4e

Comment 1 tingting zheng 2014-04-28 06:50:26 UTC
I can reproduce the bug with:
virt-manager-0.10.0-20.el7.noarch

# virt-install -n rawhide-test  --ram 1024 --disk path=/var/lib/libvirt/images/rawhide-test.img,size=6  --location http://ftp.sjtu.edu.cn/fedora/linux/development/rawhide/x86_64/os/
ERROR    Error validating install location: invalid literal for int() with base 10: 'rawhid

Comment 2 Pavel Raiskup 2014-06-10 10:21:32 UTC
> Giuseppe Scrivano 2014-06-10 10:42:54 CEST
> Status: ASSIGNED → CLOSED
> Resolution: --- → UPSTREAM
> Last Closed: 2014-06-10 04:42:54

This seems to be bot-mistake, or probably "s/UPSTREAM/WONTFIX/"?  I would
expect that virt-manager will be rebased (or something like that) in near
future in RHEL7 but I don't see reference bug.

Pavel

Comment 3 Giuseppe Scrivano 2014-06-10 10:37:30 UTC
right, we've accumulated a big number of fixes and new features upstream and the plan is to rebase virt-manager in RHEL-7.1.  Is it clearer now?

Comment 4 Pavel Raiskup 2014-06-10 10:54:36 UTC
(In reply to Giuseppe Scrivano from comment #3)
> right, we've accumulated a big number of fixes and new features upstream and
> the plan is to rebase virt-manager in RHEL-7.1.  Is it clearer now?

Thanks for clarification!  But still, if we close this bug, I'll loose the
possibility of tracking this particular issue.  Any reference bug I could CC
in would be fine.

Comment 5 Cole Robinson 2014-06-10 13:53:53 UTC
Yes, we will want QE to eventually test this bug, and since the issue is in RHEL7.0 we want it in the errata, so we should keep this bug open. Unfortunately there's no clear bug status that says 'fixed upstream and waiting for rebase'. You can probably hijack POST for that if you want, or use a custom bit in the 'tags' field

Comment 6 Pavel Raiskup 2014-06-10 14:07:52 UTC
I meant some bz number with "Rebase" keyword or some tracking bug
(which is worse case due to rush on CC list).  But if this will be open,
I'm OK then to stay here.  Thanks again, Pavel

Comment 7 Stanislav Ochotnicky 2014-06-11 07:29:47 UTC
There's "Upstream" keyword and indeed some teams use POST which provides slightly better visibility.

Comment 9 tingting zheng 2014-09-10 08:33:13 UTC
I can reproduce the bug with:
virt-manager-0.10.0-20.el7.noarch

# virt-install -n rawhide-test  --ram 1024 --disk path=/var/lib/libvirt/images/rawhide-test.img,size=6  --location http://ftp.sjtu.edu.cn/fedora/linux/development/rawhide/x86_64/os/
ERROR    Error validating install location: invalid literal for int() with base 10: 'rawhid

Tested pass with:
virt-install-1.1.0-1.el7.noarch
virt-manager-1.1.0-1.el7.noarch

# virt-install -n rawhide-test  --ram 1024 --disk path=/var/lib/libvirt/images/rawhide-test.img,size=6  --location http://ftp.sjtu.edu.cn/fedora/linux/development/rawhide/x86_64/os/ --graphics spice 

Starting install...
Retrieving file vmlinuz...                                                                 |  11 MB  00:00:46 !!! 
Retrieving file initrd.img...                                                              |  84 MB  00:08:35 !!! 
Allocating 'rawhide-test.img'                                                              | 6.0 GB  00:00:00     
Creating domain...                                                                         |    0 B  00:00:00     

Refer to the above comments,move the bug to VERIFIED.

Comment 10 Giuseppe Scrivano 2014-11-18 13:14:17 UTC
*** Bug 1165150 has been marked as a duplicate of this bug. ***

Comment 12 errata-xmlrpc 2015-03-05 10:06:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0427.html

Comment 13 Honggang LI 2016-03-29 02:47:34 UTC
[honli@rdma-master iso]$ 
[honli@rdma-master iso]$ rpm -q virt-manager virt-install
virt-manager-1.2.1-8.el7.noarch
virt-install-1.2.1-8.el7.noarch
[honli@rdma-master iso]$ 
[honli@rdma-master iso]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.2 (Maipo)
[honli@rdma-master iso]$ 
[honli@rdma-master iso]$ 
[honli@rdma-master iso]$ cat vinst.sh 
#!/bin/bash

virt-install \
        --name="honli-f25-rawhide" \
        --file=/var/lib/libvirt/images/honli-f25-rawhide.dsk \
        --file-size=30 \
        --vcpus=4 --ram=8192 \
        --os-type=linux \
        --location='http://mirror.sfo12.us.leaseweb.net/fedora/linux/development/rawhide/Server/x86_64/os/' \
        --extra-args="console=tty0 console=ttyS0,115200" --noreboot --nographics
        #--os-variant=fedora22 \


[honli@rdma-master iso]$ sudo sh -x vinst.sh 
+ virt-install --name=honli-f25-rawhide --file=/var/lib/libvirt/images/honli-f25-rawhide.dsk --file-size=30 --vcpus=4 --ram=8192 --os-type=linux --location=http://mirror.sfo12.us.leaseweb.net/fedora/linux/development/rawhide/Server/x86_64/os/ '--extra-args=console=tty0 console=ttyS0,115200' --noreboot --nographics
ERROR    Error validating install location: invalid literal for int() with base 10: 'Rawhide'
[honli@rdma-master iso]$ 
[honli@rdma-master iso]$ 
[honli@rdma-master iso]$ 
[B]  0:honli@rdma-master:~/iso*                                             21! 45d10h 0.00 48x2.9GHz 251.9G2%