[Pkg-mongodb-maintainers] Bug#851220: mongodb-server: broken upgrade from 2.6 to 3.2

Apollon Oikonomopoulos apoikos at debian.org
Fri Jan 13 11:38:56 UTC 2017


Dear Eric,

Thank you for the report!

On 20:18 Thu 12 Jan     , Eric Cooper wrote:
> My mongo database stopped working after upgrading to the latest
> version in stretch, which changed from mongo 2.6 to 3.2.
> 
> mongod would not start, complaining that authSchemaUpgrade needed to
> be run first (and only on a 2.6 server, which was no longer
> available).
> 
> I ended up downloading the 2.6 tarball from the mongo website
> and running that version of mongod against my database in /var/lib so
> I could do the authSchemaUpgrade.  After that the new 3.2 version
> seemed to work OK.

Instead of the tarball, you could have used snapshot.debian.org to get 
the old 2.6 package back :)

> 
> In case anyone else gets stuck like this, I basically did this:
> 
> $ sudo mongod2.6 --noauth --dbpath /var/lib/mongodb &
> $ mongo
> > use admin
> > db.runCommand({authSchemaUpgrade:1})
> ^D

The problem is actually worse if you consider that Jessie had MongoDB 
2.4 and Stretch will be out with MongoDB 3.2 (most likely).  
Unfortunately we can neither maintain, nor include all intermediate 
versions in the archive (see below), but we still have to figure out a 
way to make our users' lives easier.

> 
> I'm not sure if this could be detected or automated, but I wasted a
> lot of time.  I don't think there should be a "silent" upgrade across
> major versions like this when there are such incompatible changes.
> Perhaps have mongodb-2.6, mongodb-3.2, etc. packages available concurrently
> in the archive, with mongodb pulling in the "current" one.

This is an option we have considered, but unfortunately it cannot be 
implemented easily for two reasons (at least for Stretch):

 - Maintaining all intermediate versions from Jessie's 2.4 up to 3.2 (or 
   even 3.4) in the Debian archive is a lot of work that we currently 
   don't have the manpower for.
 - 2.4 and 2.6 are already end-of-life and unsupported upstream, so we 
   would not want these packages in the main Debian archive.

Since upstream does not provide an upgrade path between non-consecutive 
versions, the only viable option I can see is:

 - Add a NEWS entry warning about the incompatibilities during major 
   upgrades.
 - Create mongodb.debian.net as an external repository, providing 
   packages for all intermediate releases (currently 2.6 and 3.0) for 
   Jessie and Stretch, so that users can at least use them during 
   upgrades.  These packages will be provided for convenience only and 
   3.2 will remain the only officially supported version in Debian.
 - Add a note in Stretch's release notes about the above.

I would also consider renaming the package to mongodb-server-3.2 to 
prevent automatic upgrades in general.

Please share your views on the above :)

Regards,
Apollon



More information about the Pkg-mongodb-maintainers mailing list