[
https://issues.apache.org/jira/browse/LIBCLOUD-864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15591888#comment-15591888
]
ASF GitHub Bot commented on LIBCLOUD-864:
-----------------------------------------
GitHub user ptzianos opened a pull request:
https://github.com/apache/libcloud/pull/918
[LIBCLOUD-864] Fix Docker Driver install_image response parsing
## Changes Title (replace this with a logical title for your changes)
### Description
As reported in the corresponding bug, the docker daemon will respond in an
install_image call with all the messages produced during the procedure parsed
as json docs. In that case the response headers also contain the value
'transfer-encoding':'chunked'. That kind of response can now be parsed properly
by the DockerResponse parse_body method. Also, another small change is that
previously the id of the new image was marked in the json document as id, but
now it's marked as sha256, so the regex used to discover the id has been
updated. Finally the test data have been updated both for linux and for mac for
install_image tests where this behavior has been observed and the version of
the test fixtures has been bumped up to 124 to show the change more clearly.
### Status
Done and 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)
- [x] [Tests](http://libcloud.readthedocs.org/en/latest/testing.html)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ptzianos/libcloud
libcloud_864_docker_driver_response_parsing_fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/libcloud/pull/918.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 #918
----
commit 2f9c3a3aa1b6654ede67a2a6e63dd3e59437c6de
Author: ptzianos <[email protected]>
Date: 2016-10-20T13:49:20Z
[LIBCLOUD-864] Fix Docker Driver install_image response parsing and update
test fixtures
----
> Docker Driver install_image fails when parsing response
> -------------------------------------------------------
>
> Key: LIBCLOUD-864
> URL: https://issues.apache.org/jira/browse/LIBCLOUD-864
> Project: Libcloud
> Issue Type: Bug
> Reporter: Pavlos Tzianos
> Priority: Minor
> Labels: easyfix, newbie
>
> In previous version of the docker api when the install_image() method was
> called, the response would be one json doc with a success or fail and the id
> of the pulled image of the id. Now, in docker api 1.24 the entire sequence of
> logs produced while pulling the image is returned in a chunked response. When
> the DockerResponse.parse_body() is called it fails to parse this response and
> an exception is thrown. Also, previously the id was returned in a field
> called, now the image id is returned in a field marked sha256.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)