REST API does not provide tag_names field for controllers

Bug #1790147 reported by Louis Laporte
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Mike Pontillo
2.4
Fix Committed
Medium
Mike Pontillo

Bug Description

When a region controller is tagged following this steps:

$ maas my-maas region-controllers read | jq -rc .[].system_id
g8tmfb

$ maas my-maas tags create name=deployer
Success.
Machine-readable output follows:
{
    "kernel_opts": "",
    "definition": "",
    "name": "deployer",
    "comment": "",
    "resource_uri": "/MAAS/api/2.0/tags/deployer/"
}

$ maas my-maas tag update-nodes deployer add=g8tmfb
Success.
Machine-readable output follows:
{
    "added": 1,
    "removed": 0
}

$ maas my-maas region-controller read g8tmfb | jq .tag_names
null

$ maas my-maas node read g8tmfb | jq .tag_names
null

I was expecting to retrieve the tag in the region controller definition, same as machine does.
In the web UI region controller tag is present.

Example for compute node:
$ maas my-maas machine read pm6pxt | jq .tag_names
["compute"]

The only way the tag_names of the region controller can be retrieved is to iterate over all tags and check if the region controller ID is present.

$ maas my-maas tag nodes deployer | jq -rc .[].system_id
g8tmfb

Related branches

Changed in maas:
status: New → Triaged
importance: Undecided → Medium
milestone: none → 2.5.0
summary: - Region-controller no field tag_names
+ REST API does not provide tag_names field for controllers
Changed in maas:
assignee: nobody → Mike Pontillo (mpontillo)
milestone: 2.5.0 → 2.4.x
milestone: 2.4.x → 2.5.0beta1
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
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.