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

[auto-discovery][jmx] send terminator after configs + fix execption handling #3426

Merged
merged 2 commits into from
Jul 11, 2017

Conversation

truthbk
Copy link
Member

@truthbk truthbk commented Jul 11, 2017

What does this PR do?

We need to submit the config terminator to acknowledge we've piped everything out. Done in it's own write() to ensure atomicity of the write. The jmxfetch will continue to greedily read() until the configuration terminator is received.

Motivation

Feedback in the sister PR: DataDog/jmxfetch#145

Additional Notes

The local FIFO nature of the named pipes should make this process safe, a write() should not be lost and the configuration on the other end should be received in full. Additionally, the delivery of the config terminator - which marks the end of the "piping" procedure, should be guaranteed so there should be no real possibility of having the jmxfetch side fall in a busy-loop waiting for a terminator that will never be delivered.

@truthbk truthbk added this to the 5.15 milestone Jul 11, 2017
agent.py Outdated
except Exception as e:
log.exception("unable to submit YAML via pipe: %s", e)
else:
log.info("JMX SD Config via named pipe %s successfully.", name)
Copy link
Member

Choose a reason for hiding this comment

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

logging name here doesn't really make sense :)
Maybe you could log all the names in this entry?

[auto-discovery] typo in terminator.

[auto-discovery] log names of configs piped.
@truthbk truthbk merged commit fa787e7 into master Jul 11, 2017
@truthbk truthbk deleted the jaime/jmxsdbuff branch July 11, 2017 17: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.

3 participants