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

reflect.Value.Set using unaddressable value #972

Closed
smur89 opened this issue Mar 27, 2018 · 3 comments · Fixed by #983
Closed

reflect.Value.Set using unaddressable value #972

smur89 opened this issue Mar 27, 2018 · 3 comments · Fixed by #983
Assignees
Labels

Comments

@smur89
Copy link

smur89 commented Mar 27, 2018


BUG REPORT INFORMATION

Description

We recently split our docker-compose.yml file into multiple yaml files and upgraded to v18.03 to take advantage of the added native support for this as per https://github.com/docker/cli/pull/569/files

When deploying with the following command, we get an error and our stack fails to deploy.

docker stack deploy -c ../base-services.yml -c base-services.override.yaml -c ../kmp-services.yml -c kmp-services.override.yml -c ../monitoring.yml -c monitoring.override.yml kmp-staging

Error:

panic: reflect: reflect.Value.Set using unaddressable value

The problem was related to having a network defined in our yaml files. When we removed this we didn't see this error any more.

Seems like a better error could be shown here

 docker stack deploy -c ../base-services.yml -c base-services.override.yaml -c ../kmp-services.yml -c kmp-services.override.yml -c ../monitoring.yml -c monitoring.override.yml kmp-staging

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

[root@awssparkmaster01 staging]# export TAG=staging; docker stack deploy -c ../base-services.yml -c base-services.override.yaml -c ../kmp-services.yml -c kmp-services.override.yml -c ../monitoring.yml -c monitoring.override.yml kmp-staging
panic: reflect: reflect.Value.Set using unaddressable value

goroutine 1 [running]:
reflect.flag.mustBeAssignable(0x97)
        /usr/local/go/src/reflect/value.go:228 +0x17d
reflect.Value.Set(0x1556e40, 0xc42053f7b8, 0x97, 0x1556e40, 0xc4205d7f00, 0x97)
        /usr/local/go/src/reflect/value.go:1351 +0x2f
github.com/docker/cli/vendor/github.com/imdario/mergo.deepMerge(0x1556e40, 0xc42053f7b8, 0x97, 0x1556e40, 0xc42053f738, 0x97, 0xc4204b6c30, 0x3, 0xc4205d7e80, 0x0, ...)
        /go/src/github.com/docker/cli/vendor/github.com/imdario/mergo/merge.go:133 +0x152e
github.com/docker/cli/vendor/github.com/imdario/mergo.deepMerge(0x1689a20, 0xc42053f7a8, 0x99, 0x1689a20, 0xc42053f728, 0x99, 0xc4204b6c30, 0x2, 0xc4205d7e80, 0x0, ...)
        /go/src/github.com/docker/cli/vendor/github.com/imdario/mergo/merge.go:68 +0x1465
github.com/docker/cli/vendor/github.com/imdario/mergo.deepMerge(0x176ae40, 0xc42053f780, 0x99, 0x176ae40, 0xc42053f700, 0x99, 0xc4204b6c30, 0x1, 0xc4205d7e80, 0x0, ...)
        /go/src/github.com/docker/cli/vendor/github.com/imdario/mergo/merge.go:68 +0x1465
github.com/docker/cli/vendor/github.com/imdario/mergo.deepMerge(0x160f1e0, 0xc4203b1070, 0x195, 0x160f1e0, 0xc4203b1078, 0x195, 0xc4204b6c30, 0x0, 0xc4205d7e80, 0x195, ...)
        /go/src/github.com/docker/cli/vendor/github.com/imdario/mergo/merge.go:104 +0x69c
github.com/docker/cli/vendor/github.com/imdario/mergo._map(0x1548fa0, 0xc4203b1070, 0x1548fa0, 0xc4203b1078, 0x0, 0x0, 0x0, 0x1, 0xc4203b1078)
        /go/src/github.com/docker/cli/vendor/github.com/imdario/mergo/map.go:159 +0x3d4
github.com/docker/cli/vendor/github.com/imdario/mergo.Map(0x1548fa0, 0xc4203b1070, 0x1548fa0, 0xc4203b1078, 0x0, 0x0, 0x0, 0x0, 0x0)
        /go/src/github.com/docker/cli/vendor/github.com/imdario/mergo/map.go:132 +0x71
github.com/docker/cli/cli/compose/loader.mergeNetworks(0xc42063cc60, 0xc420808db0, 0xc420255ec0, 0x0, 0x0)
        /go/src/github.com/docker/cli/cli/compose/loader/merge.go:221 +0xb7
github.com/docker/cli/cli/compose/loader.merge(0xc42056e100, 0x6, 0x8, 0xc4200769c0, 0x42, 0xc420104180)
        /go/src/github.com/docker/cli/cli/compose/loader/merge.go:35 +0x1b5
github.com/docker/cli/cli/compose/loader.Load(0x17ff5a5, 0x3, 0xc4200769c0, 0x42, 0xc420104180, 0x6, 0x8, 0xc42055a5d0, 0x42, 0xc420104180, ...)
        /go/src/github.com/docker/cli/cli/compose/loader/loader.go:84 +0x5ae
github.com/docker/cli/cli/command/stack/loader.LoadComposefile(0x24f44e0, 0xc420112b00, 0x0, 0x0, 0xc4202e3280, 0x6, 0x8, 0x7ffd3664e707, 0xb, 0x1802591, ...)
        /go/src/github.com/docker/cli/cli/command/stack/loader/loader.go:28 +0x176
github.com/docker/cli/cli/command/stack/swarm.deployCompose(0x24ecde0, 0xc420014088, 0x24f44e0, 0xc420112b00, 0x0, 0x0, 0xc4202e3280, 0x6, 0x8, 0x7ffd3664e707, ...)
        /go/src/github.com/docker/cli/cli/command/stack/swarm/deploy_composefile.go:21 +0x70
github.com/docker/cli/cli/command/stack/swarm.RunDeploy(0x24f44e0, 0xc420112b00, 0x0, 0x0, 0xc4202e3280, 0x6, 0x8, 0x7ffd3664e707, 0xb, 0x1802591, ...)
        /go/src/github.com/docker/cli/cli/command/stack/swarm/deploy.go:39 +0x199
github.com/docker/cli/cli/command/stack.newDeployCommand.func1(0xc4204ef680, 0xc4204f4270, 0x1, 0xd, 0x0, 0x0)
        /go/src/github.com/docker/cli/cli/command/stack/deploy.go:29 +0x1f5
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).execute(0xc4204ef680, 0xc420010130, 0xd, 0xd, 0xc4204ef680, 0xc420010130)
        /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:700 +0x47a
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420515200, 0xc420112b00, 0xc4205393b0, 0xc4203b0330)
        /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:785 +0x30e
github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420515200, 0xc420515200, 0x24cdf20)
        /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:738 +0x2b
main.main()
        /go/src/github.com/docker/cli/cmd/docker/docker.go:161 +0xc3

Describe the results you expected:
Stack started

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:       18.03.0-ce
 API version:   1.37
 Go version:    go1.9.4
 Git commit:    0520e24
 Built: Wed Mar 21 23:09:15 2018
 OS/Arch:       linux/amd64
 Experimental:  false
 Orchestrator:  swarm

Server:
 Engine:
  Version:      18.03.0-ce
  API version:  1.37 (minimum version 1.12)
  Go version:   go1.9.4
  Git commit:   0520e24
  Built:        Wed Mar 21 23:13:03 2018
  OS/Arch:      linux/amd64
  Experimental: false

Output of docker info:

Containers: 1
 Running: 1
 Paused: 0
 Stopped: 0
Images: 207
Server Version: 18.03.0-ce
Storage Driver: overlay2
 Backing Filesystem: xfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: active
 NodeID: 0s78535tdeb7t7rhyr1qc3vt8
 Is Manager: true
 ClusterID: tw9nrjpq2635f7ec5pyod40z6
 Managers: 1
 Nodes: 3
 Orchestration:
  Task History Retention Limit: 5
 Raft:
  Snapshot Interval: 10000
  Number of Old Snapshots to Retain: 0
  Heartbeat Tick: 1
  Election Tick: 3
 Dispatcher:
  Heartbeat Period: 5 seconds
 CA Configuration:
  Expiry Duration: 3 months
  Force Rotate: 0
 Autolock Managers: false
 Root Rotation In Progress: false
 Node Address: 172.31.0.157
 Manager Addresses:
  172.31.0.157:2377
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.15.11-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.297GiB
Name: awssparkmaster01
ID: YMD2:OWOB:BU3J:EEIZ:ODNQ:N7FY:POJ2:SS6H:G2ZT:5KLB:7CFL:MWZX
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 master:5000
 127.0.0.0/8
Live Restore Enabled: false

WARNING: bridge-nf-call-ip6tables is disabled

Additional environment details (AWS, VirtualBox, physical, etc.):
Running in AWS on CentOS

@vdemeester vdemeester self-assigned this Mar 27, 2018
@vdemeester
Copy link
Collaborator

@smur89 thx for the report. Can you provide a small set of compose-file that make the issue reproductible ? (to help me fixing it 😛 )

@heycalmdown
Copy link

docker version

Client:
 Version:	18.03.0-ce
 API version:	1.37
 Go version:	go1.9.4
 Git commit:	0520e24
 Built:	Wed Mar 21 23:06:22 2018
 OS/Arch:	darwin/amd64
 Experimental:	false
 Orchestrator:	swarm

Server:
 Engine:
  Version:	18.03.0-ce
  API version:	1.37 (minimum version 1.12)
  Go version:	go1.9.4
  Git commit:	0520e24
  Built:	Wed Mar 21 23:14:32 2018
  OS/Arch:	linux/amd64
  Experimental:	true

docker info

Containers: 38
 Running: 0
 Paused: 0
 Stopped: 38
Images: 1660
Server Version: 18.03.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.87-linuxkit-aufs
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952GiB
Name: linuxkit-025000000001
ID: MQBQ:WZP6:HXRX:7WC4:4YR2:6BVX:6FMU:E73Q:4FGF:HGQG:PJ6D:U3CW
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 21
 Goroutines: 40
 System Time: 2018-04-03T01:26:42.329870544Z
 EventsListeners: 2
HTTP Proxy: docker.for.mac.http.internal:3128
HTTPS Proxy: docker.for.mac.http.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
 ec2-52-79-78-173.ap-northeast-2.compute.amazonaws.com:5000
 127.0.0.0/8
Live Restore Enabled: false

a small set of docker-compose.yml

version: '3.3'
networks:
    hostnet:
        driver: overlay
        ipam:
            driver: default
            config:
                - subnet: 10.0.0.0/20
    hostnet:
        external:
            name: 'host'

This symptom has occurred right after installed the latest Docker for Mac

@smur89
Copy link
Author

smur89 commented Apr 5, 2018

Sorry @vdemeester just seeing this now. Looks like you've got what you need from heycalmdown. Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants