Changeset 40991 for branches/eam_branches/ipp-20191011
- Timestamp:
- Oct 28, 2019, 4:10:51 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20191011/Nebulous/lib/Nebulous/Client.pm
r40680 r40991 418 418 419 419 if (defined $locations) { 420 # XXX this is an example of passing 'find_invalid' to find_instances 420 421 my $instances = $self->find_instances($key, undef, 'find them all'); 422 if (not defined $instances) { 423 die "no instances"; 424 } 421 425 if (scalar @$instances == 1) { 422 426 # only one instance nothing to do … … 448 452 } 449 453 } 450 451 454 }; 452 455 if ($@) { … … 663 666 if ($response->fault) { 664 667 $self->set_err($response->faultstring); 668 669 ## invalid object key 670 if ($response->faultstring =~ /is valid object key/) { 671 $log->debug( "leaving" ); 672 die "invalid key $key, fails 'is valid object key' test\n"; 673 } 674 675 ## invalid object key 676 if ($response->faultstring =~ /xattr is in user. namespace/) { 677 $log->debug( "leaving" ); 678 die "invalid xattr key $name : fails 'xattr is in user. namespace' test\n"; 679 } 680 665 681 $log->logdie("unhandled fault - ", $self->err); 666 682 } … … 690 706 if ( $response->fault ) { 691 707 $self->set_err($response->faultstring); 708 709 ## invalid object key 710 if ($response->faultstring =~ /is valid object key/) { 711 $log->debug( "leaving" ); 712 die "invalid key $key, fails 'is valid object key' test\n"; 713 } 714 715 ## invalid xattr key (not in user. namespace) 716 if ($response->faultstring =~ /xattr is in user. namespace/) { 717 $log->debug( "leaving" ); 718 die "xattr $name is invalid : xattr is in user. namespace\n"; 719 } 720 721 ## invalid xattr key 722 if ($response->faultstring =~ /user\..*? does not exist/) { 723 $log->debug( "leaving" ); 724 die "xattr key $name not found : xattr $name does not exist\n"; 725 } 692 726 $log->logdie("unhandled fault - ", $self->err); 693 727 } … … 747 781 if ( $response->fault ) { 748 782 $self->set_err($response->faultstring); 783 784 ## invalid object key 785 if ($response->faultstring =~ /is valid object key/) { 786 $log->debug( "leaving" ); 787 die "invalid key $key, fails 'is valid object key' test\n"; 788 } 789 790 ## invalid xattr key (not in user. namespace) 791 if ($response->faultstring =~ /xattr is in user. namespace/) { 792 $log->debug( "leaving" ); 793 die "xattr $name is invalid : xattr is in user. namespace\n"; 794 } 795 796 ## invalid xattr key 797 if ($response->faultstring =~ /user\..*? does not exist/) { 798 $log->debug( "leaving" ); 799 die "xattr key $name not found : xattr $name does not exist\n"; 800 } 801 749 802 $log->logdie("unhandled fault - ", $self->err); 750 803 } … … 871 924 if ( $response->fault ) { 872 925 $self->set_err($response->faultstring); 926 873 927 # check to see if this failure is because $key doesn't exist 874 928 if ($response->faultstring =~ /is valid object key/) { … … 878 932 # key is valid but no instances are on the specified volume 879 933 if ($response->faultstring =~ /no instances on storage volume/) { 934 $log->debug( "leaving" ); 935 return; 936 } 937 # check to see if this failure is volume is unknown 938 if ($response->faultstring =~ /is not a valid volume name/) { 939 $log->debug( "leaving" ); 940 return; 941 } 942 # key is valid but no instances are on the specified volume 943 if ($response->faultstring =~ /no instances available for key/) { 880 944 $log->debug( "leaving" ); 881 945 return; … … 972 1036 973 1037 1038 ## this is used by PS:IPP:Config nebulous functions 974 1039 sub find 975 1040 { … … 1014 1079 return $path; 1015 1080 } 1016 1017 1081 1018 1082 sub open … … 1127 1191 my $locations; 1128 1192 if ($invalid) { 1193 # XXX this is an example of passing 'find_invalid' to find_instances 1129 1194 $locations = $self->find_instances( $key, 'any', 'find them all'); 1130 1195 }
Note:
See TracChangeset
for help on using the changeset viewer.
