[SERVER-68548] mongo shell version 4.4.15 logging asio message despite --quiet flag Created: 03/Aug/22  Updated: 29/Oct/23  Resolved: 25/Aug/22

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: 4.4.15
Fix Version/s: 6.1.1, 4.4.17, 6.0.2, 6.2.0-rc0, 5.0.22

Type: Bug Priority: Major - P3
Reporter: Vincent Do Assignee: Adam Rayner
Resolution: Fixed Votes: 0
Labels: logging, logs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-70416 add legacy shell --quiet test Closed
Duplicate
is duplicated by SERVER-81837 Backport auf asio message fix into v5... Closed
Related
related to SERVER-78540 mongo shell version 5.0.18 logging as... Closed
is related to SERVER-70187 new TLS handshake log line disobeys -... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.1, v6.0, v5.0, v4.4
Sprint: Security 2022-08-22, Security 2022-09-05
Participants:
Case:

 Description   

I upgraded my mongo 4.4 installation to 4.4.15 today and noticed that the shell logged the following when I'm trying to run a script with the --quiet option:

/Users/vincent.do/bin/mongo mongodb://db-dev-aarch64-4.us-east-1.aws.cloud-dev.10gen.cc:27298,db-dev-aarch64-5.us-east-1.aws.cloud-dev.10gen.cc:27298,db-dev-aarch64-6.us-east-1.aws.cloud-dev.10gen.cc:27298/ --tls --quiet --tlsCAFile /Users/vincent.do/cas/ca-mongodb-signatory.pem
{"t":{"$date":"2022-08-03T19:50:44.128Z"},"s":"I",  "c":"NETWORK",  "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"}
MongoDB Enterprise mongos>

The same behavior is not observed when I use shell version 4.4.10

/Users/vincent.do/bin/mongo mongodb://db-dev-aarch64-4.us-east-1.aws.cloud-dev.10gen.cc:27298,db-dev-aarch64-5.us-east-1.aws.cloud-dev.10gen.cc:27298,db-dev-aarch64-6.us-east-1.aws.cloud-dev.10gen.cc:27298/ --tls --quiet --tlsCAFile /Users/vincent.do/cas/ca-mongodb-signatory.pem
MongoDB Enterprise mongos>

While this seems like a trivial bug, this might have a pretty big impact for users who rely on the previous behavior of --quiet for operational scripts. (MongoDB Cloud being one of them).

FWIW, I was connecting to a 4.4.13 sharded cluster



 Comments   
Comment by Githook User [ 04/Oct/23 ]

Author:

{'name': 'Adam Rayner', 'email': 'adam.rayner@gmail.com', 'username': ''}

Message: SERVER-68548: check quiet globalServerParam before logging
Branch: v5.0
https://github.com/mongodb/mongo/commit/b87ca174b4807d0c5cb31c8347deb6877260badb

Comment by Githook User [ 16/Sep/22 ]

Author:

{'name': 'Adam Rayner', 'email': 'adam.rayner@gmail.com'}

Message: SERVER-68548: Backport - check quiet globalServerParam before logging
Branch: v6.0
https://github.com/mongodb/mongo/commit/f7f6c6928320873089b443da007de119b926f605

Comment by Githook User [ 15/Sep/22 ]

Author:

{'name': 'Adam Rayner', 'email': 'adam.rayner@gmail.com'}

Message: SERVER-68548: check quiet globalServerParam before logging
Branch: v4.4
https://github.com/mongodb/mongo/commit/cfe4fe45d31644ff6bfda613169245c7f9a7e2e9

Comment by Adam Rayner [ 24/Aug/22 ]

This appears to be a side effect from a backported bug fix. I have pushed an additional fix to master and requested backports for all versions going back to 4.4.

Comment by Danny Gradim [ 24/Aug/22 ]

Hi,
I'm having the same issue using puppet-mongodb script with --quiet. I'm getting 

/bin/mongo admin --quiet --host xx:27017 --tls --tlsCertificateKeyFile /etc/ssl/mongodb.pem --tlsCAFile /etc/pki/tls/certs/mgdb-ca.crt --eval "load('/root/.mongorc.js');

 db.version()" {"t":{"$date":"2022-08-24T08:21:53.586Z"},"s":"I",  "c":"NETWORK",  "id":5490002, "ctx":"thread1","msg":"Started a new thread for the timer service"} 

4.4.15
 

instead of only db.version 4.4.15 and that causes an issue on all ours mongdb nodes.

Comment by Chris Kelly [ 04/Aug/22 ]

Forwarding this to the Security team since they have ownership of logging.

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