[SERVER-14346] CentOS repo silently installs 2.6.x when specifically instructed to install 2.4.x Created: 24/Jun/14  Updated: 10/Dec/14  Resolved: 25/Jun/14

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Richard Bateman Assignee: Ramon Fernandez Marina
Resolution: Done Votes: 0
Labels: installation
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 6.4


Issue Links:
Related
Operating System: Linux
Participants:

 Description   

Sorry if this is the wrong place to put this. This is a major problem because even an install script that is specifically attempting to install 2.4.10 will appear to succeed even though 2.6.3 (at present) will actually be installed.

Here is a transcription copied from my terminal to demonstrate the issue:

[richard@hamhobby ~]$ sudo yum install mongo-10gen-server-2.4.10
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.adams.net
 * epel: linux.mirrors.es.net
 * extras: centos-mirror.jchost.net
 * updates: mirror.thelinuxfix.com
Setting up Install Process
Package mongo-10gen-server is obsoleted by mongodb-org-server, trying to install mongodb-org-server-2.6.3-1.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package mongo-10gen-server.x86_64 0:2.4.10-mongodb_1 will be obsoleted
---> Package mongodb-org-server.x86_64 0:2.6.3-1 will be obsoleting
--> Finished Dependency Resolution
 
Dependencies Resolved
 
========================================================================================================================================================================================================================================
 Package                                                          Arch                                                 Version                                                Repository                                           Size
========================================================================================================================================================================================================================================
Installing:
 mongodb-org-server                                               x86_64                                               2.6.3-1                                                10gen                                               9.0 M
     replacing  mongo-10gen-server.x86_64 2.4.10-mongodb_1
 
Transaction Summary
========================================================================================================================================================================================================================================
Install       1 Package(s)
 
Total download size: 9.0 M
Is this ok [y/N]: ^CExiting on user Command
[richard@hamhobby ~]$ sudo yum install mongodb-org-server-2.4.10
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.adams.net
 * epel: linux.mirrors.es.net
 * extras: centos-mirror.jchost.net
 * updates: mirror.thelinuxfix.com
Setting up Install Process
No package mongodb-org-server-2.4.10 available.
Error: Nothing to do
[richard@hamhobby ~]$ sudo yum install mongodb-org-server-2.6.3
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.adams.net
 * epel: linux.mirrors.es.net
 * extras: centos-mirror.jchost.net
 * updates: mirror.thelinuxfix.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mongo-10gen-server.x86_64 0:2.4.10-mongodb_1 will be obsoleted
---> Package mongodb-org-server.x86_64 0:2.6.3-1 will be obsoleting
--> Finished Dependency Resolution
 
Dependencies Resolved
 
========================================================================================================================================================================================================================================
 Package                                                          Arch                                                 Version                                                Repository                                           Size
========================================================================================================================================================================================================================================
Installing:
 mongodb-org-server                                               x86_64                                               2.6.3-1                                                10gen                                               9.0 M
     replacing  mongo-10gen-server.x86_64 2.4.10-mongodb_1
 
Transaction Summary
========================================================================================================================================================================================================================================
Install       1 Package(s)
 
Total download size: 9.0 M
Is this ok [y/N]: ^CExiting on user Command



 Comments   
Comment by Richard Bateman [ 25/Jun/14 ]

Please forgive me for saying this, but if this is "as designed", then it was a Very Bad Design (tm).

Because of this change, my scripts which had been working correctly to install a specific version for years silently installed a new version, thus breaking my entire replicaset because suddenly yum doesn't behave as expected. The default behavior for anything should always be to work correctly for backwards compatibility and require changes for new things, not the other way around.

If I want to install 2.4.10 it should install 2.4.10. It would be far, far better for it to break when I try to upgrade in a way that leaves it obvious that a change is needed to my scripts than for it to break silently in a way that causes my old scripts to need to be updated with values that I could not have possibly known about ahead of time since your packages did not previously exist when I wrote the scripts originally.

In short, any command that does one thing today should not ever suddenly start doing something different (particularly something that will break my replicaset) without warning. If it's going to change, and require changes to a script, that doesn't particularly bother me (not convenient, but a relatively minor problem). If that is the case, though, it should fail to run, not just suddenly do the wrong thing.

Comment by Ramon Fernandez Marina [ 25/Jun/14 ]

rbateman@gradecam.com, although confusing, this is expected: the mongodb packages were renamed and we use the Obsoletes field, so for yum to do the right thing extra parameters are needed as described here.

Generated at Thu Feb 08 03:34:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.