[SERVER-26489] mongo shell no longer records history of commands Created: 05/Oct/16  Updated: 03/May/17  Resolved: 03/Nov/16

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 3.3.14
Fix Version/s: 3.4.0-rc3

Type: Bug Priority: Blocker - P1
Reporter: Robert Guo (Inactive) Assignee: Kevin Pulo
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-26807 dbshell history is not working Closed
Related
related to SERVER-25335 0002 umask yields world-readable .dbs... Closed
is related to SERVER-26871 Fix shell history file error handling Closed
is related to SERVER-26872 Add shell history testing Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platforms 2016-11-21
Participants:

 Description   

The mongo shell command history is no longer persisted.

No history in 3.3.13+

➜  mongo git:(master) ✗ 3.3.13/mongo --nodb
MongoDB shell version v3.3.13
> print()
 
> ^C
bye
➜  mongo git:(master) ✗ more ~/.dbshell 

Correct behavior in 3.3.12

➜  mongo git:(master) ✗ 3.3.12/mongo --nodb
MongoDB shell version v3.3.12
> print()
 
> ^C
bye
➜  mongo git:(master) ✗ more ~/.dbshell                 
print()

Possibly related to SERVER-25335



 Comments   
Comment by Githook User [ 03/May/17 ]

Author:

{u'username': u'devkev', u'name': u'Kevin Pulo', u'email': u'kevin.pulo@mongodb.com'}

Message: SERVER-25335 SERVER-26489 avoid group and other permissions when creating .dbshell history file

Cherry-picked from:

  • 035cf2afc04988b22cb67f4ebfd77e9b344cb6e0
  • f2c3376d70a3540d3bee5e32abe9d5517f571369
  • 4a431ceb4cb1d986ceb54ee26ca86915ef9ffd42

With additional adjustments to handle the inability to pass environment
variables to runProgram().
Branch: v3.2
https://github.com/mongodb/mongo/commit/e6b5935caccd012bccef945b4df82149a5a9957c

Comment by Githook User [ 01/May/17 ]

Author:

{u'username': u'devkev', u'name': u'Kevin Pulo', u'email': u'kevin.pulo@mongodb.com'}

Message: SERVER-25335 SERVER-26489 avoid group and other permissions when creating .dbshell history file

Cherry-picked from:

  • 035cf2afc04988b22cb67f4ebfd77e9b344cb6e0
  • f2c3376d70a3540d3bee5e32abe9d5517f571369
  • 4a431ceb4cb1d986ceb54ee26ca86915ef9ffd42

With additional adjustments to handle the inability to pass environment
variables to runProgram().
Branch: v3.0
https://github.com/mongodb/mongo/commit/0ee59992ef9627809e2ff13c608a023fc6b8c909

Comment by Githook User [ 03/Nov/16 ]

Author:

{u'username': u'devkev', u'name': u'Kevin Pulo', u'email': u'kevin.pulo@mongodb.com'}

Message: SERVER-26489 Fix open() flags for shell history file
Branch: master
https://github.com/mongodb/mongo/commit/4a431ceb4cb1d986ceb54ee26ca86915ef9ffd42

Generated at Thu Feb 08 04:12:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.