- Timestamp:
- Aug 11, 2009, 3:54:00 PM (17 years ago)
- Location:
- branches/czw_branch/cleanup
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Nebulous-Server/lib/Nebulous/Server.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/cleanup
- Property svn:mergeinfo changed
/trunk merged: 24940-24950,24953-24971,24973-24977,24986-24989,24993-25017,25019,25021,25023-25024,25026,25029-25031,25036-25049
- Property svn:mergeinfo changed
-
branches/czw_branch/cleanup/Nebulous-Server/lib/Nebulous/Server.pm
r24951 r25051 696 696 $log->debug("entered - @_"); 697 697 698 my ($key, $ vol_name) = validate_pos(@_,698 my ($key, $dest_vol_name) = validate_pos(@_, 699 699 { 700 700 type => SCALAR, … … 726 726 # instance on it. If all avilable volume already have an instance on them 727 727 # then we should throw an error 728 729 # vol_name overrides the key implied volume 730 eval { 731 $key = parse_neb_key($key, $vol_name); 728 # volume names implied as part of the key are *IGNORED* as the source and 729 # *SHOULD NOT* be used as the destination either 730 731 eval { 732 $key = parse_neb_key($key); 732 733 }; 733 734 $log->logdie("$@") if $@; 734 $vol_name = $key->volume;735 735 736 736 my $db = $self->db($key); 737 737 738 if (defined $vol_name 738 # puke if the source volume is bogus, we may want to actually use this as 739 # the instance to be copied later 740 if (defined $key->volume 739 741 and not $self->_is_valid_volume_name($key, $key->volume)) { 740 742 unless ($key->hard_volume) { 741 $log->warn( "$vol_name is not a known volume name" ); 742 $vol_name = undef; 743 $log->warn($key->volume . " not a known volume name"); 743 744 } else { 744 $log->logdie("$vol_name is not a valid volume name"); 745 } 745 $log->logdie("$key is not a valid volume name"); 746 } 747 } 748 # puke if the source volume is bogus, we may want to actually use this as 749 # the instance to be copied later 750 if (defined $dest_vol_name 751 and not $self->_is_valid_volume_name($key, $dest_vol_name)) { 752 $log->logdie($key->volume . " is not a valid volume name"); 746 753 } 747 754 748 755 my ($vol_id, $vol_host, $vol_path, $vol_xattr); 749 if (defined $ vol_name) {756 if (defined $dest_vol_name) { 750 757 ($vol_id, $vol_host, $vol_path, $vol_xattr) 751 = $self->_get_storage_volume($key, $ vol_name);758 = $self->_get_storage_volume($key, $dest_vol_name); 752 759 } else { 753 760 ($vol_id, $vol_host, $vol_path, $vol_xattr) … … 810 817 $db->rollback; 811 818 # handle soft volumes 812 if (defined $ vol_name and not defined $key->hard_volume) {819 if (defined $dest_vol_name and not defined $key->hard_volume) { 813 820 $log->debug("retrying with 'any' volume"); 814 821 return $self->replicate_object($key->path, 'any');
Note:
See TracChangeset
for help on using the changeset viewer.
