IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17716


Ignore:
Timestamp:
May 16, 2008, 10:22:29 AM (18 years ago)
Author:
jhoblitt
Message:

call sync on newly created files from Nebulous::Server::_create_empty_file()
improved error strings in Nebulous::Server::find_instances()

Location:
trunk/Nebulous-Server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/Changes

    r17694 r17716  
    11Revision history for Nebulous
     2
     30.11
     4    - call sync on newly created files from
     5      Nebulous::Server::_create_empty_file()
     6    - improved error strings in Nebulous::Server::find_instances()
    27
    380.10 Wed May 14 17:26:48 HST 2008
  • trunk/Nebulous-Server/lib/Nebulous/Server.pm

    r17694 r17716  
    11# Copyright (c) 2004-2008  Joshua Hoblitt
    22#
    3 # $Id: Server.pm,v 1.71 2008-05-15 03:27:28 jhoblitt Exp $
     3# $Id: Server.pm,v 1.72 2008-05-16 20:22:29 jhoblitt Exp $
    44
    55package Nebulous::Server;
     
    99no warnings qw( uninitialized );
    1010
    11 our $VERSION = '0.10';
     11our $VERSION = '0.11';
    1212
    1313use base qw( Class::Accessor::Fast );
     
    937937            unless ($rows > 0) {
    938938                $query->finish;
    939                 $log->logdie("no instances on storage volume: $vol_name or volume is not available");
     939                $log->logdie("no instances on storage volume or volume is not avaiable for key: $key volume: $vol_name");
    940940            }
    941941        } else {
     
    945945            unless ($rows > 0) {
    946946                $query->finish;
    947                 $log->logdie("no instances available");
     947                $log->logdie("no instances available for key: $key");
    948948            }
    949949        }
     
    12951295        unless (open($fh, '>', $path));
    12961296
     1297    # chmod before fsync() to make sure the changed perms hit the disk too
     1298    die "can not chmod $path: $!"
     1299        unless (chmod 0664, $path);
     1300
     1301    die "can not flush $path: $!"
     1302        unless ($fh->flush);
     1303
     1304    die "can not sync $path: $!"
     1305        unless ($fh->sync);
     1306
    12971307    die "can not close $path: $!"
    12981308        unless (close($fh));
    1299 
    1300     die "can not chmod $path: $!"
    1301         unless (chmod 0664, $path);
    13021309
    13031310    return $path;
Note: See TracChangeset for help on using the changeset viewer.