{"action":"created","issue":{"url":"https://api.github.com/repos/rancher/rancher/issues/9883","repository_url":"https://api.github.com/repos/rancher/rancher","labels_url":"https://api.github.com/repos/rancher/rancher/issues/9883/labels{/name}","comments_url":"https://api.github.com/repos/rancher/rancher/issues/9883/comments","events_url":"https://api.github.com/repos/rancher/rancher/issues/9883/events","html_url":"https://github.com/rancher/rancher/issues/9883","id":257866021,"number":9883,"title":"Healthchecks require a newline in the response","user":{"login":"monitorjbl","id":1149136,"avatar_url":"https://avatars0.githubusercontent.com/u/1149136?v=4","gravatar_id":"","url":"https://api.github.com/users/monitorjbl","html_url":"https://github.com/monitorjbl","followers_url":"https://api.github.com/users/monitorjbl/followers","following_url":"https://api.github.com/users/monitorjbl/following{/other_user}","gists_url":"https://api.github.com/users/monitorjbl/gists{/gist_id}","starred_url":"https://api.github.com/users/monitorjbl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monitorjbl/subscriptions","organizations_url":"https://api.github.com/users/monitorjbl/orgs","repos_url":"https://api.github.com/users/monitorjbl/repos","events_url":"https://api.github.com/users/monitorjbl/events{/privacy}","received_events_url":"https://api.github.com/users/monitorjbl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-14T21:44:35Z","updated_at":"2017-09-14T22:22:06Z","closed_at":null,"author_association":"NONE","body":"**Rancher versions:**\r\nrancher/server: 1.6.7\r\nrancher/agent: 1.2.6\r\n\r\n**Infrastructure Stack versions:**\r\nhealthcheck: 0.3.0\r\nipsec: 0.1.3\r\nnetwork-services: 0.2.5\r\nscheduler: 0.6.3\r\nkubernetes (if applicable): n/a\r\n\r\n**Docker version: (`docker version`,`docker info` preferred)**\r\n\r\n```\r\n# docker version\r\nClient:\r\n Version:      17.03.1-ce\r\n API version:  1.27\r\n Go version:   go1.7.5\r\n Git commit:   c6d412e\r\n Built:        Fri Mar 24 00:45:26 2017\r\n OS/Arch:      linux/amd64\r\n\r\nServer:\r\n Version:      17.03.1-ce\r\n API version:  1.27 (minimum version 1.12)\r\n Go version:   go1.7.5\r\n Git commit:   c6d412e\r\n Built:        Fri Mar 24 00:45:26 2017\r\n OS/Arch:      linux/amd64\r\n Experimental: false\r\n\r\n# docker info\r\nContainers: 17\r\n Running: 17\r\n Paused: 0\r\n Stopped: 0\r\nImages: 16\r\nServer Version: 17.03.1-ce\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 121\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins: \r\n Volume: local pylon-cinder\r\n Network: bridge host macvlan null overlay\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 4ab9917febca54791c5f071a9d1f404867857fcc\r\nrunc version: 54296cf40ad8143b62dbcaa1d90e520a2136ddfe\r\ninit version: 949e6fa\r\nSecurity Options:\r\n apparmor\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.4.0-81-generic\r\nOperating System: Ubuntu 16.04.2 LTS\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 4\r\nTotal Memory: 7.796 GiB\r\nName: pylon-worker-0\r\nID: WR3Z:FBKX:WPSR:YUGJ:H2KK:D5JR:LDQZ:BWCY:PUGV:PC7R:NTY7:244Q\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No swap limit support\r\nExperimental: false\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n```\r\n\r\n**Operating system and kernel: (`cat /etc/os-release`, `uname -r` preferred)**\r\n\r\n```\r\n# cat /etc/os-release\r\nNAME=\"Ubuntu\"\r\nVERSION=\"16.04.2 LTS (Xenial Xerus)\"\r\nID=ubuntu\r\nID_LIKE=debian\r\nPRETTY_NAME=\"Ubuntu 16.04.2 LTS\"\r\nVERSION_ID=\"16.04\"\r\nHOME_URL=\"http://www.ubuntu.com/\"\r\nSUPPORT_URL=\"http://help.ubuntu.com/\"\r\nBUG_REPORT_URL=\"http://bugs.launchpad.net/ubuntu/\"\r\nVERSION_CODENAME=xenial\r\nUBUNTU_CODENAME=xenial\r\n\r\n# uname -r\r\n4.4.0-81-generic\r\n```\r\n\r\n**Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)**\r\n\r\nOpenstack VMs\r\n\r\n**Setup details: (single node rancher vs. HA rancher, internal DB vs. external DB)**\r\n\r\nSingle node rancher server, single node rancher host\r\n\r\n**Environment Template: (Cattle/Kubernetes/Swarm/Mesos)**\r\n\r\n**Steps to Reproduce:**\r\n\r\n1. Create an image with a web server that returns a 200 and single line of output with no trailing newline when a GET request is issued to /health. \r\n1. Create an image with a web server that returns a 200 and single line of output with a trailing newline when a GET request is issued to /health. \r\n1. Create a stack using the image from 1. and add the healthcheck shown below\r\n1. Create a stack using the image from 2. and add the healthcheck shown below\r\n\r\n```\r\nversion: '2'\r\nservices:\r\n  server:\r\n    scale: 1\r\n    health_check:\r\n      port: 2379\r\n      request_line: GET /health HTTP/1.0\r\n      interval: 5000\r\n      unhealthy_threshold: 10\r\n      strategy: none\r\n      healthy_threshold: 2\r\n      response_timeout: 1000\r\n```\r\n\r\n**Results:**\r\nThe image in 1. does not ever register as healthy, while the image in 2. does. \r\n"},"comment":{"url":"https://api.github.com/repos/rancher/rancher/issues/comments/329625098","html_url":"https://github.com/rancher/rancher/issues/9883#issuecomment-329625098","issue_url":"https://api.github.com/repos/rancher/rancher/issues/9883","id":329625098,"user":{"login":"vincent99","id":753917,"avatar_url":"https://avatars0.githubusercontent.com/u/753917?v=4","gravatar_id":"","url":"https://api.github.com/users/vincent99","html_url":"https://github.com/vincent99","followers_url":"https://api.github.com/users/vincent99/followers","following_url":"https://api.github.com/users/vincent99/following{/other_user}","gists_url":"https://api.github.com/users/vincent99/gists{/gist_id}","starred_url":"https://api.github.com/users/vincent99/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vincent99/subscriptions","organizations_url":"https://api.github.com/users/vincent99/orgs","repos_url":"https://api.github.com/users/vincent99/repos","events_url":"https://api.github.com/users/vincent99/events{/privacy}","received_events_url":"https://api.github.com/users/vincent99/received_events","type":"User","site_admin":false},"created_at":"2017-09-14T22:22:06Z","updated_at":"2017-09-14T22:22:06Z","author_association":"OWNER","body":"Can you capture the raw request and response (`tcpdump -w dump.pcap port 80` or similar, container needs `--privileged` to capture)\r\n\r\nHealthchecks are done by haproxy so it seems far more likely your response is wrong than they don't know how to handle a http request.\r\n\r\nFor example if the Content-Length is off by one byte (perhaps because of CR vs CRLF conversion) the response isn't done yet so the client (haproxy) is just going to wait for more body until the check times out."}}
{"actor":{"display_login":"vincent99"}}