Index: /trunk/Nebulous/Changes
===================================================================
--- /trunk/Nebulous/Changes	(revision 17724)
+++ /trunk/Nebulous/Changes	(revision 17725)
@@ -2,4 +2,6 @@
 
 0.09
+    - change open_create() to attempt to open the instance file 10 times before
+      failing
     - only send fatal errors to the screen
     - send log messages to stderr instead of stdout
Index: /trunk/Nebulous/lib/Nebulous/Client.pm
===================================================================
--- /trunk/Nebulous/lib/Nebulous/Client.pm	(revision 17724)
+++ /trunk/Nebulous/lib/Nebulous/Client.pm	(revision 17725)
@@ -1,5 +1,5 @@
 # Copyright (c) 2004-2008  Joshua Hoblitt
 #
-# $Id: Client.pm,v 1.49 2008-05-15 03:26:11 jhoblitt Exp $
+# $Id: Client.pm,v 1.50 2008-05-16 23:37:54 jhoblitt Exp $
 
 package Nebulous::Client;
@@ -171,8 +171,22 @@
     $log->debug( "URI is: $uri" );
 
+    # XXX this is a attempt to work around some sort of nasty NFS bug where
+    # occasionally stat()/open() on a file on an NFS mounted filesystem will
+    # fail EVEN THOU THE FILE ACTUALLY EXISTS.
+    #
+    #  The instance file attempting to be opened should always exist as it was
+    #  created by the Nebulous server.
     my $fh;
-    eval {
-        $fh = _open_uri( $uri, '+<' );
-    };
+    for (my $i = 0; $i < 10; $i++) {
+        eval {
+            $fh = _open_uri( $uri, '+<' );
+        };
+        if ($@ =~ qr/file doesn't exist/) {
+            $log->set_err($@);
+            sleep 1;
+        } else {
+            last;
+        }
+    }
     $log->logdie( $@ ) if $@;
 
