[SERVER-17036] db.runCommand({startupWarnings:1}) includes spurious line Created: 24/Jan/15  Updated: 18/Sep/15  Resolved: 26/Jan/15

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 3.0.0-rc6
Fix Version/s: 3.0.0-rc7

Type: Bug Priority: Major - P3
Reporter: Cailin Nelson Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-16643 extend existing THP warning to THP de... Closed
Backwards Compatibility: Fully Compatible
Operating System: Linux
Participants:

 Description   

On 2.8.0-rc5 (and all previous versions of MongoDB), a healthy server looked like this:

> db.adminCommand({getLog: "startupWarnings" })
{ "totalLinesWritten" : 0, "log" : [ ], "ok" : 1 }

Now, a healthy 3.0.0-rc6 mongod can look like this:

"startupWarnings": {
        "totalLinesWritten": 1,
        "log": ["2015-01-24T17:58:54.554+0000 I CONTROL  [initandlisten] "],
        "ok": 1
    },

... and a genuine warning looks like this:

"startupWarnings": {
        "totalLinesWritten": 4,
        "log": [
            "2015-01-24T14:47:04.736+0000 I CONTROL  [initandlisten] ",
            "2015-01-24T14:47:04.736+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.",
            "2015-01-24T14:47:04.736+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'",
            "2015-01-24T14:47:04.736+0000 I CONTROL  [initandlisten] "
        ],
        "ok": 1
    },

MMS escalates "there is a startup warning" to the main Hosts page in the UI if totalLinesWritten > 0, which means that this new behavior in 3.0.0-rc5 is falsely triggering this check.

We can adapt MMS if necessary, but this will leave users of older version of MMS OnPrem seeing spurious warnings in the UI.



 Comments   
Comment by Githook User [ 26/Jan/15 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-17036 removed spurious newline in startup warning logs under Linux

(cherry picked from commit 8bb811a0ace89671c6011085706a1e3449409635)
Branch: v3.0
https://github.com/mongodb/mongo/commit/a62207c8a2bed0f1679b2d1f6cbde120cb149106

Comment by Githook User [ 26/Jan/15 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-17036 removed spurious newline in startup warning logs under Linux
Branch: master
https://github.com/mongodb/mongo/commit/8bb811a0ace89671c6011085706a1e3449409635

Comment by Cailin Nelson [ 25/Jan/15 ]

I just noticed this also affects the shell:

[root@mms-db-1.ny1 /home/cnelson]# /var/lib/mongodb-mms-automation/mongodb-linux-x86_64-3.0.0-rc6-ent/bin/mongo localhost:27500
MongoDB shell version: 3.0.0-rc6
connecting to: localhost:27500/test
Server has startup warnings: 
2015-01-25T01:00:09.313+0000 I CONTROL  [initandlisten] 
mmsconfig1:SECONDARY> 

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