Author Topic: mail error after update to 2.2  (Read 2317 times)

JPB

  • Zen Monk
  • **
  • Posts: 77
  • Karma: +1/-1
    • View Profile
mail error after update to 2.2
« on: September 25, 2012, 02:05:01 pm »
Some old users accounts seem to have corrupted entries in the Ldap DB
During the Upgrade from 2.0 -> 2.2 I recieved a few errors and had to re-install Zentyl packages after fixing dependencies and re-run the post-upgrade scripts.  All settings seemed fine but this one below.  This however is a showstopper and I cannot get the mailserver to restart.

I tried to delete the mail account then the whole user but an error pop up about the quota.  As far as I can seethis record never got processed to be updated! or has some corrupted info in.   I presume I can delete this user fromthe Ldap database with [referencial Integrity] but I dont know how

2012/09/25 14:02:14 INFO> Base.pm:228 EBox::Module::Base::save - Restarting service for module: mail
2012/09/25 14:02:17 ERROR> Ldap.pm:699 EBox::Ldap::_errorOnLdap - $VAR1 = {
          'changes' => [
                         'delete',
                         [
                           'mail',
                           'gladwin@ame.local',
                           'mailbox',
                           'ame.local/gladwin/',
                           'userMaildirSize',
                           '0',
                           'mailHomeDirectory',
                           '/var/vmail/',
                           'objectClass',
                           'couriermailaccount',
                           'objectClass',
                           'usereboxmail',
                           'objectClass',
                           'fetchmailUser'
                         ]
                       ]
        };
2012/09/25 14:02:17 ERROR> Ldap.pm:701 EBox::Ldap::_errorOnLdap - Unknown error at EBox::MailUserLdap::delUserAccount attribute 'quota' not allowed
2012/09/25 14:02:17 ERROR> GlobalImpl.pm:612 EBox::GlobalImpl::__ANON__ - Failed to save changes in module mail: Unknown error at EBox::MailUserLdap::delUserAccount attribute 'quota' not allowed
2012/09/25 14:02:17 INFO> Base.pm:228 EBox::Module::Base::save - Restarting service for module: zarafa
2012/09/25 14:02:20 INFO> Base.pm:228 EBox::Module::Base::save - Restarting service for module: logs
2012/09/25 14:02:20 ERROR> GlobalImpl.pm:664 EBox::GlobalImpl::saveAllModules - The following modules failed while saving their changes, their state is unknown: mail
« Last Edit: September 25, 2012, 02:33:00 pm by JPB »

christian

  • Guest
Re: mail error after update to 2.2
« Reply #1 on: September 25, 2012, 02:12:37 pm »
I doubt you receive a lot of help with such post. Sorry  :-[
You should at least explain what you were doing when such error occurred  8)
I mean just log extract without one single comment is a bit harsh isn't it?

jsalamero

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1419
  • Karma: +45/-1
    • View Profile
Re: mail error after update to 2.2
« Reply #2 on: September 25, 2012, 02:39:57 pm »
Seems that the schema that has the definition of the quota attribute is missing. Make sure you add it. Probably this happened because this hackish things you made after your migration error.

JPB

  • Zen Monk
  • **
  • Posts: 77
  • Karma: +1/-1
    • View Profile
Re: mail error after update to 2.2
« Reply #3 on: September 25, 2012, 04:00:36 pm »
Seems that the schema that has the definition of the quota attribute is missing. Make sure you add it. Probably this happened because this hackish things you made after your migration error.

Please Tell me How to Add the schema :P

JPB

  • Zen Monk
  • **
  • Posts: 77
  • Karma: +1/-1
    • View Profile
Re: mail error after update to 2.2
« Reply #4 on: September 25, 2012, 04:28:04 pm »
It seem that I was not the only "Hacker" :)

I basically ran
Code: [Select]
sed -i "s/^value: \\([^'].*\\)/value: '\\1'/g" /var/lib/ebox/redis_dump.yaml
run-parts post-upgrade
and as you can seeit was supposed to be fixed in the migration script but somehow not!

Hi master,

I have just committed a script that fixes your problem, It will also fix any future migrations, you can apply it by downloading and executing this script as root:

http://trac.zentyal.org/export/23575/trunk/extra/migrate-2.0-to-2.2/post-upgrade/005_fix_quotas

thank you for your feedback! We really appreciate it

Best regards
« Last Edit: September 25, 2012, 04:37:20 pm by JPB »

JPB

  • Zen Monk
  • **
  • Posts: 77
  • Karma: +1/-1
    • View Profile
Re: mail error after update to 2.2
« Reply #5 on: September 25, 2012, 06:14:53 pm »
IF I cant Fix this - What would be the appropiate way to re-do the upgrade - ? I am in a fix and hundreds of users sit with no mail incomming. :o

JPB

  • Zen Monk
  • **
  • Posts: 77
  • Karma: +1/-1
    • View Profile
Re: mail error after update to 2.2
« Reply #6 on: September 26, 2012, 07:27:56 am »
As per Support advice I sis as follow

 From a perl script, run these commands:

Code: [Select]
sudo perl

use EBox;
use EBox::Global;
EBox::init();
my $users = EBox::Global->modInstance('users');
$users->performLDAPActions();

After that run the fix_quotas script

    ​http://git.zentyal.org/zentyal.git/blob_plain/refs/heads/2.2:/extra/migrate-2.0-to-2.2/post-upgrade/005_fix_quotas

Now I ended up with even worse scenario and I Seriously need the best route to fix this!   Is the Broken scheme part of my Config Backup or can I backup - rebuild and restore or must I rebuild the server and manually re-create all the users ?

Any case the error now is a duplicate scheme or something:

Code: [Select]
2012/09/25 20:39:40 ERROR> LdapModule?.pm:144 EBox::LdapModule::_loadSchemaDirectory - olcAttributeTypes: Inconsistent duplicate attributeType: "quota"
2012/09/25 20:41:33 ERROR> Ldap.pm:699 EBox::Ldap::_errorOnLdap - $VAR1 = {

    'changes' => [

        'replace', [

            'objectClass', [

                'inetOrgPerson', 'posixAccount', 'passwordHolder', 'sambaSamAccount', 'CourierMailAccount?', 'usereboxmail', 'fetchmailUser', 'systemQuotas'

            ]

        ]

    ]

    };

2012/09/25 20:41:33 ERROR> Ldap.pm:701 EBox::Ldap::_errorOnLdap - Unknown error at main::addSystemQuotas objectClass: value #7 invalid per syntax
2012/09/25 20:42:16 INFO> Service.pm:716 EBox::Module::Service::restartService - Restarting service for module: mail
2012/09/25 20:42:19 ERROR> Ldap.pm:699 EBox::Ldap::_errorOnLdap - $VAR1 = {

    'changes' => [

        'delete', [

            'mail', 'gerrit@…', 'mailbox', 'ameatm.com/gerrit/', 'userMaildirSize', '0', 'mailHomeDirectory', '/var/vmail/', 'objectClass', 'couriermailaccount', 'objectClass', 'usereboxmail', 'objectClass', 'fetchmailUser'

        ]

    ]

    };

2012/09/25 20:42:19 ERROR> Ldap.pm:701 EBox::Ldap::_errorOnLdap - Unknown error at EBox::MailUserLdap::delUserAccount attribute 'quota' not allowed 2012/09/25 20:42:19 ERROR> Service.pm:721 EBox::Module::Service::ANON - Error restarting service: Unknown error at EBox::MailUserLdap::delUserAccount attribute 'quota' not allowed

JPB

  • Zen Monk
  • **
  • Posts: 77
  • Karma: +1/-1
    • View Profile
Re: mail error after update to 2.2
« Reply #7 on: October 01, 2012, 07:34:01 pm »
In the End I Installed a fresh copy of Zentyal 3 and re-configured the users.  I could not trust the saved configuration in any case