CLI: Uninformative errors when adding non-existent tags to machines
Bug #1951229 reported by
Anton Smith
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Jack Lloyd-Walters |
Bug Description
When adding tags via CLI to a machine, but the tag does not exist, the only error given to the user is "Not found", which is not particularly friendly.
The user is left to wonder "what" is not found, and may be unaware that they need to create a tag first before trying to apply it to a machine. The user may expect the tag to be auto-created simply by trying to assign it (although it is understandable that MAAS doesn't do that).
This could be addressed simply by supplying a more explanatory error, such as "No tag with that name exists. To tag this machine with the supplied tag, you need to create it first." or similar.
Related branches
~lloydwaltersj/maas:uninformative-cli-error
Merged
into
maas:master
- Anton Troyanov: Approve
- MAAS Lander: Approve
-
Diff: 90 lines (+17/-6)4 files modifiedsrc/maasserver/api/support.py (+4/-2)
src/maasserver/api/tests/test_machine.py (+4/-2)
src/maasserver/api/tests/test_node.py (+4/-2)
src/maasserver/api/tests/test_tag.py (+5/-0)
Changed in maas: | |
status: | New → Triaged |
Changed in maas: | |
assignee: | nobody → Jack Lloyd-Walters (lloydwaltersj) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 3.3.0 → 3.3.0-beta1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The error message should indeed be improved. We may consider adding an option to the API to force-create a non-existent tag, but no promises.