[pve-devel] [PATCH] volume_size_info: check that storage is enabled (and available)
Alexandre DERUMIER
aderumier at odiso.com
Wed Aug 1 01:48:37 CEST 2012
This is mainly for nfs.
If storage is down, I see hanging "qemu-img info" process.
Do you think that the ping will slowdown too much the stats ?
Maybe can we implement some kind of status for storage (online,offline,desactivate).
And update this status when pvestatd check it ?
----- Mail original -----
De: "Dietmar Maurer" <dietmar at proxmox.com>
À: "Alexandre Derumier" <aderumier at odiso.com>, pve-devel at pve.proxmox.com
Envoyé: Mardi 31 Juillet 2012 11:09:58
Objet: RE: [pve-devel] [PATCH] volume_size_info: check that storage is enabled (and available)
I am not sure if we should add that check here (slow).
Normally, we already tested that the storage is available when we call volume_size_info?
> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Alexandre Derumier
> Sent: Dienstag, 31. Juli 2012 10:02
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH] volume_size_info: check that storage is enabled
> (and available)
>
> We need to check if storage is available, as for example, nfs can have infinite
> timeout and qemu-img info can hang in interruptible state.
>
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
> PVE/Storage.pm | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 60cc53d..3b38734
> 100755
> --- a/PVE/Storage.pm
> +++ b/PVE/Storage.pm
> @@ -118,6 +118,7 @@ sub volume_size_info {
> my ($cfg, $volid, $timeout) = @_;
>
> my ($storeid, $volname) = parse_volume_id($volid);
> + return undef if !storage_check_enabled($cfg, $storeid, undef, 1);
>
> my $scfg = storage_config($cfg, $storeid);
> my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
> --
> 1.7.2.5
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
--
--
Alexandre D e rumier
Ingénieur Systèmes et Réseaux
Fixe : 03 20 68 88 85
Fax : 03 20 68 90 88
45 Bvd du Général Leclerc 59100 Roubaix
12 rue Marivaux 75002 Paris
More information about the pve-devel
mailing list