Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

use TD_AGENT_ARGS/DAEMON_ARGS when executing configtest #60

Merged
merged 4 commits into from
Jul 24, 2014

Conversation

choplin
Copy link
Contributor

@choplin choplin commented Jul 21, 2014

No description provided.

cmd=$(echo $cmd | sed -e "s/--log[ ]*[^ ]*//")
cmd=$(echo $cmd | sed -e "s/--user[ ]*[^ ]*//")
cmd=$(echo $cmd | sed -e "s/--group[ ]*[^ ]*//")
cmd=$(echo $cmd | sed -e "s/--daemon[ ]*[^ ]*//")
Copy link
Contributor

Choose a reason for hiding this comment

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

This --daemon handling is needed in redhat/td-agent.init?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It' ok to also add '--daemon' handling to the redhat file. I ignored this just because no '--daemon' exists in the default 'TD_AGNET_ARGS' of 'redhat/td-agent.init'

@repeatedly
Copy link
Contributor

Maybe output configtest result into --log file is better for debugging.
Almost td-agent users check /var/log/td-agent/td-agent.log, not command stdout.

@choplin
Copy link
Contributor Author

choplin commented Jul 21, 2014

I agree with the idea that logs configtest results for debugging.

@choplin
Copy link
Contributor Author

choplin commented Jul 21, 2014

Updated. Removes only --daemon now.

/usr/sbin/td-agent --user td-agent --group td-agent --dry-run -q
cmd="$TD_AGENT_ARGS"
cmd=$(echo $cmd | sed -e "s/--daemon[ ]*[^ ]*//")
cmd="$cmd --dry-run -q"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe $DAEMON_ARGS is needed like cmd="$cmd $DAEMON_ARGS --dry-run -q".
I'm not sure why TD_AGENT_ARGS and DAEMON_ARGS are separated...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, I'll add it.

@choplin
Copy link
Contributor Author

choplin commented Jul 24, 2014

Updated. Include $DAEMON_ARGS in $cmd of redhat init file.

@choplin
Copy link
Contributor Author

choplin commented Jul 24, 2014

Is it ok to have --daemon simultaneously when you run configtest with --deamon? If so, we can eliminate sed completely.

@repeatedly
Copy link
Contributor

@choplin --daemon is ignored when --dry-run is passed. So removing option is not important for the expected behaviour.

@choplin
Copy link
Contributor Author

choplin commented Jul 24, 2014

Thx, remove it.

repeatedly added a commit that referenced this pull request Jul 24, 2014
use TD_AGENT_ARGS/DAEMON_ARGS when executing configtest
@repeatedly repeatedly merged commit 99b808f into treasure-data:master Jul 24, 2014
@repeatedly
Copy link
Contributor

Thx!

repeatedly added a commit to treasure-data/omnibus-td-agent that referenced this pull request Jul 24, 2014
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.

2 participants