IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 41041


Ignore:
Timestamp:
Nov 5, 2019, 7:40:49 AM (7 years ago)
Author:
eugene
Message:

find_instances_for_cull should retry with the "any" node using find_instances_for_cull (not raw find_instances)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20191011/Nebulous-Server/lib/Nebulous/Server.pm

    r41014 r41041  
    1717use Cache::Memcached;
    1818use DBI;
    19 ## for gentoo: use Digest::SHA1 qw( sha1_hex );
    20 use Digest::SHA qw( sha1_hex );
     19
     20## for gentoo:
     21use Digest::SHA1 qw( sha1_hex );
     22
     23## for ubuntu:
     24# use Digest::SHA qw( sha1_hex );
     25
    2126use Fcntl ':mode';
    2227use File::Basename qw( basename dirname fileparse );
     
    20912096
    20922097    ## XXX this method is missing the alias deference section (see find_instances)
     2098    ## if aliases are intended to be compute nodes in the same cabinet / site as
     2099    ## the storage nodes, then this is not needed.
    20932100
    20942101    # the key's volume can't be validiated on input for this method so we have
     
    21132120            unless ($rows > 0) {
    21142121                $query->finish;
    2115                 die("no instances on storage volume or volume is not avaiable for key: $key volume: $vol_name");
     2122                die("no instances on storage volume or volume is not available for key: $key volume: $vol_name");
    21162123            }
    21172124        } else {
     
    21362143        $db->rollback;
    21372144        # handle soft volumes
    2138         if (defined $vol_name and not defined $key->hard_volume) {
     2145        # we need to call find_intances_for_cull here so the returned structure
     2146        # is the same (find_instances just returns an array of strings)
     2147        if (defined $vol_name and not defined $key->hard_volume and ($vol_name ne "any")) {
    21392148            $log->debug("retrying with 'any' volume");
    2140             return $self->find_instances($key->path, 'any');
     2149            return $self->find_instances_for_cull($key->path, 'any');
    21412150        }
    21422151        $log->logdie("database error: $@");
Note: See TracChangeset for help on using the changeset viewer.