Changeset 26875
- Timestamp:
- Feb 10, 2010, 4:17:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/Nebulous-Server/bin/nebdiskd
r26292 r26875 67 67 $retry ||= $c->get_retry || 1; 68 68 69 # stuff to controll failures. 70 my %host_failure_counts = (); 71 my $failure_limit = 5; 72 73 74 69 75 #my $mounts = $c->get_mounts; 70 76 my $poll_interval = $c->get_poll_interval || 5; … … 133 139 $SIG{INT} = $SIG{TERM}; 134 140 $SIG{HUP} = sub { $c = read_rcfile($rcfile) }; 141 135 142 136 143 while (1) { … … 202 209 my $tries = 0; 203 210 my $valid_mountpoint = 1; 211 unless (exists($host_failure_counts{$mountpoint})) { 212 $host_failure_counts{$mountpoint} = 0; 213 } 204 214 TEST: eval { 205 215 $tries++; … … 215 225 goto TEST; 216 226 } 217 $log->warn("Removing $mountpoint from the mountedvol table ($tries > $retry)"); 218 # $log->warn($@); 219 220 $d_query->execute($mountpoint); 227 $host_failure_counts{$mountpoint}++; 228 229 if ($host_failure_counts{$mountpoint} > $failure_limit) { 230 $log->warn("Removing $mountpoint from the mountedvol table ($host_failure_counts{$mountpoint} > $failure_limit)"); 231 $d_query->execute($mountpoint); 232 } 233 else { 234 $log->warn("Mountpoint $mountpoint has had $host_failure_counts{$mountpoint} failures. Will remove after $failure_limit"); 235 } 221 236 next; 222 237 } 238 if ($host_failure_counts{$mountpoint} != 0) { 239 $log->warn("Mountpoint $mountpoint failures cleared ($host_failure_counts{$mountpoint})"); 240 $host_failure_counts{$mountpoint} = 0; 241 } 223 242 224 243 # fetch stats on the mounted device. this has to be done AFTER
Note:
See TracChangeset
for help on using the changeset viewer.
