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
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.
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
[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
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
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
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.
Error:
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
Steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Stack started
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version:Output of
docker info:Additional environment details (AWS, VirtualBox, physical, etc.):
Running in AWS on CentOS