cmd/juju: debug-log should not take additional arguments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
Tim Penhey |
Bug Description
If you mistakenly type "juju debug-log $UNIT" instead of "juju debug-hooks $UNIT" you'll get a confusing error.
lucky(~
Warning: Permanently added '15.185.243.11' (ECDSA) to the list of known hosts.
bash: juju-gui/0: No such file or directory
Connection to 15.185.243.11 closed.
error: exit status 127
This may be related to debug-log being too close a cousin of ssh.
lucky(~
usage: juju debug-log [options] [<ssh args>...]
purpose: display the consolidated log file
options:
-e, --environment (= "nec-az3")
juju environment to operate in
Launch an ssh shell on the state server machine and tail the consolidated log file.
The consolidated log file contains log messages from all nodes in the environment.
Related branches
- Juju Engineering: Pending requested
-
Diff: 605 lines (+322/-131)8 files modifiedcmd/args.go (+23/-0)
cmd/args_test.go (+23/-0)
cmd/juju/debuglog.go (+94/-61)
cmd/juju/debuglog_test.go (+149/-56)
cmd/juju/main.go (+1/-1)
errors/errors.go (+22/-0)
errors/errors_test.go (+6/-0)
state/api/client.go (+4/-13)
tags: | added: debug-log |
Changed in juju-core: | |
assignee: | Frank Mueller (themue) → nobody |
assignee: | nobody → Dimiter Naydenov (dimitern) |
milestone: | none → 1.18.0 |
Changed in juju-core: | |
assignee: | Dimiter Naydenov (dimitern) → nobody |
Changed in juju-core: | |
assignee: | nobody → Tim Penhey (thumper) |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
milestone: | 1.20.0 → 1.19.0 |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
Yeah, I think parameters accidentally get auto-passed through to the 'ssh' subprocess, which doesn't really fit with how we want to use debug-log.
I think what we'll want to have is 'debug-log' to filter based on a unit passed in, so we should at least refuse the extra arguments until we have the functionality.