libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LIBCLOUD-813) create_record of GoDaddy DNS driver throws exception
Date Mon, 25 Apr 2016 07:59:12 GMT

    [ https://issues.apache.org/jira/browse/LIBCLOUD-813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15256030#comment-15256030
] 

ASF GitHub Bot commented on LIBCLOUD-813:
-----------------------------------------

GitHub user teemuvesala opened a pull request:

    https://github.com/apache/libcloud/pull/775

    [LIBCLOUD-813] create record and update record was not working

    ## Create record and update record issues were fixed
    
    ### Description
    
    Link to the bug report: https://issues.apache.org/jira/browse/LIBCLOUD-813
    
    Following changes were required to get those working:
    * Priority entry exists only at MX and SRV records
    * Content type of submitted data had to be application/json
    * Data parameter of connection request has to be string 
    Only MX and SRV records have pririoty. Cotent-type for data has to be json.  data param
of connection request must be string, changed that.
    
    ### Status
    
    - done, ready for review
    ### Checklist (tick everything that applies)
    
    - [X ] [Code linting](http://libcloud.readthedocs.org/en/latest/development.html#code-style-guide)
(required, can be done after the PR checks)
    - [NA ] Documentation
    - [X] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html) - executed
    - [ NA] [ICLA](http://libcloud.readthedocs.org/en/latest/development.html#contributing-bigger-changes)
(required for bigger changes)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/teemuvesala/libcloud LIBCLOUD-813-create-record-issues

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/libcloud/pull/775.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #775
    
----
commit 1d1400981f6b97eb82fc810eeb86a1d03cda8e82
Author: Teemu Vesala <teemu.vesala@qentinel.com>
Date:   2016-04-25T07:00:30Z

    Following fixes were done: Only MX and SRV records have pririoty. Content-type for data
has to be json.  data param of connection request must be string, changed that.

----


> create_record of GoDaddy DNS driver throws exception
> ----------------------------------------------------
>
>                 Key: LIBCLOUD-813
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-813
>             Project: Libcloud
>          Issue Type: Bug
>          Components: DNS
>         Environment: Linux with Python 2.7
>            Reporter: Teemu Vesala
>
> When trying to create new record to zone with GoDaddy DNS Driver it gives following stack
trace. (Note - The stacktrace  is from the version which fixes LIBCLOUD-811, because the whole
driver is unusable without that fix)
> {noformat}
> Traceback (most recent call last):
>   File "replicate.py", line 62, in <module>
>     driver.create_record(record.name, current_zone, RecordType.A, record.data)
>   File "/home/vagrant/libcloud-test/libcloud/libcloud/dns/drivers/godaddy.py", line 191,
in create_record
>     data=[new_record])
>   File "/home/vagrant/libcloud-test/libcloud/libcloud/common/base.py", line 825, in request
>     headers=headers)
>   File "/usr/lib/python2.7/httplib.py", line 979, in request
>     self._send_request(method, url, body, headers)
>   File "/usr/lib/python2.7/httplib.py", line 1013, in _send_request
>     self.endheaders(body)
>   File "/usr/lib/python2.7/httplib.py", line 975, in endheaders
>     self._send_output(message_body)
>   File "/usr/lib/python2.7/httplib.py", line 839, in _send_output
>     self.send(message_body)
>   File "/usr/lib/python2.7/httplib.py", line 811, in send
>     self.sock.sendall(data)
>   File "/usr/lib/python2.7/ssl.py", line 329, in sendall
>     v = self.send(data[count:])
>   File "/usr/lib/python2.7/ssl.py", line 298, in send
>     v = self._sslobj.write(data)
> TypeError: must be string or buffer, not list
> {noformat}
> The line at driver is:
> {code}
>         self.connection.request(
>             '/v1/domains/%s/records' % (zone.domain), method='PATCH',
>             data=[new_record])
>         id = self._get_id_of_record(name, type)
> {code}
> Same kind of structure appears at update_record also, so it might be affected with the
same kind of bug also.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message