[BlueOnyx:27280] Re: Easy Migrate errors : Exceptions not handled ...kindof

Michael Stauber mstauber at blueonyx.it
Fri Oct 11 12:41:11 -05 2024


Hi Rodrigo,

> We are migrating from a 5209 to a 5211, running easymigrate on the new
> server,
> 
> And during the migration a user fails with disk used as "empty"
> 
> Log output of failure:
> 0:handlers/base/disk/userusage.pl: SET  456 . Disk used = ""
> Oct  5 19:07:53 web cced(smd)[105707]: client
> 0:handlers/base/disk/userusage.pl: SET 456.Disk failed (-5)

That's weird.

> However we noticed the easy-migrate.pl  has these lines
> if ($key eq 'Disk') {
>                      if ($User_NameSpace->{'used'} eq "") {
>                          $User_NameSpace->{'used'} = '0';
>                      }
>                      if ($User_NameSpace->{'over_quota'} eq "") {
>                          $User_NameSpace->{'over_quota'} = '0';
>                      }
>                  }
> 
> But they are not changing  a "" to a '0'

 From the looks of it $User_NameSpace->{'used'} wasn't just empty in 
your case. The key 'used' probably wasn't even set in first place. Which 
is kinda unusual.

I looked at the code in the broader context and I think that should fix it:

if ($key eq 'Disk') {
     $User_NameSpace->{'used'} //= '0';
     $User_NameSpace->{'over_quota'} //= '0';
}

if (($key eq 'Sites') && (!defined($User_NameSpace->{'used'}) || 
$User_NameSpace->{'used'} eq "")) {
     $User_NameSpace->{'used'} = '0';
}

See: https://devel.blueonyx.it/trac/changeset/5418/

I just published an updated Easy-Migrate to the BlueOnyx 5211R Testing 
YUM repository.

To install it do this:

dnf config-manager --set-enabled BlueOnyx-5211R-Testing
dnf clean all
dnf update
dnf config-manager --set-disabled BlueOnyx-5211R-Testing

There is (currently) nothing else in the Testing repository but this 
newer Easy-Migrate.

Let me know if that fixes your issue. If so, I'll move it to the normal 
repository.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list