Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Conversation

@nammn
Copy link
Collaborator

@nammn nammn commented Jan 25, 2024

All Submissions:

  • Have you opened an Issue before filing this PR?
  • Have you signed our CLA?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if such).

removing error message in case that file does not exist. We do want to use it in case it exist, with this we have the opportunity to connect to OM via monitoring.

automationAgentLogOptions = " -logFile ${AGENT_LOG_FILE} -maxLogFileDurationHrs ${AGENT_MAX_LOG_FILE_DURATION_HOURS} -logLevel ${AGENT_LOG_LEVEL}"

MongodbUserCommand = `current_uid=$(id -u)
declare -r current_uid
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could merge with below var, but this seems easy enough once we need to do one change in the future

func AutomationAgentCommand() []string {
// AutomationAgentCommand withAgentAPIKeyExport detects whether we want to deploy this agent with the agent api key exported
// it can be used to register the agent with OM.
func AutomationAgentCommand(withAgentAPIKeyExport bool) []string {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this method is used in meko as a base to create the agent command

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@nammn nammn requested a review from mircea-cosbuc January 31, 2024 10:03
Copy link
Collaborator

@lsierant lsierant left a comment

Choose a reason for hiding this comment

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

One comment to consider, but in any way LGTM

`
MongodbUserCommandWithAPIKeyExport = `current_uid=$(id -u)
AGENT_API_KEY="$(cat /mongodb-automation/agent-api-key/agentApiKey)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

we might do this also by swallowing stderr to /dev/null.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Initially I implemented it that way: 6526377 but then @irajdeep had a great comment that he thinks it would be nice to make sure that we can see the error message in appdb in case monitoring does not work for any reason.

@nammn nammn merged commit f33768e into master Feb 1, 2024
@nammn nammn deleted the ignore-err branch February 1, 2024 18:12
nammn added a commit that referenced this pull request Feb 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants