-
Notifications
You must be signed in to change notification settings - Fork 813
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
[core] use internal /run
for pid and pickle files
#1569
Conversation
This PR should also allow us to run |
6025e90
to
6005c6c
Compare
Makes sense to me. |
6005c6c
to
d85b733
Compare
Sure, I added them back. I wanted to deprecate them, but it's a pain since all |
d85b733
to
544fcd3
Compare
@degemer can you rebase please ? |
@@ -77,6 +77,7 @@ def _handle_sigusr1(self, signum, frame): | |||
self._handle_sigterm(signum, frame) | |||
self._do_restart() | |||
|
|||
@classmethod | |||
def info(self, verbose=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny tiny nitpick but if you're switching to a class method, it should be
cls
instead of
self
Great work overall! Just a bunch of tiny nitpicks and it's good to merge. |
544fcd3
to
a87e6c2
Compare
Thanks Rémi! Updated and rebased. |
Added it to pidfile (instead of `/var/run/dd-agent`) and pickle files, as it should fix all issues with `dd-agent info` reporting incorrectly. It doesn't break anything, as it checks first to see if the internal `/run` exists, and fallback to the current behaviour if not. (ie `tempfile.gettempdir()`) Also: - move PidFile and Platform from util.py to their own files in `utils/` - as a consequence, move `checks/utils.py` into `utils/tailfile.py`
Before any call to `agent.py` or `dogstatsd.py` would actually create a `Agent` or `Dogstatsd` instance, without doing anaything with it (and diplaying a message about its pidfile). This commit changes this behaviour and only create them when needed.
It's a legacy command which shouldn't be needed after #1435
a87e6c2
to
e25f5c8
Compare
[core] use internal `/run` for pid and pickle files
/run
for run files (supervisor, pid and pickle), move more functions toutils/
dogstatd
anddd-agent
only when neededSee commits descriptions for more details.
It should affect:
mkdir $dd_agent/run
step)And of course https://github.com/DataDog/dd-agent-omnibus, to add a internal
/run
directory (Windows is not concerned)