When filtering nodes by hostname in the API, have to use ".local" domain instead of the domain set for the cluster

Bug #1482784 reported by Jason Hobbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Undecided
Unassigned
1.8
Invalid
Low
Unassigned

Bug Description

This is with 1.8.0.

My node's name shows up as "suangi.oil" in the UI, and in the API, but to find it in a filter via 'nodes list', I have to specify the hostname as 'suangi.local'. Neither 'suangi' nor 'suangi.oil' work. I would be fine with 'suangi' not working but 'suangi.oil' should definitely work.

ubuntu@doberman-dev:~/oil-ci+save-maas-install-logs/oil_ci/tests/test_data$ maas jason nodes list hostname=suangi.oil
Success.
Machine-readable output follows:
[]
ubuntu@doberman-dev:~/oil-ci+save-maas-install-logs/oil_ci/tests/test_data$ maas jason nodes list hostname=suangi
Success.
Machine-readable output follows:
[]
ubuntu@doberman-dev:~/oil-ci+save-maas-install-logs/oil_ci/tests/test_data$ maas jason nodes list hostname=suangi.local
Success.
Machine-readable output follows:
[
    {
        "ip_addresses": [
            "10.245.0.187"
        ],
...
        "hostname": "suangi.oil",
...
        "resource_uri": "/MAAS/api/1.0/nodes/node-f665a2ca-ae16-11e3-9074-00163efc5068/"
    }
]

Tags: api oil
Revision history for this message
Lee Trager (ltrager) wrote :

On trunk MAAS only returns the host if you only include the hostname, including any domain name or .local returns nothing.

$ maas maas nodes list hostname=maas-test-1.maas
Success.
Machine-readable output follows:
[]
$ maas maas nodes list hostname=maas-test-1.local
Success.
Machine-readable output follows:
[]
 maas maas nodes list hostname=maas-test-1
Success.
Machine-readable output follows:
[
    {
...
        "hostname": "maas-test-1.maas",
...
        "resource_uri": "/MAAS/api/1.0/nodes/node-b11c7fd8-3c66-11e5-9997-525400009441/"
    }
]

Gavin Panella (allenap)
Changed in maas:
status: New → Invalid
tags: added: api
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Why is this invalid?

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.