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

Michael Rasmussen mir at datanom.net
Sat Jun 22 12:45:06 CEST 2013


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ZFSPlugin.pm
Type: application/x-perl
Size: 14396 bytes
Desc: not available
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20130622/dc2ce640/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.proxmox.com/pipermail/pve-devel/attachments/20130622/dc2ce640/attachment.sig>


More information about the pve-devel mailing list