Bug#629592: cyrus-common-2.2: confusing/contradictory information on lenny->squeeze upgrade

Ross Boylan ross at biostat.ucsf.edu
Fri Jun 10 03:03:59 UTC 2011


On Thu, 2011-06-09 at 10:01 +0200, Ondřej Surý wrote:
> On Thu, Jun 9, 2011 at 09:10, Ross Boylan <ross at biostat.ucsf.edu> wrote:
> > On Wed, 2011-06-08 at 10:13 +0200, Ondřej Surý wrote:
,,,,,
[Ross wrote]
> > The main problem is that the convert script says to install db4.2-util,
> > but it is not available in squeeze.  I assume it's in Lenny, but don't
> > know if the version there will work on a squeeze system.
> 
> It should work, just get libdb4.2 and db4.2-util.
> 
> Anyway the script is for squeeze->wheezy and it will work there.
> Unfortunately it's too late to fix the squeeze.
I added lenny to sources.list and was able to retrieve db4.2-util (I
didn't get libdb4.2 since I just noticed it).

Isn't there likely to be a similar issue in wheezy, in which the "old"
version (4.7) will only be available in squeeze?  If so, I think it
needs a release note warning people to install the package before they
upgrade.  And/or the cyrus package could recommend libdb4.7-util.

It looks to me as if there are still problems.  Here's what mail.info
shows when I started cyrus after running the upgrade script:
<mail.info>
Jun  9 19:29:21 vm-migrate07 cyrus/master[16572]: process started
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: DBERROR db4: /var/lib/cyrus/db: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: DBERROR db4: /var/lib/cyrus/db/__db.001: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: DBERROR db4: /var/lib/cyrus/db: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: DBERROR db4: /var/lib/cyrus/db/__db.001: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: DBERROR: dbenv->open '/var/lib/cyrus/db' failed: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: DBERROR: init() on berkeley
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: DBERROR: writing /var/lib/cyrus/db/skipstamp: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: DBERROR: init() on skiplist
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: recovering cyrus databases
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: skiplist: recovered /var/lib/cyrus/mailboxes.db (3 records, 568 bytes) in 0 seconds
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: skiplist: recovered /var/lib/cyrus/annotations.db (0 records, 144 bytes) in 0 seconds
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16574]: done recovering cyrus databases
Jun  9 19:29:21 vm-migrate07 cyrus/cyr_expire[16575]: DBERROR db4: /var/lib/cyrus/db/__db.001: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/cyr_expire[16575]: DBERROR: dbenv->open '/var/lib/cyrus/db' failed: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/cyr_expire[16575]: DBERROR: init() on berkeley
Jun  9 19:29:21 vm-migrate07 cyrus/cyr_expire[16575]: DBERROR: reading /var/lib/cyrus/db/skipstamp, assuming the worst: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/cyr_expire[16575]: skiplist: recovered /var/lib/cyrus/annotations.db (0 records, 144 bytes) in 0 seconds
Jun  9 19:29:21 vm-migrate07 cyrus/cyr_expire[16575]: skiplist: recovered /var/lib/cyrus/mailboxes.db (3 records, 568 bytes) in 0 seconds
Jun  9 19:29:21 vm-migrate07 cyrus/cyr_expire[16575]: DBERROR db4: DB_AUTO_COMMIT may not be specified in non-transactional environment
Jun  9 19:29:21 vm-migrate07 cyrus/cyr_expire[16575]: DBERROR: opening /var/lib/cyrus/deliver.db: Invalid argument
Jun  9 19:29:21 vm-migrate07 cyrus/cyr_expire[16575]: DBERROR: opening /var/lib/cyrus/deliver.db: cyrusdb error
Jun  9 19:29:21 vm-migrate07 cyrus/master[16572]: process 16575 exited, status 1
Jun  9 19:29:21 vm-migrate07 cyrus/tls_prune[16576]: DBERROR db4: /var/lib/cyrus/db/__db.001: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/tls_prune[16576]: DBERROR: dbenv->open '/var/lib/cyrus/db' failed: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/tls_prune[16576]: DBERROR: init() on berkeley
Jun  9 19:29:21 vm-migrate07 cyrus/tls_prune[16576]: DBERROR: reading /var/lib/cyrus/db/skipstamp, assuming the worst: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/tls_prune[16576]: DBERROR db4: DB_AUTO_COMMIT may not be specified in non-transactional environment
Jun  9 19:29:21 vm-migrate07 cyrus/tls_prune[16576]: DBERROR: opening /var/lib/cyrus/tls_sessions.db: Invalid argument
Jun  9 19:29:21 vm-migrate07 cyrus/tls_prune[16576]: DBERROR: opening /var/lib/cyrus/tls_sessions.db: cyrusdb error
Jun  9 19:29:21 vm-migrate07 cyrus/master[16572]: process 16576 exited, status 1
Jun  9 19:29:21 vm-migrate07 cyrus/master[16572]: ready for work
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR db4: /var/lib/cyrus/db/__db.001: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: dbenv->open '/var/lib/cyrus/db' failed: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: init() on berkeley
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: reading /var/lib/cyrus/db/skipstamp, assuming the worst: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: checkpointing cyrus databases
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR db4: txn_checkpoint interface requires an environment configured for the transaction subsystem
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: couldn't checkpoint: Invalid argument
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: sync /var/lib/cyrus/db: cyrusdb error
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR db4: DB_ENV->log_archive interface requires an environment configured for the logging subsystem
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: error listing log files: Invalid argument
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: archive /var/lib/cyrus/db: cyrusdb error
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR db4: txn_checkpoint interface requires an environment configured for the transaction subsystem
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: couldn't checkpoint: Invalid argument
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: sync /var/lib/cyrus/db: cyrusdb error
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR db4: DB_ENV->log_archive interface requires an environment configured for the logging subsystem
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: error listing log files: Invalid argument
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: archive /var/lib/cyrus/db: cyrusdb error
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR db4: txn_checkpoint interface requires an environment configured for the transaction subsystem
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: couldn't checkpoint: Invalid argument
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: sync /var/lib/cyrus/db: cyrusdb error
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR db4: DB_ENV->log_archive interface requires an environment configured for the logging subsystem
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: error listing log files: Invalid argument
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: DBERROR: archive /var/lib/cyrus/db: cyrusdb error
Jun  9 19:29:21 vm-migrate07 cyrus/ctl_cyrusdb[16577]: done checkpointing cyrus databases
Jun  9 19:29:21 vm-migrate07 cyrus/notify[16578]: DBERROR db4: /var/lib/cyrus/db/__db.001: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/notify[16578]: DBERROR: dbenv->open '/var/lib/cyrus/db' failed: No such file or directory
Jun  9 19:29:21 vm-migrate07 cyrus/notify[16578]: DBERROR: init() on berkeley
Jun  9 19:29:21 vm-migrate07 cyrus/notify[16578]: DBERROR: reading /var/lib/cyrus/db/skipstamp, assuming the worst: No such file or directory
</mail.info>

Some of that may be normal for recreating deleted working databases, but is all of it?
cyrmaster seems to be listening in the right places:
# date; netstat -nlp | grep cyr
Thu Jun  9 20:00:16 PDT 2011
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      16572/cyrmaster
tcp        0      0 127.0.0.1:4190          0.0.0.0:*               LISTEN      16572/cyrmaster
tcp6       0      0 :::143                  :::*                    LISTEN      16572/cyrmaster
tcp6       0      0 ::1:4190                :::*                    LISTEN      16572/cyrmaster
unix  2      [ ACC ]     STREAM     LISTENING     368136   4966/lmtpd          /var/run/cyrus/socket/lmtp

but exim just hangs when it tries to send it a message via lmtp.
> 
> > Some other issues, in chronological order:
> >
....
> >
> > 3. Is db4.2-util actually necessary to upgrade?  Looking at the  code,
> > it appears this is used to checkpoint the database before the main
> > operations.  Is that necessary if cyrus is already shutdown normally, as
> > I thought it had to be before the upgrade?
> 
> Well, it's not, you can just backup whole /var/lib/cyrus/ directory
Maybe it would be simpler if the script didn't use the old bdb?

> 
> > 5. I'm not sure, based on a quick read, if the script backs up the
> > entire mail spool.  If it does, it would be good to make this optional
> > since it can take a lot of time and space, and the admin may have
> > already made backups.
> 
> No, it doesn't. That would be crazy :))).
Well, so would touching all my files in the spool for every minor
upgrade, causing my backup system to backup the whole spool. And that
happens :(  (I know: there are good safety reasons for it).

> 
> > 7. It might be useful to note the script should be run as root.  I
> > wondered if it should be run as cyrus until I saw the code has su cyrus
> > at strategic points.
> 
> I'll try to improve the code, so it could be run as cyrus user as
> well. Anyway normally it would be executed from postinst, so it's not
> a high priority stuff...   but I'll fix that if I find the time (and
> of course patches are welcome).
How about, near the top of the file
# Run this script as root.  Ordinarily it will be run automatically in
post-install.

Ross
?







More information about the Pkg-Cyrus-imapd-Debian-devel mailing list