'juju status' triggers overly verbose DEBUG error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
If you do:
juju status 0/lxd/0
you end up with this in the debug log:
[LOG] 0:01.889 DEBUG juju.apiserver.
[LOG] 0:01.890 DEBUG juju.apiserver.
[LOG] 0:01.892 DEBUG juju.apiserver.
[LOG] 0:01.894 DEBUG juju.apiserver.
[LOG] 0:01.897 DEBUG juju.apiserver.
[LOG] 0:01.901 DEBUG juju.apiserver.
This seems to be because of:
func NewUnitMatcher(
pattCopy := make([]string, len(patterns))
for i, pattern := range patterns {
pattCopy[i] = patterns[i]
fields := strings.
if len(fields) > 2 {
return unitMatcher{}, fmt.Errorf("pattern %q contains too many '/' characters", pattern)
}
Which, it is perfectly true that '0/lxd/0' isn't a Unit declaration, but that shouldn't be an 'ignoring matching error'. We should be treating it as 'this isn't a request for a unit, so we aren't matching on units'. *Maybe* that would still be a DEBUG message, but it should be clearer that it isn't just 'ignoring ... error'.
This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.