mirror of
https://github.com/schoebel/mars
synced 2025-01-15 11:30:43 +00:00
Merge branch 'mars0.1.y' into mars0.1a.y
This commit is contained in:
commit
22a04ee942
12
ChangeLog
12
ChangeLog
@ -237,6 +237,18 @@ mars0.1abeta0
|
||||
-----------------------------------
|
||||
Changelog for series 0.1:
|
||||
|
||||
mars0.1stable50
|
||||
* Major usability improvement (backport from 0.1a):
|
||||
marsadm shows number of replicas of each resource, out of total number
|
||||
of cluster members. Example: [2/4]
|
||||
* Minor fix: automatically cleanup internal backups produced by the new
|
||||
merge-cluster / split-cluster after 1 week.
|
||||
* Minor fix: also cleanup some new symlink types replicated through
|
||||
the network when running asymmetric clusters with mixed branches
|
||||
0.1 and 0.1a.
|
||||
* Minor annoyance: silence split-cluster error message when no
|
||||
resources are present.
|
||||
|
||||
mars0.1stable49
|
||||
* Backports of new marsadm commands merge-cluster and split-cluster.
|
||||
The new functionality is needed for background migration of resources.
|
||||
|
@ -2207,6 +2207,7 @@ sub split_cluster {
|
||||
foreach my $peer (@peers) {
|
||||
print "--- peer $peer\n";
|
||||
my $cmd = "rm -f $mars/todo-global/delete* $mars/actual-*/msg-*connection-*; ";
|
||||
$cmd .= "shopt -s nullglob; ";
|
||||
$cmd .= "for i in $mars/resource-*; do if ! [[ -e \$i/data-$peer ]] && ! [[ -e \$i/replay-$peer ]]; then rm -rf $backup_dir/\${i##*/}; mv \$i $backup_dir/; fi; done; ";
|
||||
$cmd .= "mkdir -p $mars/ips; ";
|
||||
my $sub_list = "{ for i in \$(ls $mars/resource-*/data-$peer | cut -d/ -f1-3 | sort -u); do (cd \$i; ls data-*); done; echo x-$peer; }";
|
||||
@ -2444,8 +2445,16 @@ sub delete_file_cmd {
|
||||
|
||||
sub logdelete_res {
|
||||
my ($cmd, $res) = @_;
|
||||
lprint "removing left-over .deleted symlinks...\n" if $verbose;
|
||||
lprint "removing left-over data and symlinks...\n" if $verbose;
|
||||
my $start_time = mars_time();
|
||||
# keep internal backups for 1 week
|
||||
my $keep_backups = 24 * 7;
|
||||
foreach my $leftlink (glob("$mars/backup*")) {
|
||||
my $stamp = get_link_stamp($leftlink);
|
||||
next unless $stamp + 3600 * $keep_backups < $start_time;
|
||||
lprint " unlink '$leftlink'\n" if $verbose;
|
||||
system("rm -rf $leftlink");
|
||||
}
|
||||
foreach my $leftlink (glob("$mars/{,resource-$res/}{,*/}{.deleted,delete,work}-*")) {
|
||||
my $stamp = get_link_stamp($leftlink);
|
||||
next unless $stamp + 3600 * 24 < $start_time;
|
||||
|
Loading…
Reference in New Issue
Block a user