[SERVER-12948] Ubuntu packaging has issues Created: 27/Feb/14  Updated: 05/May/14  Resolved: 11/Mar/14

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 2.6.0-rc1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Jonathan Abrahams Assignee: Ernie Hershey
Resolution: Cannot Reproduce Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File ubuntu12-64bit-26rc1.log    
Issue Links:
Depends
Operating System: Linux
Steps To Reproduce:

 
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 > /dev/null 2>&1
 
cat /etc/apt/sources.list.d/mongodb.list
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart/ dist 10gen
deb https://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/2.6 multiverse
 
sudo apt-get install -y mongodb-org-server
 
 mongod --version
db version v2.6.0-rc0
2014-02-28T15:26:00.407+0000 git version: 3779bf419438d2625277cf3c1c7216c497f683a8
 
sudo dpkg -s mongodb-org-server mongodb-org-server
Package: mongodb-org-server
Status: install ok installed
...
Conflicts: mongo-10gen, mongo-10gen-enterprise, mongo-10gen-enterprise-server, mongo-10gen-server, mongo-10gen-unstable, mongo-10gen-unstable-enterprise, mongo-10gen-unstable-enterprise-mongos, mongo-10gen-unstable
...
 
ls -l /usr/bin/mongod
-rwxr-xr-x 1 root root 23080216 Feb 21 20:42 /usr/bin/mongod
 
file /usr/bin/mongod
/usr/bin/mongod: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
 
man -w mongod
/usr/share/man/man1/mongod.1.gz
 
ls -l /etc/init.d/mongod
lrwxrwxrwx 1 root root 21 Feb 21 20:42 /etc/init.d/mongod -> /lib/init/upstart-job
 
ls -l /etc/mongod.conf
ls: cannot access /etc/mongod.conf: No such file or directory
 
ls -ld /var/lib/mongodb
drwxr-xr-x 2 mongodb mongodb 4096 Feb 27 22:10 /var/lib/mongodb
 
ls -ld /var/log/mongodb
drwxr-xr-x 2 mongodb mongodb 4096 Feb 27 22:10 /var/log/mongodb
 
 
 

Participants:

 Description   

The following failures were observed on Ubuntu 12 (64 bit):

[INFO] Installing package mongodb-org-server
[FAIL] config file missing at /etc/mongod.conf
[FAIL] mongod is not running
[FAIL] mongod is not running as mongodb user
[FAIL] mongod is not running with configuration file
[FAIL] unable to stop mongod successfully
[FAIL] log missing at /var/log/mongodb
[FAIL] data files missing at /var/lib/mongodb
[INFO] Installing package mongodb-enterprise
[FAIL] data has been corrupted in upgrade process



 Comments   
Comment by Jonathan Abrahams [ 11/Mar/14 ]

No longer an issue

Comment by Jonathan Abrahams [ 11/Mar/14 ]

Based on changes to the test script (driven by packaging changes), this is no longer an issue.

Comment by Ernie Hershey [ 07/Mar/14 ]

jonathan.abrahams is that error message accurate? It's from your test script, right? I don't think any data was corrupted.

It looks like you're just trying to connect to the server before it's started. Can you check if the server is still coming up when you can't connect?

Comment by Jonathan Abrahams [ 28/Feb/14 ]

Retried this test on a new VM in Amazon, and could not reproduce the errors. However there was one error:

[PASS] /var/log/mongodb/mongodb.log is ok
++ tail -n 1
++ mongo --eval 'db.x.count()'
exception: connect failed
+ local 'xcount=2014-02-28T17:26:10.313+0000 Error: couldn'\''t connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146'
+ '[' '2014-02-28T17:26:10.313+0000 Error: couldn'\''t connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146' -eq 1 ']'
./test.sh: line 551: [: 2014-02-28T17:26:10.313+0000 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146: integer expression expected
+ fail 'data has been corrupted in upgrade process'
+ echo -e '\e[0m[\e[1;41mFAIL\e[0m] data has been corrupted in upgrade process'
[FAIL] data has been corrupted in upgrade process

Comment by Ernie Hershey [ 28/Feb/14 ]

Have you manually deleted /etc/mongod.conf after installing the package? The packaging system views deleting a config file as a deliberate "change" to the configuration of the package that it thinks you want to preserve. If you've ever manually removed the config file and let the packaging system see it, this behavior is expected.

The script probably needs to do an apt-get purge instead of rm of the config file.

You can fix this manually as well by running apt-get purge mongodb-org-server, which will let apt mark the config file as deleted, so it will attempt to reinstall it, or with this crazy command, which doesn't require uninstalling the package:

sudo apt-get --option Dpkg::Options::="--force-confmiss" --reinstall install mongodb-org-server

Comment by Jonathan Abrahams [ 28/Feb/14 ]

See steps to reproduce.

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