Author Topic: [SOLVED] Migration error while upgrading packages to version 2.2  (Read 5825 times)

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #15 on: December 04, 2011, 03:40:30 pm »
How come this happens to some servers while other servers migrate just fine? Is it with a certain module that is installed that causes keeping ebox processes active?

What command(s) (when and where) is needed to bypass this?
« Last Edit: December 04, 2011, 03:45:29 pm by robb »

exekias

  • Zentyal Staff
  • Zen Warrior
  • *****
  • Posts: 196
  • Karma: +21/-0
    • View Profile
    • The Big Bug Theory
Re: Migration error while upgrading packages to version 2.2
« Reply #16 on: December 04, 2011, 04:18:51 pm »
Probably running:
Code: [Select]
killall -s 9 -u ebox
After modules stop done by the migration script should be enough.

You can try to search for the running process with:

Code: [Select]
ps aux -u ebox
Please run it before and after killing remaining ebox processes, so we can get a list.

Best regards

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #17 on: December 04, 2011, 04:49:55 pm »
After the script stopped (with the same errormessages as before) I ran the kill command.
After that I ran the following commands to restart the post upgrade scripts:
sed -i "s/^value: \\([^'].*\\)/value: '\\1'/g" /var/lib/ebox/redis_dump.yaml
run-parts post-upgrade
(see http://forum.zentyal.org/index.php/topic,8263.msg34320.html#msg34320)

The restarted script ran into the problem that there were no sufficient rights on /var/log/zentyal
What is the right setting for this directory? I VERY dirty chmodded this to 777 and then got the following output:

Code: [Select]
root@vps1744:/tmp/zentyal-migrate-2.0-to-2.2# sed -i "s/^value: \\([^'].*\\)/value: '\\1'/g" /var/lib/ebox/redis_dump.yaml
root@vps1744:/tmp/zentyal-migrate-2.0-to-2.2# run-parts post-upgrade
Copying old ebox dirs to zentyal...
Importing old configuration...
run-parts: post-upgrade/002_import_redis exited with return code 9
Upgrading objects to new schema...
Upgrading ldap attributes (quotas from mail and users)...
No such daemon: ebox.slapdrun-parts: post-upgrade/004_upgrade_ldap exited with return code 2
Adding quota objectclasses...
No such daemon: ebox.slapdrun-parts: post-upgrade/005_fix_quotas exited with return code 2
Creating new core tables...
Importing old quota config
root command repquota / failed.
Error output: repquota: Mountpoint (or device) / not found or has no quota enabled.
 repquota: Not all specified mountpoints are using quota.

Command output: .
Exit value: 1run-parts: post-upgrade/007_import_quotas exited with return code 1
Resetting data_version for all modules...
Can't call method "valueByName" on an undefined value at /usr/share/perl5/EBox/WebServer.pm line 340.
run-parts: post-upgrade/020_reset_migrations exited with return code 25
update-rc.d: warning: ebox start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: ebox stop runlevel arguments (none) do not match LSB Default-Stop values (0 1 6)
 Disabling system startup links for /etc/init.d/ebox ...
 Removing any system startup links for /etc/init.d/ebox ...
   /etc/rc0.d/K20ebox
   /etc/rc1.d/K20ebox
   /etc/rc2.d/K80ebox
   /etc/rc3.d/K80ebox
   /etc/rc4.d/K80ebox
   /etc/rc5.d/K80ebox
   /etc/rc6.d/K20ebox
 Adding system startup for /etc/init.d/ebox ...
   /etc/rc0.d/K20ebox -> ../init.d/ebox
   /etc/rc1.d/K20ebox -> ../init.d/ebox
   /etc/rc6.d/K20ebox -> ../init.d/ebox
   /etc/rc2.d/K80ebox -> ../init.d/ebox
   /etc/rc3.d/K80ebox -> ../init.d/ebox
   /etc/rc4.d/K80ebox -> ../init.d/ebox
   /etc/rc5.d/K80ebox -> ../init.d/ebox
Migrating default values in configuration files...
Updating home for zentyal users
usermod: no changes
Moving apache ssl files to new name

Any suggestions?

/edit: can I put those commands somewhere in the script so it gets executed automaticly or just do it manually for now?
« Last Edit: December 04, 2011, 05:08:47 pm by robb »

gandalfmagic

  • Zen Apprentice
  • *
  • Posts: 29
  • Karma: +1/-0
    • View Profile
Re: Migration error while upgrading packages to version 2.2
« Reply #18 on: December 04, 2011, 05:10:48 pm »

I also had this problem. I think the command run-parts won't work nicely when the zentyal debs are half-installed.

To resolve this problem I've mantained the migration script suspended in "press a key to retry" state, then I logged in with another ssh console and:
  • modified the /etc/passwd manually to change ebox user home to /var/lib/zentyal/
  • changed the /var/lib/dpkg/info/zentyal-core.postinst script by commenting out the 'usermod --home ...' command line
Then I proceeded with the original migration script session.

This is, obviously, a very dirty workaround. :)

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #19 on: December 04, 2011, 05:52:01 pm »
I'd prefer a somewhat cleaner method... Maybe a modification on the migrationscript is in order.

@zentyal devs: need any further debug info?

exekias

  • Zentyal Staff
  • Zen Warrior
  • *****
  • Posts: 196
  • Karma: +21/-0
    • View Profile
    • The Big Bug Theory
Re: Migration error while upgrading packages to version 2.2
« Reply #20 on: December 05, 2011, 12:50:31 am »
Hi robb,

First of all, can you download the migration script again? We made some changes to avoid problems with that redis dump.

Also, this diff adds some debugging and also kills all ebox processes:

Code: [Select]
--- migrate.sh (revision 23745)
+++ migrate.sh (working copy)
@@ -83,6 +83,9 @@
     stop ebox.$i || true
 done
 
+ps aux -u ebox > ps_output.log
+killall -s 9 -u ebox
+
 # this cron stuff is not deleted after purge, so we get rid of it now
 rm -f /etc/cron.d/ebox-*

Please, post ps_output.log if you try this :)

Best regards

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #21 on: December 05, 2011, 12:53:51 am »
Will do, but since it is 1.00 AM now, you don't mind I postpone that till tomorrow, do you?...  ;D

exekias

  • Zentyal Staff
  • Zen Warrior
  • *****
  • Posts: 196
  • Karma: +21/-0
    • View Profile
    • The Big Bug Theory
Re: Migration error while upgrading packages to version 2.2
« Reply #22 on: December 05, 2011, 10:54:25 am »
Thanks robb, if I can help during tests just ping me via IRC :)

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #23 on: December 05, 2011, 04:32:43 pm »
Did I have to add that div to the script or was it already added? Where do I find the ps_output.log?

Anyway, I redownloaded the migrationscript. Unpacked it in /tmp and ran ./migrate.sh

Again I had the errormessage that ebox was still logged in. With the script still on halt I opened a 2nd console and killed all ebox services: killall -s 9 -u ebox
After that I hit enter to resume the script and the migration finished in a normal way.

I am going to have a look at the management page and if zarafa starts up as before. Anyway, all looks ok for now. I will post back if something strange happens.

Is there any reason why not all ebox services were killed by the script? Is this because of a certain module that I use?


/edit: All went well. I have access to zarafa and webinterface. Also cloudservice is configured correct and zentyal.me dyndns account was created successfully, allthough I don't need it for this server since it has a static IP address.

Thanks for the support. I still have 3 servers to go so maybe I have to get back on this.. :)

//edit: 2nd server went flawless.... complete migration in less than 20 minutes... ^^

///edit: attached logfile
« Last Edit: December 05, 2011, 09:10:11 pm by robb »

c4rdinal

  • Zen Samurai
  • ****
  • Posts: 341
  • Karma: +4/-0
    • View Profile
Re: Migration error while upgrading packages to version 2.2
« Reply #24 on: December 06, 2011, 11:35:41 am »
Robb,

I'm curious on how the Migration for your 3rd Server go... Does the Migration went well also?

I'm asking because I'm planning to perform an upgrade from 2.0 to 2.2.

Thanks

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #25 on: December 06, 2011, 11:49:58 am »
3rd server is planned on Friday. This is not a VPS but a physical server. I will let you know as soon I have some results. The 4th is also a physical server. And that will probably be migrated somewhere next week.

exekias

  • Zentyal Staff
  • Zen Warrior
  • *****
  • Posts: 196
  • Karma: +21/-0
    • View Profile
    • The Big Bug Theory
Re: Migration error while upgrading packages to version 2.2
« Reply #26 on: December 06, 2011, 01:17:21 pm »
Hi all,

Thank you very much robb, you helped to find the problem, and here is the fix:

https://trac.zentyal.org/changeset/23749

We have already released it, so you only need to download the tool again in order to have it included.

Thank you very much for your feedback!

Best regards

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #27 on: December 07, 2011, 08:24:18 pm »
I migrated a physical server today with the updated migrationscript. It went flawless! Thnx Exekias for the support. Tomorrow the 4th server... :)

robb

  • Guest
Re: Migration error while upgrading packages to version 2.2
« Reply #28 on: December 08, 2011, 02:30:14 pm »
Just migrated the 4th server. Within 30 minutes it was up and running again. Great work on the migrationscript!

exekias

  • Zentyal Staff
  • Zen Warrior
  • *****
  • Posts: 196
  • Karma: +21/-0
    • View Profile
    • The Big Bug Theory
Re: Migration error while upgrading packages to version 2.2
« Reply #29 on: December 08, 2011, 06:08:15 pm »
Great robb!

Thank you again for your effort and feedback!

Best regards