Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX wrong INFO startup log showing ORION_MONGO_TIMEOUT, ORION_IN_REQ_PAYLOAD_MAX_SIZE and ORION_OUT_REQ_MSG_MAX_SIZE env var values #4501

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

fgalan
Copy link
Member

@fgalan fgalan commented Feb 6, 2024

Solves the problem reported at #4496 (comment)

Probably there are more times apart from PaULong to take into account. The new error trace in the else branch would help to detect them in the future.

Some traces:

$ ORION_MONGO_URI=mongodb://localhost:27017 ORION_MONGO_TIMEOUT=0 contextBroker -fg -logLevel INFO -logForHumans
INFO@2024-02-06T08:37:58.151Z  contextBroker.cpp[1110]: start command line <contextBroker -fg -logLevel INFO -logForHumans>
INFO@2024-02-06T08:37:58.151Z  contextBroker.cpp[972]: env var ORION_MONGO_URI (-dbURI): mongodb://localhost:27017
INFO@2024-02-06T08:37:58.151Z  contextBroker.cpp[984]: env var ORION_MONGO_TIMEOUT (-dbTimeout): 0
INFO@2024-02-06T08:37:58.151Z  contextBroker.cpp[1184]: Orion Context Broker is running
INFO@2024-02-06T08:37:58.167Z  mongoConnectionPool.cpp[536]: Connected to mongodb://localhost:27017 (dbName: orion, poolsize: 10)
INFO@2024-02-06T08:37:58.168Z  contextBroker.cpp[1324]: Startup completed

$ ORION_MONGO_TIMEOUT=500 contextBroker -fg -logLevel INFO -logForHumans
INFO@2024-02-06T08:38:06.289Z  contextBroker.cpp[1110]: start command line <contextBroker -fg -logLevel INFO -logForHumans>
INFO@2024-02-06T08:38:06.289Z  contextBroker.cpp[984]: env var ORION_MONGO_TIMEOUT (-dbTimeout): 500
INFO@2024-02-06T08:38:06.289Z  contextBroker.cpp[1184]: Orion Context Broker is running
INFO@2024-02-06T08:38:06.306Z  mongoConnectionPool.cpp[536]: Connected to mongodb://localhost/?connectTimeoutMS=500 (dbName: orion, poolsize: 10)
INFO@2024-02-06T08:38:06.307Z  contextBroker.cpp[1324]: Startup completed

CC: @goten002

…PAYLOAD_MAX_SIZE and ORION_OUT_REQ_MSG_MAX_SIZE env var values
@fgalan fgalan requested a review from mapedraza February 7, 2024 10:02
Copy link
Collaborator

@mapedraza mapedraza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mapedraza mapedraza merged commit 8d8d954 into master Feb 7, 2024
12 checks passed
@mapedraza mapedraza deleted the hardening/4496_fix_env_var_logs branch February 7, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants