Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: Volume info of inspect output is incompatible with Moby API #1213

Merged

Conversation

HusterWan
Copy link
Contributor

Signed-off-by: Michael Wan [email protected]

Ⅰ. Describe what this PR did

#./docker -H unix:///run/pouchd.sock inspect eff3a2846686
[]
json: cannot unmarshal string into Go value of type struct {}

Ⅱ. Does this pull request fix one issue?

fixes #1211

Ⅲ. Describe how you did it

Ⅳ. Describe how to verify it

root@osboxes:test (zr/fix-volume-struct *) -> docker -H unix:///run/pouchd.sock inspect test2
[
    {
        "Args": null,
        "Config": {
            "Cmd": [
                "/bin/bash"
            ],
            "Entrypoint": null,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Hostname": "osboxes",
            "Image": "registry.hub.docker.com/library/ubuntu:14.04",
            "OnBuild": null,
            "Shell": null,
            "Volumes": {
                "/mnt": null
            }
        },
        "Created": "2018-04-25T11:50:50.324220921Z",
        "GraphDriver": {

Ⅴ. Special notes for reviews

@pouchrobot pouchrobot added areas/storage kind/bug This is bug report for project size/M labels Apr 25, 2018
@HusterWan HusterWan force-pushed the zr/fix-volume-struct branch from ff185bc to e3865e8 Compare April 25, 2018 12:19
@HusterWan HusterWan requested a review from rudyfly April 25, 2018 12:19
@HusterWan HusterWan force-pushed the zr/fix-volume-struct branch 2 times, most recently from d193b49 to 4fc8ea9 Compare April 25, 2018 13:58
var err error

if meta.Config.Volumes == nil {
meta.Config.Volumes = make(map[string]interface{})
}

// define a volume map to duplicate removal
volumeSlice := map[string]emptyStruct{}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to volumeSlice to volumeSet?

@HusterWan HusterWan force-pushed the zr/fix-volume-struct branch from 4fc8ea9 to 2e7c894 Compare April 25, 2018 14:16
@codecov-io
Copy link

codecov-io commented Apr 25, 2018

Codecov Report

Merging #1213 into master will decrease coverage by 0.05%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1213      +/-   ##
==========================================
- Coverage    15.7%   15.64%   -0.06%     
==========================================
  Files         171      171              
  Lines       10398    10403       +5     
==========================================
- Hits         1633     1628       -5     
- Misses       8645     8655      +10     
  Partials      120      120
Impacted Files Coverage Δ
daemon/mgr/container.go 0% <0%> (ø) ⬆️
pkg/bytefmt/bytefmt.go 88.88% <0%> (-0.95%) ⬇️

@rudyfly
Copy link
Collaborator

rudyfly commented Apr 25, 2018

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Apr 25, 2018
@rudyfly rudyfly merged commit eee66c2 into AliyunContainerService:master Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
areas/storage kind/bug This is bug report for project LGTM one maintainer or community participant agrees to merge the pull reuqest. size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] inspect output binds in volume
4 participants