Controller type displays as "Undefined"

Bug #2002550 reported by Nick De Villiers
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Jack Lloyd-Walters

Bug Description

On the controller listing page, the controller type should display whether a controller is a Region controller, Rack controller, or both. The UI is currently displaying "undefined".

I believe the cause of this is the backend not providing the `node_type_display` property, which the frontend uses to display the appropriate node type.

Related branches

Revision history for this message
Nick De Villiers (nickdv99) wrote :
Revision history for this message
Jack Lloyd-Walters (lloydwaltersj) wrote :

Where was this behaviour seen? Might need to see the websocket response in the console for this.

My assumption is this is caused by the data not being correctly populated by `websockets.handlers.node:NodeHandler.dehydrate`, but that will need a little more testing.

Changed in maas:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Jack Lloyd-Walters (lloydwaltersj)
Revision history for this message
Nick De Villiers (nickdv99) wrote :

You can see this on the controller listing page, under the "Type" column. Each item shows as "undefined" instead of the actual type of the controller. As for the websocket response:

{
    "type": 1,
    "request_id": 5,
    "rtype": 0,
    "result": [
        {
            "id": 1,
            "system_id": "xf64c7",
            "hostname": "NICKDV-UBUNTU",
            "domain": {
                "id": 0,
                "name": "maas"
            },
            "status": "Deployed",
            "node_type": 4,
            "cpu_count": 24,
            "cpu_speed": 4672,
            "last_image_sync": "Wed, 11 Jan. 2023 16:44:43",
            "permissions": [
                "edit",
                "delete"
            ],
            "fqdn": "NICKDV-UBUNTU.maas",
            "actions": [
                "set-zone",
                "import-images",
                "delete"
            ],
            "link_type": "controller",
            "tags": [],
            "architecture": "amd64/generic",
            "osystem": "ubuntu",
            "distro_series": "kinetic",
            "memory": 32,
            "description": "",
            "status_code": 6,
            "simple_status": "Deployed",
            "vlans_ha": {
                "true": 0,
                "false": 6
            },
            "versions": {
                "install_type": "snap",
                "current": {
                    "version": "3.4.0~alpha1-13430-g.b872597ef",
                    "snap_revision": "25522"
                },
                "origin": "latest/edge",
                "up_to_date": true,
                "issues": []
            },
            "service_ids": [
                1,
                2,
                3,
                4,
                5,
                6,
                7,
                8,
                9,
                10,
                11,
                12,
                13,
                14,
                15
            ],
            "vault_configured": false
        }
    ]
}

`node_type` is being sent, however `node_type_display` is not. I believe its removal is due to the ongoing "faster machine list" spike. Theoretically this could be fixed in the frontend so as not to impede progress on the spike, we do have a util for fetching the display type based on just the `node_type` value. Ultimately depends what the rest of the team would rather do.

Changed in maas:
milestone: none → 3.4.0
status: Triaged → Fix Committed
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.0-beta1
Alberto Donato (ack)
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.