Deleting Record With BIND 9 Driver Fails
Bug #1261894 reported by
Ron Rickard
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Designate |
Fix Released
|
Undecided
|
Ron Rickard | ||
Havana |
New
|
Undecided
|
Ron Rickard | ||
Icehouse |
Triaged
|
Undecided
|
Ron Rickard |
Bug Description
If you delete a record using the Designate BIND 9 driver, the record still exists in DNS.
To see this problem, create a record:
designate record-create <domain-id> --type A --name www.example.com. --data 1.2.3.4
Ensure the record exists in DNS:
host www.example.com
Delete the record:
designate record-delete <domain-id> <record-id>
The record is removed from the Designate database:
record-list <domain-id>
But, the record still exists in DNS:
host www.example.com
Subsequent activity with designate (adding a new record for example) causes the record to be deleted.
description: | updated |
tags: | added: backend |
Changed in designate: | |
milestone: | none → juno-2 |
status: | Fix Committed → Fix Released |
Changed in designate: | |
milestone: | juno-2 → 2014.2 |
To post a comment you must log in.
In designate/ storage/ api.py, we have:
@contextlib. contextmanager
def delete_record(self, context, record_id):
"""
Delete a record
:param context: RPC Context get_record( context, record_id)
self.storage. delete_ record( context, record_id)
:param record_id: Record ID to delete
"""
yield self.storage.
If we change this to:
@contextlib. contextmanager
def delete_record(self, context, record_id):
"""
Delete a record
:param context: RPC Context get_record( context, record_id)
self.storage. delete_ record( context, record_id)
:param record_id: Record ID to delete
"""
record = self.storage.
yield record
On the surface, it fixes the BIND 9 driver and we can delete records successfully. I'm guessing this is not desired however. Am I correct about this?
The real issue here is how the backend BIND 9 driver works. The code as written gets the record, passes the record to the backend, and the backend should do something with that record. With the BIND 9 driver, it doesn't do anything with the record, but constructs a new zone file and reloads it. Then the record is delete from the central storage. Unfortunately, the record was present during the zone file creation, hence the record is not being deleted.