409 Duplicate zone returned when recreating previously deleted zone.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Designate |
Expired
|
Undecided
|
Unassigned |
Bug Description
Following creation of a zone in designate if the zone is deleted and at a later date recreated a 409 error is returned stating "Duplicate zone"...
For example...
curl -X POST -H "X-Auth-Token: a0a0a46efcfb4c6
> "name": "testdomain.
> "ttl": 3600,
> "email": "<email address hidden>"
> }' "http://
{
"created_at": "2017-02-
"description": null,
"email": "<email address hidden>",
"id": "b6aa8ead-
"name": "testdomain.
"serial": 1487028815,
"ttl": 3600,
"updated_at": null
}
curl -X DELETE -H "X-Auth-Token: a0a0a46efcfb4c6
> "name": "testdomain.
> "ttl": 3600,
> "email": "<email address hidden>"
> }' "http://
curl -X GET -H "X-Auth-Token: a0a0a46efcfb4c6
{
"domains": []
}
curl -X POST -H "X-Auth-Token: a0a0a46efcfb4c6
> "name": "testdomain.
> "ttl": 3600,
> "email": "<email address hidden>"
> }' "http://
{"message": "Duplicate Zone", "code": 409, "type": "duplicate_domain", "request_id": "req-e916ea37-
As you can see, if I create a domain, delete the domain and then try and recreate it refuses as the domain already exists. Here is the version of designate I have been running this against...
dpkg -l | grep designate
ii designate 1:2.0.0-3~bpo8+1 all OpenStack DNS as a Service - metapackage
ii designate-agent 1:2.0.0-3~bpo8+1 all OpenStack DNS as a Service - agent
ii designate-api 1:2.0.0-3~bpo8+1 all OpenStack DNS as a Service - API server
ii designate-central 1:2.0.0-3~bpo8+1 all OpenStack DNS as a Service - central daemon
ii designate-common 1:2.0.0-3~bpo8+1 all OpenStack DNS as a Service - common files
ii designate-mdns 1:2.0.0-3~bpo8+1 all OpenStack DNS as a Service - mdns
ii designate-
ii designate-sink 1:2.0.0-3~bpo8+1 all OpenStack DNS as a Service - sink
ii designate-
ii python-designate 1:2.0.0-3~bpo8+1 all OpenStack DNS as a Service - Python libs
ii python-
Hopefully I can take a look at getting this patched, although I am largely unfamiliar with the Designate code base, it's not a project I tend to get involved with too often.
Best Regards,
Rob
Interestingly I see an ugly error in the pool-manager...
2017-02-13 23:45:41.412 21180 ERROR designate. pool_manager. service [req-4f960f7f- cdc7-480c- 8606-d0edf88c46 19 - - - - -] No targets for <Pool id:'794ccc2c- d751-44fe- b57f-8894c9f5c8 42' name:'default'> found.
Sure enough in the DB there are no targets for this pool in the targets table even though there were included in the config at the time of initialising the db as seen below.
####### ####### ####### ####### #######
## Pool Configuration
#######
# This section does not have the defaults filled in but demonstrates an
# example pool / server set up. Different backends will have different options.
[pool:794ccc2c- d751-44fe- b57f-8894c9f5c8 42] 96c2-4189- 93fc-1dc95a08b0 12 736f-4f0a- 831b-039a415c48 1e
nameservers = 0f66b842-
targets = f26e0b32-
#also_notifies = 192.0.2.1:53, 192.0.2.2:53
[pool_nameserve r:0f66b842- 96c2-4189- 93fc-1dc95a08b0 12]
port = 53
host = 127.0.0.1
[pool_target: f26e0b32- 736f-4f0a- 831b-039a415c48 1e]
options = port:53, host:127.0.0.1
masters = 127.0.0.1:5354
type = bind9
I see some similar comments in http:// lists.openstack .org/pipermail/ openstack- operators/ 2016-August/ 011150. html so I had a go at performing the following... https:/ /github. com/openstack/ designate/ blob/master/ doc/source/ upgrade/ mitaka. rst but I think there is something more fundamental with my installation which is faulty.
Either way I installed via the most up to date docs I could find here... http:// docs.openstack. org/developer/ designate/ install/ ubuntu- liberty. html so I am fairly confident maybe others are having an issue with this.