[pve-devel] pveproxy: I might have discovered a bug

Alexandre DERUMIER aderumier at odiso.com
Sat Jun 22 12:55:06 CEST 2013


I think it's normal that the browser retry the GET request if he receive a timeout.

(you should see it with firebug)

Great that it's working fine now :)

I'll check the nexenta plugin, because with a lot of zvol, the api can be slow too, because of each zvol call to retrieve parent,size,... (can take up to 1 or 2 min with 400zvols)

I wonder if I will not take some of your ssh code, to do this faster. (mix api and ssh)


----- Mail original ----- 

De: "Michael Rasmussen" <mir at datanom.net> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com, "Dietmar Maurer" <dietmar at proxmox.com> 
Envoyé: Samedi 22 Juin 2013 12:45:06 
Objet: Re: [pve-devel] pveproxy: I might have discovered a bug 

Hi Alexandre, 

On Sat, 22 Jun 2013 06:52:36 +0200 (CEST) 
Alexandre DERUMIER <aderumier at odiso.com> wrote: 

> not related, but I think you can reduce a lot the time, removing calls (zfs_get_zvol_props,zfs_get_zvol_size) for each zvol to find parent && size: 
> 
> 
> + my $props = zfs_get_zvol_props($scfg, $zvol); 
> + my $parent = $props->{origin}; 
> + if($parent && $parent =~ m/^$scfg->{pool}\/(\S+)$/){ 
> + $parent = $1; 
> + } 
> + 
> + $list->{$pool}->{$image} = { 
> + name => $image, 
> + size => zfs_get_zvol_size($scfg, $image), 
> + format => 'raw', 
> + vmid => $owner 
> + }; 
> 
> instead, simply retrieve the origin and volsize in the main zfs list 
> 
I have refactored the code according to Alexandre's suggestions and now 
displaying the contents work. 

Why did it not work before? 
IMHO the reason was that the command was using to much time to complete 
which caused the GUI code to believe that the connection was broken in 
which case another request was made. Eg. we were seeing a race 
condition where the time to complete a command exceeded the timeout 
configured in the GUI to consider a connection was broken. 

I have attached the new plugin code for your to test. I will later 
today mail a new set of patches for pve-storage to this list. 

-- 
Hilsen/Regards 
Michael Rasmussen 

Get my public GnuPG keys: 
michael <at> rasmussen <dot> cc 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xD3C9A00E 
mir <at> datanom <dot> net 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE501F51C 
mir <at> miras <dot> org 
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE3E80917 
-------------------------------------------------------------- 
Bugs, pl. n.: 
Small living things that small living boys throw on small 
living girls. 



More information about the pve-devel mailing list