/home/td-agent is missing on Debian stretch #166
Comments
We use adduser/useradd for creating td-agent user so change option can do it. AFAIK, rpm creates home directory under td-agent doesn't consider Gemfile because |
I've tested on deb for now. rpm creates $HOME as /var/lib/td-agent explicitly. deb does not create $HOME, but /etc/passwd describes /home/td-agent is $HOME for td-agent user.
Thanks, I will keep investigating supporting |
Investigate on Debian stretch. Preconditions:
Result: Additional information, if /etc/td-agent/vendor/bundle that is writable by td-agent user exist, bundler does not need sudo privilege. We need change owner and group of files under /etc/td-agent directory to manage fluent-plugins by /etc/td-agent/Gemfile. |
This is a part of Gemfile based plugin management. See details for treasure-data#166
#168 is merged, so this issue can be closed. |
Display reason to require sudo This is useful for non-interactive installation with bundler. ### What was the end-user problem that led to this PR? treasure-data/omnibus-td-agent#166 I could not notice that bundler needs sudo privilege from logs. So I checked bundler code. ### What was your diagnosis of the problem? Bundler does not show the reason to need sudo privilege. ### What is your fix for the problem, implemented in this PR? Display reason to require sudo. ### Why did you choose this fix out of the possible options? If bundler displays reason to require sudo, we can notice permission problems as soon as possible.
6316: Display reason to require sudo r=colby-swandale a=okkez This is useful for non-interactive installation with bundler. ### What was the end-user problem that led to this PR? treasure-data/omnibus-td-agent#166 I could not notice that bundler needs sudo privilege from logs. So I checked bundler code. ### What was your diagnosis of the problem? Bundler does not show the reason to need sudo privilege. ### What is your fix for the problem, implemented in this PR? Display reason to require sudo. ### Why did you choose this fix out of the possible options? If bundler displays reason to require sudo, we can notice permission problems as soon as possible. Co-authored-by: Kenji Okimoto <okimoto@clear-code.com>
6316: Display reason to require sudo r=colby-swandale a=okkez This is useful for non-interactive installation with bundler. ### What was the end-user problem that led to this PR? treasure-data/omnibus-td-agent#166 I could not notice that bundler needs sudo privilege from logs. So I checked bundler code. ### What was your diagnosis of the problem? Bundler does not show the reason to need sudo privilege. ### What is your fix for the problem, implemented in this PR? Display reason to require sudo. ### Why did you choose this fix out of the possible options? If bundler displays reason to require sudo, we can notice permission problems as soon as possible. Co-authored-by: Kenji Okimoto <okimoto@clear-code.com> (cherry picked from commit 1bd53e3)
6316: Display reason to require sudo r=colby-swandale a=okkez This is useful for non-interactive installation with bundler. ### What was the end-user problem that led to this PR? treasure-data/omnibus-td-agent#166 I could not notice that bundler needs sudo privilege from logs. So I checked bundler code. ### What was your diagnosis of the problem? Bundler does not show the reason to need sudo privilege. ### What is your fix for the problem, implemented in this PR? Display reason to require sudo. ### Why did you choose this fix out of the possible options? If bundler displays reason to require sudo, we can notice permission problems as soon as possible. Co-authored-by: Kenji Okimoto <okimoto@clear-code.com>
I want to manage plugins based on Gemfile with td-agent3.
I've added following Gemfile:
My td-agent.conf is following:
I've added /etc/systemd/system/td-agent.service:
Stop and start td-agent, and I got following error messages:
Change $HOME and create it:
(This is need to execute
bundle install
because bundler creates $HOME/.bundle and store repository index cache.)Add sudoers for td-agent with NOPASSWD.
Failed to start td-agent because build-tools are missing.
Install build-essential.
Finally, I can start td-agent with my Gemfile and td-agent.conf.
Is this intentional to need such complicated sequences to manage fluent-plugins with Gemfile?
My proposals to manage gems based on Gemfile.
bundle install
without sudobundle install
as td-agent userThe text was updated successfully, but these errors were encountered: