[SERVER-46765] mongod --version broken by Structured Logging Created: 10/Mar/20  Updated: 29/Oct/23  Resolved: 28/Mar/20

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.4.0-rc0, 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: Billy Donahue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
is depended on by SERVER-47019 Build info log message Closed
Duplicate
is duplicated by SERVER-47019 Build info log message Closed
is duplicated by SERVER-47215 Truncated mongod --version output on ... Closed
Problem/Incident
Related
related to SERVER-47208 mongod --version is formatted awkwardly Closed
related to SERVER-46798 remove VersionInfoInterface::isSameMa... Closed
is related to SERVER-46763 structure the VersionInfoInterface tu... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Dev Tools 2020-03-23
Participants:
Linked BF Score: 0

 Description   

master branch right now:

$ mongod --version
db version v0.0.0
Build Info
$

The problem is that we don't format unused attrs in a log statement anymore.
Needs some fix.



 Comments   
Comment by Githook User [ 18/Sep/20 ]

Author:

{'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}

Message: SERVER-46765 remove VersionInfoInterface::isSameMajorVersion
Branch: v4.4
https://github.com/mongodb/mongo/commit/5117710ff6cbbf19f89e3ced9f6dddbbab6c0cae

Comment by Githook User [ 26/Mar/20 ]

Author:

{'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}

Message: SERVER-46765 fix '-version' & '-sysinfo', which use kPlain logging

This reverts commit 79a8452b2a813b796059e5eab6c18f685283ce08.

with new spot fix: printCommandLineOpts when sending to log

(cherry picked from commit 2e58eb2e8a79c4fb4d12465616fa89ab498eb05c)
Branch: v4.4
https://github.com/mongodb/mongo/commit/e5b96973fb92153f337f74ff7df30a7079476548

Comment by Githook User [ 26/Mar/20 ]

Author:

{'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}

Message: SERVER-46765 fix '-version' & '-sysinfo', which use kPlain logging

(cherry picked from commit 6b1de909f3b9a3bb121f1dddc1cad75ee91a9f1f)
Branch: v4.4
https://github.com/10gen/mongo-enterprise-modules/commit/d04905cf5a1be2d524baad266b78feffbf5aa8b2

Comment by Billy Donahue [ 23/Mar/20 ]

recommitted with a 1-liner fix

Comment by Githook User [ 23/Mar/20 ]

Author:

{'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}

Message: SERVER-46765 fix '-version' & '-sysinfo', which use kPlain logging

This reverts commit 79a8452b2a813b796059e5eab6c18f685283ce08.

with new spot fix: printCommandLineOpts when sending to log
Branch: master
https://github.com/mongodb/mongo/commit/2e58eb2e8a79c4fb4d12465616fa89ab498eb05c

Comment by Githook User [ 23/Mar/20 ]

Author:

{'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}

Message: Revert "Revert "SERVER-46765 fix '-version' & '-sysinfo', which use kPlain logging""

This reverts commit 7ce7c995d20ef7f7881db63f1da2457f8fc62caf.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/469ac1ff3f0a141043ded545043a41dff9d9b1d3

Comment by Githook User [ 23/Mar/20 ]

Author:

{'email': 'max.hirschhorn@mongodb.com', 'name': 'Max Hirschhorn', 'username': 'visemet'}

Message: Revert "SERVER-46765 fix '-version' & '-sysinfo', which use kPlain logging"

This reverts commit cddfeb0c7cb137d46b14da18a7cfd4905bfab87f.
Branch: master
https://github.com/mongodb/mongo/commit/79a8452b2a813b796059e5eab6c18f685283ce08

Comment by Githook User [ 23/Mar/20 ]

Author:

{'email': 'max.hirschhorn@mongodb.com', 'name': 'Max Hirschhorn', 'username': 'visemet'}

Message: Revert "SERVER-46765 fix '-version' & '-sysinfo', which use kPlain logging"

This reverts commit 6b1de909f3b9a3bb121f1dddc1cad75ee91a9f1f.
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/7ce7c995d20ef7f7881db63f1da2457f8fc62caf

Comment by Githook User [ 20/Mar/20 ]

Author:

{'email': 'billy.donahue@mongodb.com', 'name': 'Billy Donahue', 'username': 'BillyDonahue'}

Message: SERVER-46765 fix '-version' & '-sysinfo', which use kPlain logging
Branch: master
https://github.com/mongodb/mongo/commit/cddfeb0c7cb137d46b14da18a7cfd4905bfab87f

Comment by Githook User [ 20/Mar/20 ]

Author:

{'email': 'billy.donahue@mongodb.com', 'name': 'Billy Donahue', 'username': 'BillyDonahue'}

Message: SERVER-46765 fix '-version' & '-sysinfo', which use kPlain logging
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/6b1de909f3b9a3bb121f1dddc1cad75ee91a9f1f

Comment by Githook User [ 16/Mar/20 ]

(Actually should have been attached to SERVER-46798)

Author:

{'name': 'Billy Donahue', 'username': 'BillyDonahue', 'email': 'billy.donahue@mongodb.com'}

Message: SERVER-46765 remove VersionInfoInterface::isSameMajorVersion
Branch: master
https://github.com/mongodb/mongo/commit/5780368c29834ffb07e1a26590c1e372fb13f950

Comment by Billy Donahue [ 13/Mar/20 ]

the buildInfo part of the --version output would have been (had it worked) an array of 1-key objects.

 

"environment": [
    {<key1> : <value1>},
    {<key2> : <value2>},
    ... 
],

Henrik and I agreed this wasn't quite right. So that will be fixed as part of this ticket.

"environment" will be mapped to a single JSON object in the obvious way.

 

"environment": {
    <key1> : <value1>,
    <key2> : <value2>,
    ... 
},

 

 

 

Comment by Billy Donahue [ 12/Mar/20 ]

would also affect the --sysinfo command, which also goes to kPlain format and issues logv2 logs.

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