API returns incorrect response when a pool has multiple ns records

Bug #1493942 reported by Paul Glass
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Critical
Endre Karlson

Bug Description

To reproduce:

Update a zone's pool to have multiple different NS records:

PATCH /v2/pools/794ccc2c-d751-44fe-b57f-8894c9f5c842
{
    "ns_records": [{
        "hostname": "ns1.example.com.",
        "priority": 1
    },{
        "hostname": "ns2.example.com.",
        "priority": 1
    },{
        "hostname": "ns3.example.com.",
        "priority": 1
    }]
}

Then fetch the NS records for a zone:

GET /v2/zones/e2634cf2-0e9c-4730-9cb1-4720bfca06f9/recordsets?type=NS
{
  "recordsets": [
    {
      ...
      "records": [
        "ns3.example.com.",
        "ns3.example.com.",
        "ns3.example.com."
      ],
      "type": "NS",
      ...
    }
  ...
}

The API returns the right number of NS records, but all of the records are the same when they should match the ns_records list for the pool.

Other notes:
- Querying the nameserver(s) will return the correct NS records
- This doesn't seem to be a problem with zone exports. An exported zone will have the correct NS records based on the pool.

Kiall Mac Innes (kiall)
Changed in designate:
milestone: none → liberty-rc1
Tim Simmons (timsim)
Changed in designate:
status: New → Triaged
importance: Undecided → Critical
Kiall Mac Innes (kiall)
Changed in designate:
assignee: nobody → Federico Ceratto (federico-ceratto)
Kiall Mac Innes (kiall)
Changed in designate:
assignee: Federico Ceratto (federico-ceratto) → nobody
Kiall Mac Innes (kiall)
Changed in designate:
assignee: nobody → Endre Karlson (endre-karlson)
status: Triaged → In Progress
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/226317

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

Reviewed: https://review.openstack.org/226317
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=93d572e47a8d4b59462ddfea33cd6224adb9b55d
Submitter: Jenkins
Branch: master

commit 93d572e47a8d4b59462ddfea33cd6224adb9b55d
Author: Endre Karlson <email address hidden>
Date: Tue Sep 22 15:18:10 2015 +0200

    Ensure unique records when listing recordsets

    Add a test also to always ensure that the records are unique.

    Change-Id: Iddc451ec2c99c51260273fbbabebb1c00c79e74d
    Closes-Bug: #1493942

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: liberty-rc1 → 1.0.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.