canonical / maas-ui

The UI for MAAS (metal-as-a-service)
https://maas.io
Other
49 stars 47 forks source link

Updating DNS records yields unexpected results #2643

Open webteam-app opened 3 years ago

webteam-app commented 3 years ago

Bug originally filed by ack at https://bugs.launchpad.net/bugs/1901905

When editing records on the Domain details page unexpected results can happen.

See the following cases:

1) create a record as "foo A 1.1.1.1" 2) remove the record. 3) a new special record appears as "1-1-1-1 A 1.1.1.1" which can't be edited/deleted from the UI (the staticipaddress can be removed via API) 4) create an A record with the same IP 5) the special record disappears

similar case:

1) create a record as "foo A 1.1.1.1" 2) update the record with the IP "2.2.2.2" 3) a special record appears as "1-1-1-1 A 1.1.1.1" 4) edit the record again with the original IP "1.1.1.1" 5) now there's a special record as "2-2-2-2 A 2.2.2.2"

it seems in both cases we should delete the original IP (or update the value in the latter case)

Another (possibly more broken) case is this:

1) create a record as "foo A 1.1.1.1" 2) create a record as "foo A 2.2.2.2" 3) change the name for the first record to "bar" 4) a special record appears as "2-2-2-2 A 2.2.2.2"

I this case we should either rename all "foo" records, or leave the second one intact.

Caleb-Ellis commented 3 years ago

Left a comment on the launchpad bug - not sure if this is an API bug or not

Caleb-Ellis commented 3 years ago

As per the email to the MAAS-design mailing list, we'll leave this for now while the core team come up with a mini-spec for updating the websocket api.