Changeset 34928
- Timestamp:
- Jan 15, 2013, 10:58:17 AM (14 years ago)
- File:
-
- 1 edited
-
tags/ipp-20121218/Nebulous-Server/bin/nebdiskd (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20121218/Nebulous-Server/bin/nebdiskd
r34914 r34928 20 20 21 21 my ( 22 $debug, 23 $db, 24 $dbhost, 25 $dbuser, 26 $dbpass, 27 $pidfile, 28 $stop, 29 $restart, 22 $debug, 23 $db, 24 $dbhost, 25 $dbuser, 26 $dbpass, 27 $pidfile, 28 $stop, 29 $restart, 30 30 $verbose, 31 31 $user, … … 142 142 $SIG{TERM} = sub { unlink_pid_file($pidfile); exit(); }; 143 143 $SIG{INT} = $SIG{TERM}; 144 $SIG{HUP} = sub { $c = read_rcfile($rcfile) }; 144 $SIG{HUP} = sub { $c = read_rcfile($rcfile) }; 145 145 146 146 my $date = localtime(); … … 205 205 $query->finish; 206 206 } 207 207 208 208 # determine valid mountpoints 209 209 foreach my $mnt (@$mounts) { 210 210 my $mountpoint = $mnt->{'mountpoint'}; 211 my $hostname = $mnt->{'host'}; 212 my $valid_mountpoint = 1; 211 my $alt_mountpoint = $mountpoint; 212 $alt_mountpoint =~ s/data/export/; 213 my $hostname = $mnt->{'host'}; 214 my $valid_mountpoint = 1; 213 215 214 216 # fetch stats on the device using ssh and df 215 my $dev_info = df_through_ssh($hostname, $ mountpoint, 1024);217 my $dev_info = df_through_ssh($hostname, $alt_mountpoint, 1024); 216 218 unless (defined $dev_info) { 217 $valid_mountpoint = 0;218 $log->error("can't find device info for $mountpoint ");219 $d_query->execute($mountpoint);219 $valid_mountpoint = 0; 220 $log->error("can't find device info for $mountpoint / $alt_mountpoint"); 221 $d_query->execute($mountpoint); 220 222 next; 221 223 } … … 277 279 # $dbh->commit; 278 280 }; 279 if ($@) { 281 if ($@) { 280 282 # $dbh->rollback; 281 283 $log->logdie($@); … … 361 363 $log->debug("Received from ssh = [$df_data]"); 362 364 unless ($df_data) { 363 return undef;365 return undef; 364 366 } 365 367 my @data = split(/:/, $df_data); … … 483 485 =item * C<NEB_PASS> 484 486 485 Equivalent to --dbpass|-p 487 Equivalent to --dbpass|-p 486 488 487 489 =back
Note:
See TracChangeset
for help on using the changeset viewer.
