Changeset 17725
- Timestamp:
- May 16, 2008, 1:37:54 PM (18 years ago)
- Location:
- trunk/Nebulous
- Files:
-
- 2 edited
-
Changes (modified) (1 diff)
-
lib/Nebulous/Client.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Nebulous/Changes
r17720 r17725 2 2 3 3 0.09 4 - change open_create() to attempt to open the instance file 10 times before 5 failing 4 6 - only send fatal errors to the screen 5 7 - send log messages to stderr instead of stdout -
trunk/Nebulous/lib/Nebulous/Client.pm
r17693 r17725 1 1 # Copyright (c) 2004-2008 Joshua Hoblitt 2 2 # 3 # $Id: Client.pm,v 1. 49 2008-05-15 03:26:11jhoblitt Exp $3 # $Id: Client.pm,v 1.50 2008-05-16 23:37:54 jhoblitt Exp $ 4 4 5 5 package Nebulous::Client; … … 171 171 $log->debug( "URI is: $uri" ); 172 172 173 # XXX this is a attempt to work around some sort of nasty NFS bug where 174 # occasionally stat()/open() on a file on an NFS mounted filesystem will 175 # fail EVEN THOU THE FILE ACTUALLY EXISTS. 176 # 177 # The instance file attempting to be opened should always exist as it was 178 # created by the Nebulous server. 173 179 my $fh; 174 eval { 175 $fh = _open_uri( $uri, '+<' ); 176 }; 180 for (my $i = 0; $i < 10; $i++) { 181 eval { 182 $fh = _open_uri( $uri, '+<' ); 183 }; 184 if ($@ =~ qr/file doesn't exist/) { 185 $log->set_err($@); 186 sleep 1; 187 } else { 188 last; 189 } 190 } 177 191 $log->logdie( $@ ) if $@; 178 192
Note:
See TracChangeset
for help on using the changeset viewer.
