I've created the ticket #345.
2009/1/20 Michael DeHaan <mdehaan(a)redhat.com>:
Fabien Dupont wrote:
> Then why koan calls 'vgs --noheadings -o vg_free --units g vmsysvg'
> which give the free size in GB ?
> The correct command should be something like :
>
> vgs --noheadings -o vg_free --units m vmsysvg | awk '{ print $1; }' |
> sed "s/M$//" | sed "s/,/\./"
>
> But there are probably better way to process the string vgs returns ;)
> And there's probably someone who knows where to put that...
>
Hmm. I thought you were originally saying you set it in cobbler as
"M,N" though I think what you're saying is that the localization of the
vgs returns is causing a problem in koan.
We should most definitely account for this in the code by doing a simple
replace. Doing it in Python is fine, and it's a bug.
Can you open a trac ticket at
http://fedorahosted.org/cobbler (for
accounts, see
https://admin.fedorahosted.org/accounts) ?
--Michael
> 2009/1/20 Michael DeHaan <mdehaan(a)redhat.com>:
>
>> Fabien Dupont wrote:
>>
>>> Hi.
>>>
>>> I'm quite new to Cobbler but like the abilities of system management
>>> it provides.
>>> I have configured my Cobbler installation to manage RHN repos, DHCP
>>> and DNS records.
>>>
>>> Now I try to use Koan to deploy virtual machines. My server
>>> configuration uses LVM for VMs system disk storage and iSCSI for data
>>> storage.
>>> My VG is named 'vmsysvg' and its size is 9,32 GB. And Koan can't
>>> handle this number. Here are the logs :
>>>
>>> # koan --server=cobbler.virtual.local --virt
--system=xenguest01.virtual.local
>>> - reading URL:
http://10.0.0.1/cblr/svc/op/ks/system/xenguest01.virtual.local
>>> install_tree: $tree
>>> libvirtd (pid 3677) en cours d'exécution...
>>> downloading initrd initrd.img to /var/lib/xen/initrd.img
>>>
url=http://cobbler.virtual.local/cobbler/images/rhel-5.2-server-x86_64-xen/initrd.img
>>> - reading URL:
http://cobbler.virtual.local/cobbler/images/rhel-5.2-server-x86_64-xen/in...
>>> downloading kernel vmlinuz to /var/lib/xen/vmlinuz
>>>
url=http://cobbler.virtual.local/cobbler/images/rhel-5.2-server-x86_64-xen/vmlinuz
>>> - reading URL:
http://cobbler.virtual.local/cobbler/images/rhel-5.2-server-x86_64-xen/vm...
>>> vgs -o vg_name
>>> File descriptor 3 left open
>>> File descriptor 4 left open
>>> VG
>>> datavg
>>> iscsivg
>>> rootvg
>>> vmsysvg
>>>
>>> vgs --noheadings -o vg_free --units g vmsysvg
>>> File descriptor 3 left open
>>> File descriptor 4 left open
>>> (9,32)
>>> exceptions.ValueError
>>> invalid literal for float(): 9,32
>>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 191, in
main
>>> k.run()
>>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 408,
in run
>>> self.virt()
>>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 683,
in virt
>>> return self.net_install(after_download)
>>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 602,
in net_install
>>> after_download(self, profile_data)
>>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 681,
in
>>> after_download
>>> self.virt_net_install(profile_data)
>>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 1089,
in
>>> virt_net_install
>>> path_list = self.calc_virt_path(pd, virtname)
>>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 1360,
in
>>> calc_virt_path
>>> path =
self.calc_virt_path2(pd,name,offset=count,location=x,sizes=virt_sizes)
>>> File "/usr/lib/python2.4/site-packages/koan/app.py", line 1412,
in
>>> calc_virt_path2
>>> freespace = int(float(freespace_str))
>>>
>>> Maybe the coma sign is not what's awaited by python.
>>> Hope you can help me...
>>>
>>> --
>>> Fabien Dupont
>>> System Engineer
>>> _______________________________________________
>>> cobbler mailing list
>>> cobbler(a)lists.fedorahosted.org
>>>
https://fedorahosted.org/mailman/listinfo/cobbler
>>>
>>>
>> Also, this field expects the units to be in megabytes, not decimal GB.
>> _______________________________________________
>> cobbler mailing list
>> cobbler(a)lists.fedorahosted.org
>>
https://fedorahosted.org/mailman/listinfo/cobbler
>>
>>
> _______________________________________________
> cobbler mailing list
> cobbler(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/cobbler
>
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler