IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24408


Ignore:
Timestamp:
Jun 15, 2009, 12:42:50 PM (17 years ago)
Author:
jhoblitt
Message:

add nebdiskd mountpoint test retyring

Location:
trunk/Nebulous-Server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/Changes

    r24362 r24408  
    2222    - rename Nebulous::Key->soft_volume Nebulous::Key->hard_volume and invert
    2323      the semantics
     24    - add nebdiskd mountpoint test retyring
    2425     
    25260.16
  • trunk/Nebulous-Server/bin/nebdiskd

    r24407 r24408  
    139139                poll_interval   => $poll_interval,
    140140                debug           => $debug,
     141                retry           => 3,
    141142        );
    142143    };
     
    161162    my $poll_interval   = $p{poll_interval} || 60;
    162163    my $debug           = $p{debug} || 0;
     164    my $retry           = $p{retry} || 1;
    163165
    164166    # setup the db on every pass incase the database died on us
     
    179181            # this /SHOULD/ fail if the mount point is handled by the
    180182            # automounter and it fails to mount
    181             eval {
     183            my $tries = 0;
     184            TEST: eval {
     185                $tries++;
    182186                unless (is_mountpoint($mnt)) {
    183187                    $log->warn("$mnt is not a valid mountpoint");
     
    185189            };
    186190            if ($@) {
     191                # try is_mountpoint() again if $retry > 1
     192                if ($tries < $retry) {
     193                    $log->warn("retrying test of $mnt");
     194                    goto TEST;
     195                }
    187196                $log->warn($@);
    188197                $d_query->execute($mnt);
Note: See TracChangeset for help on using the changeset viewer.