Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Installation

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-29-2007, 08:40 AM
Junior Member
 
Posts: 5
Angry 4.5 to 5.0 OSS upgrade on Ubuntu kills all LDAP data

Hi,

I have tried this 3 times in a test server running in VMware and whatever i tried, the upgrade to 5.0 always killed all data in the LDAP tree.

Looking through the install/upgrade script:
  1. the LDAP tree is dumped into an LDIF (ldap.bak)
  2. then the openldap-data directory is moved to openldap-data.BAK
  3. the package installation then creates a new openldat-data directory.

But i can't find anything that restores the old data into the new ldap directory.

There is this telling snipped in the log output (hostname edited):
Code:
Restoring existing configuration file from /opt/zimbra/.saveconfig/config.save...done
Operations logged to /tmp/zmsetup.12292007-170725.log
Starting ldap...done.
ERROR: account.NO_SUCH_SERVER (no such server: zimbra.test)
ERROR: account.NO_SUCH_SERVER (no such server: zimbra.test)
Setting defaults...ERROR: account.NO_SUCH_SERVER (no such server: zimbra.test)
This happens because the LDAP tree is empty at this point and i guess it should not be.

The installation later then add some ham and spam users. And those are the only ones present in the LDAP after the upgrade.openldap-data.BAK

BTW: moving openldap-data to openldap-data.BAK is another problem. The existens of openldap-data.BAK is not tested before and the install script will happily move openldap-data as a subdirectory into a exisiting openldap-data.BAK directory.

Andreas
Reply With Quote
  #2 (permalink)  
Old 12-29-2007, 09:14 AM
Former Zimbran
 
Posts: 5,606
Default

The only way that would happen is if the installer was repeatedly run after an installation failure.

Once it fails the first time, the localconfig.xml is blank. When you run the second time, it sees the blank localconfig and thinks it's a new install.

Please provide your /opt/zimbra/.install_history and /tmp/zmsetup.log and ./tmp/install.log.xxxx
Reply With Quote
  #3 (permalink)  
Old 12-29-2007, 09:34 AM
Junior Member
 
Posts: 5
Default

Hi jholder,

Logs attached.

All attempts used a working zimbra 4.5.6 install as basis. localconfig.xml is not blank.

I've tried to follow the install script, and to me it appears as if renaming the working ldap data directory to .BAK will occure every time, regardless of the state of localconfig.xml.
=> removeExistingInstall is called directly before "Installing packages" and it will move openldap-data to openldap-data.BAK and no one will ever read the data from that directory anymore.
Attached Files
File Type: zip zimbra.logs.zip (14.2 KB, 3 views)
Reply With Quote
  #4 (permalink)  
Old 12-29-2007, 12:56 PM
Intermediate Member
 
Posts: 20
Default

Quote:
Originally Posted by jholder View Post
The only way that would happen is if the installer was repeatedly run after an installation failure.

Once it fails the first time, the localconfig.xml is blank. When you run the second time, it sees the blank localconfig and thinks it's a new install.
So what happens when you make a snapshot LVM backup (tar.gz) and when the install fails the first (second, third in my case) time you rm -Rf everything in /opt/zimbra and start over by un-tar'ing the backup??

I'm having the exact same issue as the previous poster described. I'll check and gather some logs, but I can confirm that I didn't repeatedly run the installer after an installation failure without completely restoring from backup (unless the installer is looking somewhere outside /opt/zimbra for localconfig.xml)
Reply With Quote
  #5 (permalink)  
Old 12-29-2007, 03:30 PM
Former Zimbran
 
Posts: 5,606
Default

Roadrunner,
Please provide evidence that #2 is happening. It shouldn't move the directory, but create it from the backup.

If you guys think this is a bug, please feel free to file it.
It looks to me like the installer was repeatedly run 6 times.

As I mentioned, this can sometimes cause an issue with localconfig.

To test, please cat the file and post the results. I mis-spoke earlier. It's not blank, but is incomplete.
Reply With Quote
  #6 (permalink)  
Old 12-29-2007, 03:59 PM
Intermediate Member
 
Posts: 20
Default

I was able to complete a successful upgrade from 4.5.x to 5.0GA.

Here is what I did differently from the 1st two times:

I had iptables running and I change it to limit iptables to just block port 25 (so that incoming e-mail is differed to secondary MX).

Then.. at one point in this text it hung. I was executing ls -latr on /var/tmp and saw a file zmcontrol.out.dXeXI that was new.. I tail'd that file and saw "password : " like when sudo is executed.

I remembered from my upgrade (and then downgrade) that 5.0 makes modifications to /etc/sudoers that are not compatible with 4.5.x so until I found the solution I added a rule that was :
%zimbra ALL=NOPASSWD: ALL (I know.. not good but it did the job for the time being)

When I saw the prompt for a password in that log/out file I quickly added that line to /etc/sudoers. It was somewhere in the install where I saw this that it hung:

Restoring existing configuration file from /opt/zimbra/.saveconfig/config.save...done
Operations logged to /tmp/zmsetup.12292007-173217.log
Starting ldap...done.
Setting defaults...done.
Upgrading from 4.5.10_GA_1575 to 5.0.0_GA_1869
Stopping zimbra services

(here I think)

Verifying /opt/zimbra/conf/my.cnf
Starting mysql
Starting logger mysql


I was able to finish the upgrade without error. I don't know which of the two changes fixed the problem, but that did the job.

If Zimbra staff needs logs, I can provide, but I suspect the iptables rules were the issue.

-Eric
Reply With Quote
  #7 (permalink)  
Old 12-29-2007, 04:01 PM
Intermediate Member
 
Posts: 20
Default

To further clarify..

You (roadrunnr) will need a pristine backup of your original install before you started attempting to upgrade. Every time I attempted upgrade, I started by removing everything in /opt/zimbra and restoring from backup.
Reply With Quote
  #8 (permalink)  
Old 12-30-2007, 03:09 AM
Junior Member
 
Posts: 5
Default

to fireman,

Quote:
Originally Posted by fireman949 View Post
To further clarify..

You (roadrunnr) will need a pristine backup of your original install before you started attempting to upgrade. Every time I attempted upgrade, I started by removing everything in /opt/zimbra and restoring from backup.
My test system is running in a Vmware and i took a VMware snapshot of the working 4.5.6 installation. Everytime i try, i just reset the image to that snapshot and start from there.

Also, i don't see any issue with the /etc/sudoers file. This will IMHO only happen if you upgrade to 5.0, delete that instance and restore a backup that has only /opt/zimbra. This will leave the now newer /etc/sudoers in place, causing the password prompt.

The main difference i see from your attempt is that you upgrade from 4.5.10 to 5.0 while i have 4.5.6 instance to start with
Reply With Quote
  #9 (permalink)  
Old 12-30-2007, 06:47 AM
Junior Member
 
Posts: 5
Default [SOLVED] 4.5 to 5.0 OSS upgrade on Ubuntu kills all LDAP data

Hi,

ok, i found the problem. My dpkg database did not correctly reflect the state of system. This together with what i thing is quite a questionable test caused the moving of the openldap-data directory.

The install script will move openldap-data to openldap-data.BAK if /opt/zimbra/openldap/var/openldap-data/ exists. This directory normaly can not exist, as the zimbra-ldap package has been removed only a few lines earlier.

However, /opt/zimbra/openldap is a symlink to the ldap instance installed by zimbra-ldap. If this symlink points somewhere else, then the script will move the data directory, thereby removing all ldap data.

Andreas
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.