The 'next' link not shown

Bug #1614627 reported by James Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Confirmed
Undecided
sonu

Bug Description

Reproduce steps:

1. openstack zone create show.bug.com. --email <email address hidden>

2. openstack recordset create 90783c85-8657-4413-8c24-2e35116fdf9e email-1.show.bug.com. --type A --records "10.0.0.1" "10.0.0.2"

3. openstack recordset create 90783c85-8657-4413-8c24-2e35116fdf9e email-2.show.bug.com. --type A --records "10.0.0.3"

The following filtering request shows there are 2 matched rrsets, but only one shown up and the 'next' link is missing.

curl -H "x-auth-token: <T>" "http://10.0.2.15:9001/v2/zones/90783c85-8657-4413-8c24-2e35116fdf9e/recordsets?data=10*&limit=2" | jq .

{
  "metadata": {
    "total_count": 2
  },
  "links": {
    "self": "http://10.0.2.15:9001/v2/zones/90783c85-8657-4413-8c24-2e35116fdf9e/recordsets?data=10%2A&limit=2"
  },
  "recordsets": [
    {
      "name": "email-1.show.bug.com.",
      "id": "91c0b00b-f531-4724-90b9-53620b732f93",
      "type": "A",
      "project_id": "92937889c00c4a6bac604df25ccc60e5",
      "zone_name": "show.bug.com.",
      "action": "CREATE",
      "ttl": null,
      "status": "PENDING",
      "description": null,
      "links": {
        "self": "http://10.0.2.15:9001/v2/zones/90783c85-8657-4413-8c24-2e35116fdf9e/recordsets/91c0b00b-f531-4724-90b9-53620b732f93"
      },
      "created_at": "2016-07-15T20:45:13.000000",
      "updated_at": null,
      "records": [
        "10.0.0.2",
        "10.0.0.1"
      ],
      "zone_id": "90783c85-8657-4413-8c24-2e35116fdf9e",
      "version": 1
    }
  ]
}

Tim Simmons (timsim)
Changed in designate:
importance: Undecided → Critical
status: New → Triaged
milestone: none → rc1
Revision history for this message
James Li (james-li-3) wrote :

The fix should be tested to make sure it won't impact the performance of recordsets API (i.e. /v2/recordsets) under a large-scale dataset.

sonu (sonu-bhumca11)
Changed in designate:
assignee: nobody → sonu (sonu-bhumca11)
Revision history for this message
Graham Hayes (grahamhayes) wrote :
Download full text (3.2 KiB)

GET /v2/zones/1456f858-d2ff-4fc8-8f77-11c39a0e2421/recordsets?limit=3 HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Connection: keep-alive
Host: 192.168.27.100:9001
User-Agent: HTTPie/0.9.6
X-Auth-Token: 1a5ec4f079ce4f808df717952dd636ac

HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 2018
Content-Type: application/json; charset=UTF-8
Date: Fri, 16 Sep 2016 15:15:46 GMT
X-Openstack-Request-Id: req-2ddb9e13-1cfe-4ad4-816d-158468a4e034

{
    "links": {
        "next": "http://192.168.27.100:9001/v2/zones/1456f858-d2ff-4fc8-8f77-11c39a0e2421/recordsets?limit=3&marker=8fbb4277-03ce-44a2-80d5-84b624c215fa",
        "self": "http://192.168.27.100:9001/v2/zones/1456f858-d2ff-4fc8-8f77-11c39a0e2421/recordsets?limit=3"
    },
    "metadata": {
        "total_count": 4
    },
    "recordsets": [
        {
            "action": "NONE",
            "created_at": "2016-09-15T18:28:56.000000",
            "description": null,
            "id": "04beec38-732b-4452-99f7-d026a47f0f86",
            "links": {
                "self": "http://192.168.27.100:9001/v2/zones/1456f858-d2ff-4fc8-8f77-11c39a0e2421/recordsets/04beec38-732b-4452-99f7-d026a47f0f86"
            },
            "name": "example12.com.",
            "project_id": "4b4b1712e69a45ba8cc85af35368608b",
            "records": [
                "ns1.devstack.org. graham.hayes.ie. 1473964493 3531 600 86400 3600"
            ],
            "status": "ACTIVE",
            "ttl": null,
            "type": "SOA",
            "updated_at": "2016-09-15T18:34:53.000000",
            "version": 3,
            "zone_id": "1456f858-d2ff-4fc8-8f77-11c39a0e2421",
            "zone_name": "example12.com."
        },
        {
            "action": "NONE",
            "created_at": "2016-09-15T18:28:56.000000",
            "description": null,
            "id": "f154dbbb-7aeb-4f2d-9b33-8049d921a8b5",
            "links": {
                "self": "http://192.168.27.100:9001/v2/zones/1456f858-d2ff-4fc8-8f77-11c39a0e2421/recordsets/f154dbbb-7aeb-4f2d-9b33-8049d921a8b5"
            },
            "name": "example12.com.",
            "project_id": "4b4b1712e69a45ba8cc85af35368608b",
            "records": [
                "ns1.devstack.org."
            ],
            "status": "ACTIVE",
            "ttl": null,
            "type": "NS",
            "updated_at": null,
            "version": 1,
            "zone_id": "1456f858-d2ff-4fc8-8f77-11c39a0e2421",
            "zone_name": "example12.com."
        },
        {
            "action": "NONE",
            "created_at": "2016-09-15T18:30:41.000000",
            "description": null,
            "id": "8fbb4277-03ce-44a2-80d5-84b624c215fa",
            "links": {
                "self": "http://192.168.27.100:9001/v2/zones/1456f858-d2ff-4fc8-8f77-11c39a0e2421/recordsets/8fbb4277-03ce-44a2-80d5-84b624c215fa"
            },
            "name": "www.example12.com.",
            "project_id": "4b4b1712e69a45ba8cc85af35368608b",
            "records": [
                "127.0.0.1"
            ],
            "status": "ACTIVE",
            "ttl": null,
            "type": "A",
            "updated_at": null,
            "version": 1,
            "zone_id...

Read more...

Changed in designate:
status: Triaged → Incomplete
milestone: rc1 → none
importance: Critical → Undecided
Revision history for this message
Graham Hayes (grahamhayes) wrote :

Seems to be giving the link in the latest from master ...

Revision history for this message
James Li (james-li-3) wrote :

Please follow the steps to trigger the bug. The *IP addresses* are critical to reproduce it.

I think the bug is not in the object rendering code, but in the code that handles DB joins.

Changed in designate:
status: Incomplete → Confirmed
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.