Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Agent introspection command improvements #7465
Conversation
jameinel
approved these changes
Jun 7, 2017
This changes the actual output of the scripts. So my personal bias is to probably put it into 2.2.0 rather than waiting for 2.2.1 and having a user-visible compatibility change in a point release. (people using <THIS have to munge the output to make it work with other tooling, and would break if they munge after this.)
| @@ -800,7 +800,7 @@ func (s *MachineSuite) TestMachineAgentSymlinks(c *gc.C) { | ||
| _, done := s.waitForOpenState(c, a) | ||
| // Symlinks should have been created | ||
| - for _, link := range []string{jujuRun, jujuDumpLogs} { | ||
| + for _, link := range []string{jujuRun, jujuDumpLogs, jujuIntrospect} { |
| @@ -820,7 +820,7 @@ func (s *MachineSuite) TestMachineAgentSymlinkJujuRunExists(c *gc.C) { | ||
| defer a.Stop() | ||
| // Pre-create the symlinks, but pointing to the incorrect location. | ||
| - links := []string{jujuRun, jujuDumpLogs} | ||
| + links := []string{jujuRun, jujuDumpLogs, jujuIntrospect} |
|
!!doesthisworkatleast!! |
evilnick
referenced this pull request
in juju/docs
Jun 7, 2017
Open
Add new commands to debug/troubleshooting docs #1893
|
$$covfefe$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit b2aa2af
into
juju:2.2
Jun 8, 2017
1 check passed
github-check-merge-juju
Ran tests against PR. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details
| +const introspectCommandDoc = ` | ||
| +Introspect Juju agents running on this machine. | ||
| + | ||
| +The juju-introspect can be used to expose the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
axw commentedJun 7, 2017
Description of change
This branch brings several improvements to the
agent introspection shell functions:
introspection socket, which was causing problems
with the CPU profile endpoint. Instead, we add
a new "juju-introspect" command/symlink to jujud,
which serves as a frontend to the introspection
socket. The helpers for getting specific profiles
are left as bash functions.
flag which, if specified, causes the command to
expose the socket over HTTP. This enables the
user to use "go tool pprof" with the HTTP endpoint,
for example.
will capture a CPU profile. The first (optional)
argument is interpreted as the number of seconds
to sample for.
Since we are no longer writing out the raw HTTP output,
the output of the various juju-foo-profile functions
no longer include the HTTP response header, so the
output can be fed directly into "go tool pprof".
By moving the main frontend out of the bash script and
into Go code, we get a step closer to having
introspection on Windows. We still need an alternative
to the abstract domain sockets solution that we have
today (probably named pipes?)
QA steps
(then on another machine, go tool pprof path/to/jujud http::6060)
Documentation changes
We should update any debugging docs we have with mention of the new "juju-cpu-profile" helper, and possibly the "juju-introspect --listen=..." command.
Bug reference
None.