Comment 2 for bug 1595265

Revision history for this message
Dmitry Galkin (galkindmitrii) wrote :

Hi All,

I've wrote a patch to address this issue and it allows to create TXT records that are longer than 255 chars. But there is a question below that, perhaps, somebody can answer.

[root@aio1-utility-container-10fda1d7 ~]# openstack recordset show 50bb30dd-5c84-42fc-b2e7-fc37a198ccfd aeb5681d-edca-4f30-8aec-47c3f35adbc0
+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| action | NONE |
| created_at | 2017-12-15T10:17:13.000000 |
| description | test |
| id | aeb5681d-edca-4f30-8aec-47c3f35adbc0 |
| name | test7.openstack.tech. |
| project_id | b8a1e1371d22406cb89afd936cb20d0e |
| records | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
| status | ACTIVE |
| ttl | 3600 |
| type | TXT |
| updated_at | None |
| version | 1 |
| zone_id | 50bb30dd-5c84-42fc-b2e7-fc37a198ccfd |
| zone_name | openstack.tech. |
+-------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

And can 'dig' those correctly:

[root@aio1-designate-container-7c861122 ~]# dig @127.0.0.1 test7.openstack.tech TXT

; <<>> DiG 9.9.4-RedHat-9.9.4-51.el7 <<>> @127.0.0.1 test7.openstack.tech TXT
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8658
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;test7.openstack.tech. IN TXT

;; ANSWER SECTION:
test7.openstack.tech. 3600 IN TXT "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"

;; AUTHORITY SECTION:
openstack.tech. 300 IN NS ns1-1.example.tech.

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fr Dez 15 15:47:50 UTC 2017
;; MSG SIZE rcvd: 388

The implementation touches more eventlet library rather then the designate itself.
Namely, I've changed this method - https://github.com/eventlet/eventlet/blob/master/eventlet/support/dns/rdtypes/txtbase.py#L64 to make it work and increased the limits in designate code.

My question if eventlet is a correct place to handle long strings? - If so, I''l write the test and submit to Gerrit.