IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39926 for trunk/Nebulous


Ignore:
Timestamp:
Jan 6, 2017, 11:30:10 AM (10 years ago)
Author:
eugene
Message:

merging changes from czw dev branch (compare with r39924)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/Nebulous/bin/neb-repair

    r39506 r39926  
    167167    my $name = shift;                # Filename for which to get the scheme
    168168    my ($scheme) = $name =~ /^(path|neb|file):/; # The scheme, e.g., file://, path://
    169     if undef $scheme { $scheme = "none"; }
     169#    if undef $scheme { $scheme = "none"; }
    170170    # $scheme may be undef if the input doesn't contain one of the above recognised schemes
    171171    unless (defined($scheme)) { $scheme = "none"; }
  • trunk/Nebulous/lib/Nebulous/Client.pm

    r31850 r39926  
    1818use Params::Validate qw( validate validate_pos SCALAR UNDEF BOOLEAN );
    1919#use SOAP::Lite +trace => [qw( debug )];
     20use Sys::Hostname;
    2021use SOAP::Lite;
    2122use Time::HiRes qw( sleep );
     
    858859
    859860    $log->debug( "entered - @_" );
     861   
     862    unless(defined($params[0])) {
     863        $params[0] = hostname() . ".0";
     864#       print STDERR "Setting host to $params[0]\n";
     865    }
    860866
    861867    my $response = $self->{ 'server' }->find_instances( $key, @params );
     
    980986    $log->debug( "entered - @_" );
    981987
     988    my $find_volume = hostname() . ".0";
     989    $params[0] = $find_volume;
    982990    my $locations = $self->find_instances( $key, @params );
    983991    unless (defined $locations) {
  • trunk/Nebulous/nebclient/src/nebclient.c

    r25000 r39926  
    529529        return NULL;
    530530    }
     531
     532    // Construct a dummy volume name to allow nebulous to find the
     533    // closest instance available.
     534    char hostname[256];
     535    char volname[260];
     536
     537    int v;
     538
     539    v = gethostname(hostname,256);
     540    //    fprintf(stderr, "%s %d\n", hostname, v);
     541/*     printf("%s %d\n",hostname,v); */
     542    if (v) {
     543      nebSetErr(server, "failed to construct hostname");
     544      return NULL;
     545    }
     546    snprintf(volname,260, "%s.0", hostname);
    531547   
    532     nebObjectInstances *locations = nebFindInstances(server, key, NULL);
     548    nebObjectInstances *locations = nebFindInstances(server, key, volname);
    533549    if (!locations) {
    534550        if (!strstr(nebErr(server), "no instances on storage volume")) {
Note: See TracChangeset for help on using the changeset viewer.