Changeset 39926 for trunk/Nebulous
- Timestamp:
- Jan 6, 2017, 11:30:10 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
Nebulous/bin/neb-repair (modified) (1 diff)
-
Nebulous/lib/Nebulous/Client.pm (modified) (3 diffs)
-
Nebulous/nebclient/src/nebclient.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to
/branches/czw_branch/20160809 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/Nebulous/bin/neb-repair
r39506 r39926 167 167 my $name = shift; # Filename for which to get the scheme 168 168 my ($scheme) = $name =~ /^(path|neb|file):/; # The scheme, e.g., file://, path:// 169 if undef $scheme { $scheme = "none"; }169 # if undef $scheme { $scheme = "none"; } 170 170 # $scheme may be undef if the input doesn't contain one of the above recognised schemes 171 171 unless (defined($scheme)) { $scheme = "none"; } -
trunk/Nebulous/lib/Nebulous/Client.pm
r31850 r39926 18 18 use Params::Validate qw( validate validate_pos SCALAR UNDEF BOOLEAN ); 19 19 #use SOAP::Lite +trace => [qw( debug )]; 20 use Sys::Hostname; 20 21 use SOAP::Lite; 21 22 use Time::HiRes qw( sleep ); … … 858 859 859 860 $log->debug( "entered - @_" ); 861 862 unless(defined($params[0])) { 863 $params[0] = hostname() . ".0"; 864 # print STDERR "Setting host to $params[0]\n"; 865 } 860 866 861 867 my $response = $self->{ 'server' }->find_instances( $key, @params ); … … 980 986 $log->debug( "entered - @_" ); 981 987 988 my $find_volume = hostname() . ".0"; 989 $params[0] = $find_volume; 982 990 my $locations = $self->find_instances( $key, @params ); 983 991 unless (defined $locations) { -
trunk/Nebulous/nebclient/src/nebclient.c
r25000 r39926 529 529 return NULL; 530 530 } 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); 531 547 532 nebObjectInstances *locations = nebFindInstances(server, key, NULL);548 nebObjectInstances *locations = nebFindInstances(server, key, volname); 533 549 if (!locations) { 534 550 if (!strstr(nebErr(server), "no instances on storage volume")) {
Note:
See TracChangeset
for help on using the changeset viewer.
