Count record/recordsets include record/recordsets from deleted domains

Bug #1422713 reported by Kiall Mac Innes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
High
Kiall Mac Innes

Bug Description

debian@dns-installer:~$ designate domain-list
+--------------------------------------+----------------------+------------+
| id | name | serial |
+--------------------------------------+----------------------+------------+
| ed9db156-203e-4c9d-83b7-1386e0e21f1d | qatest-domain-2.com. | 1424170668 |
| 8f6da5ac-001b-4bb2-857c-c28d87d02b94 | 127.in-addr.arpa. | 1424171748 |
| 275600cd-e4b8-47a8-83e4-f7ba30c2b593 | qatest-domain-1.com. | 1424171287 |
+--------------------------------------+----------------------+------------+
debian@dns-installer:~$ designate record-list ed9db156-203e-4c9d-83b7-1386e0e21f1d
+--------------------------------------+-------+----------------------------------------+----------------------------------------------------------------------------------+
| id | type | name | data |
+--------------------------------------+-------+----------------------------------------+----------------------------------------------------------------------------------+
| 0452837a-1b9a-4688-9110-708cf9e00cd2 | SOA | qatest-domain-2.com. | ns1.example.com. create-qatest-domain-2.test.com. 1424170668 3600 600 86400 3600 |
| a9a80891-1c79-4865-9e77-25018721dde4 | AAAA | www.qatest-domain-2.com. | 2607:f0d0:1002:51::4 |
| 9006eb35-b8a8-43e4-a6b0-a53085b97341 | CNAME | www.www.qatest-domain-2.com. | example444.com. |
| 2ba908a0-f350-4517-b40f-3b4208b18614 | MX | www.qatest-domain-2.com. | mail.example555.com. |
| bfdcca45-b9a6-41ed-89fb-dba4ccb164f6 | SPF | www.qatest-domain-2.com. | mail.example555.com. |
| 1dcecb39-bbb4-41da-acde-dbbc07fa1f72 | SRV | _xmpp-server._tcp.qatest-domain-2.com. | 0 5269 xmpp.qatest-domain-2.com. |
| 591c498a-4b73-4753-998b-dba6f132a822 | A | www.qatest-domain-2.com. | 127.0.0.1 |
| cf94945f-4630-430e-9341-a4a3ddfc41ac | TXT | www.qatest-domain-2.com. | mail.example555.com. |
| c7bcb2ac-afef-45e6-b21e-3761f83fc179 | A | 127.0.0.1.qatest-domain-2.com. | 127.0.0.1 |
+--------------------------------------+-------+----------------------------------------+----------------------------------------------------------------------------------+
debian@dns-installer:~$ designate record-list 8f6da5ac-001b-4bb2-857c-c28d87d02b94
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
| id | type | name | data |
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
| d9133b8e-d743-43fb-8d04-33f43ab4e714 | SOA | 127.in-addr.arpa. | ns1.example.com. create-127.in-addr.arpa.test.com. 1424171748 3600 600 86400 3600 |
| fb72a9a5-d04f-44ae-b12b-889d1ea6ed88 | NS | 127.in-addr.arpa. | ns1.example.com. |
+--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
debian@dns-installer:~$ designate record-list 275600cd-e4b8-47a8-83e4-f7ba30c2b593
+--------------------------------------+------+----------------------+----------------------------------------------------------------------------------+
| id | type | name | data |
+--------------------------------------+------+----------------------+----------------------------------------------------------------------------------+
| 1a7fc167-e729-49e2-8183-f00f1542c7dd | NS | qatest-domain-1.com. | ns1.example.com. |
| 26c57232-41a5-4c1a-82b5-4c1c7cc2c004 | SOA | qatest-domain-1.com. | ns1.example.com. create-qatest-domain-1.test.com. 1424171287 3600 600 86400 3600 |
+--------------------------------------+------+----------------------+----------------------------------------------------------------------------------+
debian@dns-installer:~$ designate report-count-records
+---------+-------+
| Field | Value |
+---------+-------+
| records | 30 |
+---------+-------+
debian@dns-installer:~$ designate domain-create --email <email address hidden> --name kiall-test-1.com.
+-------------+--------------------------------------+
| Field | Value |
+-------------+--------------------------------------+
| description | None |
| created_at | 2015-02-17T11:48:24.000000 |
| updated_at | None |
| email | <email address hidden> |
| ttl | 3600 |
| serial | 1424173704 |
| id | 34496e9a-506d-4138-8a9a-934be715f046 |
| name | kiall-test-1.com. |
+-------------+--------------------------------------+
debian@dns-installer:~$ designate record-list 34496e9a-506d-4138-8a9a-934be715f046
+--------------------------------------+------+-------------------+---------------------------------------------------------------+
| id | type | name | data |
+--------------------------------------+------+-------------------+---------------------------------------------------------------+
| 48c8f728-aae5-4b12-b3e8-5d8cf926c8ce | SOA | kiall-test-1.com. | ns1.example.com. kiall.hp.com. 1424173704 3600 600 86400 3600 |
| 6618d7d7-7404-4e72-aed5-eb901bc8efca | NS | kiall-test-1.com. | ns1.example.com. |
+--------------------------------------+------+-------------------+---------------------------------------------------------------+
debian@dns-installer:~$ designate report-count-records
+---------+-------+
| Field | Value |
+---------+-------+
| records | 32 |
+---------+-------+
debian@dns-installer:~$ designate domain-delete 34496e9a-506d-4138-8a9a-934be715f046

debian@dns-installer:~$ designate report-count-records
+---------+-------+
| Field | Value |
+---------+-------+
| records | 32 |
+---------+-------+

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.openstack.org/156564

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/156564
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=60c89f620a1fa89a668c809f248d40d54ba18394
Submitter: Jenkins
Branch: master

commit 60c89f620a1fa89a668c809f248d40d54ba18394
Author: Kiall Mac Innes <email address hidden>
Date: Tue Feb 17 12:25:40 2015 +0000

    Ensure count record/recordsets respect deleted domains

    Currently, deleted records/recordsets are included in the
    count_records and count_recordsets method results.

    Closes-Bug: 1422713
    Change-Id: I876c762a0b6dafcb2d60072cc4738ccf6003e7f8

Changed in designate:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in designate:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in designate:
milestone: kilo-3 → 2015.1.0
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.