incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: RHEV-M driver updates
Date Wed, 20 Apr 2011 21:25:52 GMT
On Apr 20, 2011, at 10:00 PM, Tomas Von Veschler wrote:

> Hi Michal,
> 
> Great work! Now it's a pleasure to use this driver :-)
> 
> A couple of changes for your consideration:
> 
> ====== rhevm_driver.rb ========
> 
> 1) Increase VM CPU limit to 16
> 2) Fix memory reporting size
> 3) Change HW profiles to upper case to avoid 404 in web UI
> 
> --- rhevm_driver.rb_michalpatch	2011-04-20 21:27:32.354164599 +0200
> +++ rhevm_driver.rb	2011-04-20 21:51:39.356164872 +0200
> @@ -42,15 +42,15 @@
>   # Values like RAM or STORAGE are reported by VM
>   # so they are not static.
> 
> -  define_hardware_profile 'server' do
> -    cpu         ( 1..4 )
> +  define_hardware_profile 'SERVER' do
> +    cpu         ( 1..16 )
>     memory      ( 512 .. 32*1024 )
>     storage     ( 1 .. 100*1024 )
>     architecture 'x86_64'
>   end
> 
> -  define_hardware_profile 'desktop' do
> -    cpu         ( 1..4 )
> +  define_hardware_profile 'DESKTOP' do
> +    cpu         ( 1..16 )
>     memory      ( 512 .. 32*1024 )
>     storage     ( 1 .. 100*1024 )
>     architecture 'x86_64'
> @@ -201,7 +201,7 @@
>     state = convert_state(inst.status)
>     storage_size = inst.storage.nil? ? 1 : (inst.storage.to_i/1048576/100)
>     profile = InstanceProfile::new(inst.profile,
> -                                   :hwp_memory => inst.memory.to_i/1024/1204,
> +                                   :hwp_memory => (inst.memory.to_i/1024/1024),
>                                    :hwp_cpu => inst.cores,
>                                    :hwp_storage => "#{storage_size}"
>     )
> 
> 
> ====== rhevm_client.rb ========
> 
> 1) Fix unknown method exception when VM had no description
> 
> --- rhevm_client.rb_michalpatch	2011-04-20 21:27:32.353165601 +0200
> +++ rhevm_client.rb	2011-04-20 21:38:51.650167145 +0200
> @@ -207,7 +207,7 @@
>     private
> 
>     def parse_xml_attributes!(xml)
> -      @description = (xml/'description').first.text
> +      @description = ((xml/'description').first.text rescue nil)
>       @status = (xml/'status').first.text
>       @memory = (xml/'memory').first.text
>       @profile = (xml/'type').first.text
> 
> Nitpicking a bit if you let me, "description" should be really part of BaseResource IMO:
> 
> http://markmc.fedorapeople.org/rhevm-api/en-US/html-single/index.html#chap-REST_API_Guide-Common_Idioms

Thanks! Nice catch with memory calculation it must be a typo. I merged your changes to my
patch and pushed
to SVN. Since I think you tested it against real RHEV-M it's sufficient to take it as ACKed
;-)

  -- Michal

> 
> Thanks!
> Tomas
> 
> 
> On 04/20/2011 02:40 PM, Michal Fojtik wrote:
>> Hi,
>> 
>> Since this patch was sent with -novalidate and could not by applied cleanly,
>> I'm attaching ZIP file with this patch.
>> 
>> 
>> 
>> 
>> 
>>   -- Michal
>> 
>> On Apr 20, 2011, at 2:38 PM, mfojtik@redhat.com wrote:
>> 
>>> Hi,
>>> 
>>> Summary of changes:
>>> 
>>> - RHEV-M ruby client is completely reworked and how it use Accept header to
>>>   'construct' XMLs from RHEV-M
>>> 
>>> - Tests are updated to version milestone9.2 of RHEV-M API
>>> 
>>> - Overal performance of RHEV-M driver is increased by ~150% because new client
is
>>>   now doing less amount of requests to RHEV-M API
>>> 
>>> - IP address is now reported correctly if guests tools are installed on RHEV-M
>>>   guest vm.
>>> 
>>> Incompatibilities and changes:
>>> 
>>>  - /api/instances/blabla nwo throw error 500 instead of 404 when instance not
>>>    exists. This is a bug in RHEV-M API and it was reported.
>>> 
>>>  - After you create a new instance, it's not automatically created in STOPPED
>>>    state but now it's PENDING (because vm in IMAGE_LOCKED state cannot be started)
>>> 
>>>  - Disk size and memory size is reported incorectly for VM. RHEV-M reporting
>>>    'currently used' space in QCOW2 image instead of total space (reported to
RHEV-M API team)
>>> 
>>> -- Michal
>>> 
>>> 
>> 
>> ------------------------------------------------------
>> Michal Fojtik, mfojtik@redhat.com
>> Deltacloud API: http://deltacloud.org
> 
> -- 
> Tomas Von Veschler
> Solution Architect    Tel: +34 662 388 666
> Red Hat, S.L.                Madrid office

----------------------------------------------------------------------
Michal Fojtik, Software Engineer, Red Hat Czech
mfojtik@redhat.com
Deltacloud API: http://deltacloud.org


Mime
View raw message