[SERVER-15906] rhel7 rpm packages don't stop the service while uninstalling packages Created: 31/Oct/14  Updated: 01/Jun/22  Resolved: 01/Jun/22

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 2.6.5, 2.7.8
Fix Version/s: 4.1 Desired

Type: Bug Priority: Major - P3
Reporter: Jalpa Trivedi (Inactive) Assignee: Alex Neben
Resolution: Won't Fix Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: Linux
Steps To Reproduce:

- on a clean rhel7 system install 2.6.5 enterprise packages
- sudo service mongod start
- sudo sh -c "echo \"port=57017\" >> /etc/mongod.conf"
- sudo service mongod restart
- mongo --port 57017 // verify that mongod is now running on 57017
- sudo yum remove mongodb-enterprise-*
- ps aux | grep mongod | grep -v grep
    mongod    1094  0.2  3.0 552664 31100 ? Rl   13:21   0:00 /usr/bin/mongod -f /etc/mongod.conf
- ls -ld /etc/mongo*
    -rw-r--r--. 1 root root 1544 Oct 31 13:51 /etc/mongod.conf
    -rw-r--r--. 1 root root 1532 Oct 31 13:19 /etc/mongod.conf.rpmsave
- ls -ld /var/log/mongodb/*.*
    -rw-r-----. 1 mongod mongod    0 Oct  8 18:06 mongod.log
    -rw-r-----. 1 mongod mongod 5458 Oct 31 13:22 mongod.log.rpmsave
- sudo service mongod restart
- ls -ld /var/log/mongodb/*.*
    -rw-r-----. 1 mongod mongod 3444 Oct 31 14:10 /var/log/mongodb/mongod.log
    -rw-r-----. 1 mongod mongod 6989 Oct 31 13:24 /var/log/mongodb/mongod.log.rpmsave

Participants:

 Description   

While removing the enterprise packages for rhel7, if a mongod is running, it's not stopped. If a custom config file was in place, it creates separate log file but does not write to that. Removal of package should stop the mongod if it's running.



 Comments   
Comment by Ernie Hershey [ 31/Oct/14 ]

I think this is as simple as adding "service mongo stop" to the %preun section of the spec files.

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