Comment 2 for bug 1938388

Revision history for this message
Vladimir Grevtsev (vlgrevtsev) wrote :

Quick reproducer:

# check if that's the only machine with the hostname in MAAS
ubuntu@OrangeBox84:~$ maas admin machines read | grep "node07"
        "hostname": "node07",
        "fqdn": "node07.maas",

# expected, since this machine has .maas domain
ubuntu@OrangeBox84:~$ maas admin machine update sgk3gy hostname=node07
{"hostname": ["Node with this Hostname already exists."]}

# creating new domain zone
ubuntu@OrangeBox84:~$ maas admin domains create name=testzone
Success.
Machine-readable output follows:
{
    "authoritative": true,
    "ttl": null,
    "id": 1,
    "is_default": false,
    "resource_record_count": 0,
    "name": "testzone",
    "resource_uri": "/MAAS/api/2.0/domains/1/"
}

# updating machine - moving to new domain zone
ubuntu@OrangeBox84:~$ maas admin machine update sgk3gy domain=testzone
Success.
Machine-readable output follows:
<omitted>

# expected: Success
# actual result: machine cannot be assigned with fqdn node07.testzone
ubuntu@OrangeBox84:~$ maas admin machine update sgk3gy hostname=node07
{"hostname": ["Node with this Hostname already exists."]}

For the record, UI doesn't show anything (even any error) as well.