'juju status' triggers overly verbose DEBUG error

Bug #1774104 reported by John A Meinel
6
This bug affects 1 person
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.client ignoring matching error: pattern "0/lxd/0" contains too many '/' characters
[LOG] 0:01.890 DEBUG juju.apiserver.client ignoring matching error: pattern "0/lxd/0" contains too many '/' characters
[LOG] 0:01.892 DEBUG juju.apiserver.client ignoring matching error: pattern "0/lxd/0" contains too many '/' characters
[LOG] 0:01.894 DEBUG juju.apiserver.client ignoring matching error: pattern "0/lxd/0" contains too many '/' characters
[LOG] 0:01.897 DEBUG juju.apiserver.client ignoring matching error: pattern "0/lxd/0" contains too many '/' characters
[LOG] 0:01.901 DEBUG juju.apiserver.client ignoring matching error: pattern "0/lxd/0" contains too many '/' characters

This seems to be because of:
func NewUnitMatcher(patterns []string) (unitMatcher, error) {
    pattCopy := make([]string, len(patterns))
    for i, pattern := range patterns {
        pattCopy[i] = patterns[i]
        fields := strings.Split(pattern, "/")
        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'.

Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

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.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.