[pve-devel] iscsi, some hang : pvestatd always do iscsi_session_rescan

Alexandre DERUMIER aderumier at odiso.com
Fri Apr 27 08:18:36 CEST 2012


I check more deeply,
the main problem seem to be that iscsiadm have a long timeout.
(In fact the iscsi timeout, so it can be huge in some config with iscsi failover, or if a path fail).

Maybe can we implemented some kind of "kill process iscsiadm" if it take too much time ?


I see that "timelimit" package exist in debian,
"timelimit  /usr/bin/iscsiadm/ ...."

maybe this can add some protections to iscsiadm command?


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

De: "Alexandre DERUMIER" <aderumier at odiso.com> 
À: pve-devel at pve.proxmox.com 
Envoyé: Jeudi 26 Avril 2012 18:39:35 
Objet: Re: [pve-devel] iscsi, some hang : pvestatd always do iscsi_session_rescan 

also volume stats for iscsi volume are always zero, so maybe we can bypass it in pvestatd ? 


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

De: "Alexandre DERUMIER" <aderumier at odiso.com> 
À: pve-devel at pve.proxmox.com 
Envoyé: Jeudi 26 Avril 2012 16:57:55 
Objet: [pve-devel] iscsi, some hang : pvestatd always do iscsi_session_rescan 

Hi Dietmar, 
I have some problem today with pvestatd. 

my iscsi san had some read queues (no so much), 
but proxmox interface was hanging,blocking. 

So I see that the problem was pvestatd 



in update_storage_status() 
-> my $info = PVE::Storage::storage_info($cfg); 

storage_info() 
->eval { activate_storage_list ($cfg, $slist, $session); }; 

activate_storage_list() 
-> __activate_storage_full 


__activate_storage_full() 
-> 

} elsif ($type eq 'iscsi') { 

return if !check_iscsi_support(1); 

$session->{iscsi_sessions} = iscsi_session_list() 
if !$session->{iscsi_sessions}; 

my $iscsi_sess = $session->{iscsi_sessions}->{$scfg->{target}}; 
if (!defined ($iscsi_sess)) { 
eval { iscsi_login ($scfg->{target}, $scfg->{portal}); }; 
warn $@ if $@; 
} else { 
# make sure we get all devices 
iscsi_session_rescan ($iscsi_sess); 
} 



then I can see a 

/usr/bin/iscsiadm --mode session -r 1 -R 
then 
/usr/bin/iscsiadm --mode session -r 2 -R 

running each minute. 

As my san was a little slow, iscsiadm was hanging (40sec),normal time is around 6sec. 


Do you know why it's always rescan the iscsi sessions ? 


_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



-- 

-- 




Alexandre D erumier 
Ingénieur Système 
Fixe : 03 20 68 88 90 
Fax : 03 20 68 90 81 
45 Bvd du Général Leclerc 59100 Roubaix - France 
12 rue Marivaux 75002 Paris - France 

_______________________________________________ 
pve-devel mailing list 
pve-devel at pve.proxmox.com 
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel 



-- 

-- 




	Alexandre D erumier 
Ingénieur Système 
Fixe : 03 20 68 88 90 
Fax : 03 20 68 90 81 
45 Bvd du Général Leclerc 59100 Roubaix - France 
12 rue Marivaux 75002 Paris - France 
	



More information about the pve-devel mailing list