[SERVER-21673] Shell ignores "opQueryOnly", "opCommandOnly" values for rpcProtocols option Created: 25/Nov/15  Updated: 07/Dec/15  Resolved: 25/Nov/15

Status: Closed
Project: Core Server
Component/s: JavaScript, Networking, Shell
Affects Version/s: None
Fix Version/s: 3.2.0-rc5

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: Mira Carey
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-21659 bypassDocumentValidation authenticati... Closed
is related to SERVER-21790 "rpcProtocols" shell option not forwa... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Platform D (12/11/15)
Participants:

 Description   

The shell ignores the "opQueryOnly" and "opCommandOnly" values for the --rpcProtocols option. When either of these options are passed, the shell treats them the same as the default option "all".

Reproduce with the following script:

db.runCommand("ping");
var logs = db.adminCommand({getLog: "global"}).log;
print(logs[logs.length - 1]);

See the following shell session, which was run against a 3.2.0-rc4 mongod started with the -v option. Even though the "opQueryOnly" option was specified, the diagnostic log line for the command shows protocol:opCommand, which is unexpected.

rassi@rassi:~/work/mongo$ mongo320rc4 --rpcProtocols opQueryOnly repro.js
MongoDB shell version: 3.2.0-rc4
connecting to: test
2015-11-25T14:04:40.908-0500 I COMMAND  [conn2] command test.$cmd command: ping { ping: 1.0 } ntoreturn:1 ntoskip:0 keyUpdates:0 writeConflicts:0 numYields:0 reslen:22 locks:{} protocol:op_command 0ms

See the following shell session, which was run against a 3.0.7 mongod started with the -v option. Even though the "opCommandOnly" option was specified, the diagnostic log line for the command shows the server as correctly having received the command request, which is unexpected.

rassi@rassi:~/work/mongo$ mongo320rc4 --rpcProtocols opCommandOnly repro.js
MongoDB shell version: 3.2.0-rc4
connecting to: test
2015-11-25T14:04:08.317-0500 I COMMAND  [conn2] command test.$cmd command: ping { ping: 1.0 } ntoreturn:1 keyUpdates:0 writeConflicts:0 numYields:0 reslen:37 locks:{} 0ms

This is a regression introduced in 3.1.7 by 2a6a8f7c (SERVER-19376).



 Comments   
Comment by Githook User [ 25/Nov/15 ]

Author:

{u'username': u'hanumantmk', u'name': u'Jason Carey', u'email': u'jcarey@argv.me'}

Message: SERVER-21673 runConnectCallback in the shell
Branch: master
https://github.com/mongodb/mongo/commit/f50b071ebd21b852e8f0c8696c523bbc017b0580

Comment by Spencer Brody (Inactive) [ 25/Nov/15 ]

This prevents us from writing a regression test for SERVER-21659

Comment by J Rassi [ 25/Nov/15 ]

Note also that the "jsCore_op_query" and "jsCore_op_query_WT" suites in Evergreen rely on proper functioning of this shell option.

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