Designate DNS – DNS maximum name length is limited to 254 instead of the 255 from the RFC

Bug #1974143 reported by Arkady Shtempler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Confirmed
Low
Unassigned

Bug Description

1) API that is trying to create a zone of name length: 254 is getting 400 (expected 200 OK)
2022-05-19 07:37:25.009 916426 INFO tempest.lib.common.rest_client [req-193f7120-6c77-4f44-8121-dfdccf8bf6c5 ] Request (DesignateLimit:test_max_zone_name_length): 400 POST https://192.168.122.201/dns/v2/zones 0.013s
2022-05-19 07:37:25.010 916426 DEBUG tempest.lib.common.rest_client [req-193f7120-6c77-4f44-8121-dfdccf8bf6c5 ] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"name": "ikjltejixtflqfbexpkangnsniibgfnrpqfaydbqmvxzodearrplxdxsatfqtij.syhrvcigwasmoaoqyyjrumpqppscrcjogbsbofgmjsvsdxbvucajxljfxowgtdx.wmpfhsourmsjxczeqinpdxwhcyiobarvavykhscfsngycdflpueontnvupyvuqw.dtetvgyzekpwyavylxszwygbsdekphoojdcbjzqfqfxsrkmpqqghcallpfngdy.", "email": "<email address hidden>", "ttl": 42564, "description": "tempest-test-zone-847732390", "attributes": {"attribute_key": "tempest-attribute_value-1731697650"}}
    Response - Headers: {'date': 'Thu, 19 May 2022 07:37:25 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-type': 'application/json', 'content-length': '451', 'x-openstack-request-id': 'req-193f7120-6c77-4f44-8121-dfdccf8bf6c5', 'connection': 'close', 'status': '400', 'content-location': 'https://192.168.122.201/dns/v2/zones'}
        Body: b'{"code": 400, "type": "invalid_object", "message": "Provided object is not valid. Got a ValueError error with message Domain ikjltejixtflqfbexpkangnsniibgfnrpqfaydbqmvxzodearrplxdxsatfqtij.syhrvcigwasmoaoqyyjrumpqppscrcjogbsbofgmjsvsdxbvucajxljfxowgtdx.wmpfhsourmsjxczeqinpdxwhcyiobarvavykhscfsngycdflpueontnvupyvuqw.dtetvgyzekpwyavylxszwygbsdekphoojdcbjzqfqfxsrkmpqqghcallpfngdy. is invalid", "request_id": "req-193f7120-6c77-4f44-8121-dfdccf8bf6c5"}' _log_request_full /opt/stack/tempest/tempest/lib/common/rest_client.py:450

2) API that is trying to create the Recordset of name length 254 gutting 400 (Expected 200 OK)
2022-05-19 07:40:58.030 916642 INFO tempest.lib.common.rest_client [req-92aa9989-7a5a-4740-bf60-923589f989ef ] Request (DesignateLimit:test_max_recordset_name_length): 400 POST https://192.168.122.201/dns/v2/zones/3e2bf45d-64cf-4766-858b-d644596e4b38/recordsets 0.013s
2022-05-19 07:40:58.030 916642 DEBUG tempest.lib.common.rest_client [req-92aa9989-7a5a-4740-bf60-923589f989ef ] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"type": "A", "name": "cegr.pfnenducgvvgtbozzcdsasgewwpsquwunszoelgeqppkvlshoqrsvecyomrbjkv.nebrjwlbvkijvgybwpefyecvicdkkpnkoityuccroopmbwzlonjxbmqjewswnbe.pgyrwmglazbykhkxvdiomggyjpysioehbxuejqilbabshgjynolfzbypkafijpa.mtxgdazgrwvsjjxnelvrrxinyewqzwuvoebqeaugdnypythzhnoxhukkf.", "records": ["255.62.75.14"], "ttl": 45378}
    Response - Headers: {'date': 'Thu, 19 May 2022 07:40:58 GMT', 'server': 'Apache/2.4.41 (Ubuntu)', 'content-type': 'application/json', 'content-length': '454', 'x-openstack-request-id': 'req-92aa9989-7a5a-4740-bf60-923589f989ef', 'connection': 'close', 'status': '400', 'content-location': 'https://192.168.122.201/dns/v2/zones/3e2bf45d-64cf-4766-858b-d644596e4b38/recordsets'}
        Body: b'{"code": 400, "type": "invalid_object", "message": "Provided object is not valid. Got a ValueError error with message Host name cegr.pfnenducgvvgtbozzcdsasgewwpsquwunszoelgeqppkvlshoqrsvecyomrbjkv.nebrjwlbvkijvgybwpefyecvicdkkpnkoityuccroopmbwzlonjxbmqjewswnbe.pgyrwmglazbykhkxvdiomggyjpysioehbxuejqilbabshgjynolfzbypkafijpa.mtxgdazgrwvsjjxnelvrrxinyewqzwuvoebqeaugdnypythzhnoxhukkf. is invalid", "request_id": "req-92aa9989-7a5a-4740-bf60-923589f989ef"}' _log_request_full /opt/stack/tempest/tempest/lib/common/rest_client.py:450
2022-05-19 07:40:58.097 916642 INFO tempest.lib.common.rest_client [req-a13d6eac-b31d-4279-8ef1-3fd263845470 ] Request (DesignateLimit:_run_cleanups): 202 DELETE https://192.168.122.201/dns/v2/zones/3e2bf45d-64cf-4766-858b-d644596e4b38 0.065s

Note: Test patch for reproducing: https://review.opendev.org/c/openstack/designate-tempest-plugin/+/823167

Revision history for this message
Michael Johnson (johnsom) wrote :

I did a quick investigation into this.
The quota check is working correctly, but farther down in the code there is a regex that is limiting the length to 254. After fixing that I ran into another issue with the SOA recordset.

It looks like there are a few layers to this one.

Changed in designate:
status: New → Confirmed
importance: Undecided → Low
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.