[SERVER-50249] Upgrade via package manager from 4.2.8 to 4.4.0 Created: 05/Aug/20  Updated: 29/Oct/23  Resolved: 03/Sep/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.4.0
Fix Version/s: 4.7.0, 4.4.2

Type: Bug Priority: Critical - P2
Reporter: Michael . Assignee: Ryan Egesdahl (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

debian 10 buster (4.19.0-9-amd64)


Issue Links:
Backports
Gantt End to End
has to be finished together with TOOLS-2716 mongodb-database-tools package should... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Dev Platform 2020-09-07
Participants:

 Description   

I was preparing to upgrade mongodb from 4.2.8 to 4.4.0 and followed the guide in which it is recommended to use packagemanager to upgrade between major releases.

So I added the new repo to the apt sources and all packages except the mongodb-org-tools upgraded succesfully. But the tools had an issue that i fixed like this:

 

user@server02.domain.com:~$ sudo apt update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Ign:4 http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 InRelease
Ign:5 http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 InRelease
Hit:6 http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 Release
Hit:8 http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 Release Reading package lists... Done
Building dependency tree Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.

 

user@server02.domain.com:~$ apt list --upgradable
Listing... Done
mongodb-org-tools/buster 4.4.0 amd64 [upgradable from: 4.2.8]
N: There are 7 additional versions. Please use the '-a' switch to see them.

 

user@server02.domain.com:~$ sudo apt install mongodb-org-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  mongodb-database-tools mongodb-org-database-tools-extra
The following NEW packages will be installed:
  mongodb-database-tools mongodb-org-database-tools-extra
The following packages will be upgraded:
  mongodb-org-tools
1 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 54.4 MB of archives.
After this operation, 134 MB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4/main amd64 mongodb-org-database-tools-extra amd64 4.4.0 [5,612 B]
Get:2 http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4/main amd64 mongodb-org-tools amd64 4.4.0 [2,888 B]
Get:3 http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4/main amd64 mongodb-database-tools amd64 100.1.1 [54.4 MB]
Fetched 54.4 MB in 3s (19.0 MB/s)
Reading changelogs... Done
Selecting previously unselected package mongodb-org-database-tools-extra.
(Reading database ... 48999 files and directories currently installed.)
Preparing to unpack .../mongodb-org-database-tools-extra_4.4.0_amd64.deb ...
Unpacking mongodb-org-database-tools-extra (4.4.0) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-database-tools-extra_4.4.0_amd64.deb (--unpack):
  trying to overwrite '/usr/bin/install_compass', which is also in package mongodb-org-tools 4.2.8
Preparing to unpack .../mongodb-org-tools_4.4.0_amd64.deb ...
Unpacking mongodb-org-tools (4.4.0) over (4.2.8) ...
Selecting previously unselected package mongodb-database-tools.
Preparing to unpack .../mongodb-database-tools_100.1.1_amd64.deb ... Unpacking mongodb-database-tools (100.1.1) ...
Errors were encountered while processing:
  /var/cache/apt/archives/mongodb-org-database-tools-extra_4.4.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

 

user@server02.domain.com:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  mongodb-org-database-tools-extra
The following NEW packages will be installed:
  mongodb-org-database-tools-extra
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/5,612 B of archives.
After this operation, 20.5 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 48993 files and directories currently installed.)
Preparing to unpack .../mongodb-org-database-tools-extra_4.4.0_amd64.deb ...
Unpacking mongodb-org-database-tools-extra (4.4.0) ...
Setting up mongodb-database-tools (100.1.1) ...
Setting up mongodb-org-database-tools-extra (4.4.0) ...
Setting up mongodb-org-tools (4.4.0) ...
Processing triggers for man-db (2.8.5-2) ...

 

 

Is there anything that I missed, or why did it not work on first try?
Hope I supplied enough information for you guys to work with.
Thanks.

 

 



 Comments   
Comment by Githook User [ 09/Sep/20 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-50249 Update package control files for v4.4 tools move

The mongodb-*-tools packages were split into mongodb-database-tools and
mongodb-*-tools-extra, which causes some package management headaches
during upgrades to v4.4. This change updates the package control files
to account for the package splits so upgrades go more smoothly.

(cherry picked from commit 0d45dd9d7ba9d3a1557217a998ad31c68a897d47)
Branch: v4.4
https://github.com/mongodb/mongo/commit/1f95d8cec662d94df84d524d1bfee67cbde15d32

Comment by Githook User [ 01/Sep/20 ]

Author:

{'name': 'Ryan Egesdahl', 'email': 'ryan.egesdahl@mongodb.com', 'username': 'deriamis'}

Message: SERVER-50249 Update package control files for v4.4 tools move

The mongodb-*-tools packages were split into mongodb-database-tools and
mongodb-*-tools-extra, which causes some package management headaches
during upgrades to v4.4. This change updates the package control files
to account for the package splits so upgrades go more smoothly.
Branch: master
https://github.com/mongodb/mongo/commit/0d45dd9d7ba9d3a1557217a998ad31c68a897d47

Comment by Andrew Morrow (Inactive) [ 11/Aug/20 ]

I expect we will need to add a Breaks section declaring that mongodb-org-database-tools-extra conflicts with mongodb-org-tools at v4.2 and older due to the file move.

Comment by Ryan Chipman [ 11/Aug/20 ]

moved this from TOOLS to SERVER, since the problematic package is mongodb-database-tools-extra, which is generated by the server

Generated at Thu Feb 08 05:22:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.