-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
consul panics on read of multi-service definition #3874
Comments
Hi @davidkarlsen I don't see the same crash on my Mac, but this code does look potentially dangerous - https://github.com/hashicorp/consul/blob/v1.0.3/agent/agent.go#L2153-L2162 if p ended up as |
Could you please post your file some place? I'm wondering if it contains an odd control character or something like that. |
I started to look into this. |
I see the same issue with multiple service definitions
|
@hfarooqui @davidkarlsen I can reproduce your issue on
|
I thought about it more and I don't think you should be touching |
Closing this based on @i0rek's comment above. The consul data directory is internal to the agent and you should not be editing files or adding content there. |
Description of the Issue (and unexpected/desired result)
consul panics on multi-service definiton as .json in services dir, loaded with consul reload - should at least not panic, but describe format error and ignore definition.
Reproduction steps
Create service def like this:
which is according to https://www.consul.io/docs/agent/services.html "Multiple service definitions"
consul version
for both Client and Serverserver: 1.0.3
client: N/A
Operating system and Environment details
uname -a
Linux alp-aot-ccm02 3.10.0-693.1.1.el7.x86_64 #1 SMP Thu Aug 3 08:15:31 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@alp-aot-ccm02 services]# docker info
Containers: 16
Running: 16
Paused: 0
Stopped: 0
Images: 22
Server Version: 1.12.6
Storage Driver: btrfs
Build Version: Btrfs v4.9.1
Library Version: 102
Logging Driver: syslog
Cgroup Driver: systemd
Plugins:
Volume: local
Network: host overlay null bridge
Authorization: rhel-push-plugin
Swarm: inactive
Runtimes: docker-runc runc
Default Runtime: docker-runc
Security Options: seccomp
Kernel Version: 3.10.0-693.1.1.el7.x86_64
Operating System: Red Hat Enterprise Linux Server 7.4 (Maipo)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 6
Total Memory: 15.51 GiB
Name: alp-aot-ccm02
ID: WDB6:MHPJ:P72T:P4IT:2F7I:4XW5:XHYX:WHKE:EF67:YJXK:4UZH:O464
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://xxxx:8085/v1/
Insecure Registries:
127.0.0.0/8
Log Fragments or Link to gist
The text was updated successfully, but these errors were encountered: