{"action":"created","issue":{"url":"https://api.github.com/repos/tutumcloud/haproxy/issues/119","labels_url":"https://api.github.com/repos/tutumcloud/haproxy/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/tutumcloud/haproxy/issues/119/comments","events_url":"https://api.github.com/repos/tutumcloud/haproxy/issues/119/events","html_url":"https://github.com/tutumcloud/haproxy/issues/119","id":117277474,"number":119,"title":"Service relink doesn't trigger HAProxy config reload, leading to 503","user":{"login":"yunspace","id":218128,"avatar_url":"https://avatars.githubusercontent.com/u/218128?v=3","gravatar_id":"","url":"https://api.github.com/users/yunspace","html_url":"https://github.com/yunspace","followers_url":"https://api.github.com/users/yunspace/followers","following_url":"https://api.github.com/users/yunspace/following{/other_user}","gists_url":"https://api.github.com/users/yunspace/gists{/gist_id}","starred_url":"https://api.github.com/users/yunspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yunspace/subscriptions","organizations_url":"https://api.github.com/users/yunspace/orgs","repos_url":"https://api.github.com/users/yunspace/repos","events_url":"https://api.github.com/users/yunspace/events{/privacy}","received_events_url":"https://api.github.com/users/yunspace/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-17T03:54:35Z","updated_at":"2015-11-19T01:36:25Z","closed_at":null,"body":"I've raised this in the forums https://support.tutum.co/support/discussions/topics/5000067035 and spoke to @tifayuki on intercom. But thought I'd raise an official ticket for record keeping and so others are aware of the issue also.\r\n\r\nWe have automatic blue green deployment setup as per http://blog.tutum.co/2015/06/08/blue-green-deployment-using-containers/ \r\n\r\nHowever we are seeing the behaviour that after a `Services` is re-linked (from say blue to green), there is no activity in the `HAProxy` logs which indicate the configs have not reloaded and the service is still pointing to the old version (blue). This is against the behaviour described in http://blog.tutum.co/2015/04/07/presenting-tutum-stream-api/ where when a `Service` is changed, the `HAProxy` should restart. \r\n\r\nThis behaviour happens in both 0.1 and 0.2 releases of the `tutum/haproxy`. And applies to relinking a service via either Tutum API or editing the Stack file. \r\n\r\nThe side effect is that because we shutdown the old service upon a successful relink returned by the API, the `HAProxy` now redirects traffic to a dead blue service which gives `503` error. \r\n\r\nThis is quite a critical error and effects our live user facing applications. Our current work around is to force-restart the `HAProxy` every time we deploy but it's not ideal. Please apply a fix or alternatively expose a end point in `HAProxy` that can be used to kick off the config reload without restarting `HAProxy` containers."},"comment":{"url":"https://api.github.com/repos/tutumcloud/haproxy/issues/comments/157919350","html_url":"https://github.com/tutumcloud/haproxy/issues/119#issuecomment-157919350","issue_url":"https://api.github.com/repos/tutumcloud/haproxy/issues/119","id":157919350,"user":{"login":"nclaw","id":11022691,"avatar_url":"https://avatars.githubusercontent.com/u/11022691?v=3","gravatar_id":"","url":"https://api.github.com/users/nclaw","html_url":"https://github.com/nclaw","followers_url":"https://api.github.com/users/nclaw/followers","following_url":"https://api.github.com/users/nclaw/following{/other_user}","gists_url":"https://api.github.com/users/nclaw/gists{/gist_id}","starred_url":"https://api.github.com/users/nclaw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nclaw/subscriptions","organizations_url":"https://api.github.com/users/nclaw/orgs","repos_url":"https://api.github.com/users/nclaw/repos","events_url":"https://api.github.com/users/nclaw/events{/privacy}","received_events_url":"https://api.github.com/users/nclaw/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T01:36:25Z","updated_at":"2015-11-19T01:36:25Z","body":"We have tried a workaround suggested by one of users on tutum slack group - instead of relinking HAproxy from green to blue and vice versa we should constantly have links from HAproxy to both green and blue services and scale down one of the services (ex: blue) after another one has been redeployed (ex: green).\r\n\r\nHowever this method did not work as expected and produced following results:\r\n- When both blue and green services are up - HAproxy runs with no issues;\r\n- When either of the two servcies is in state \"not running\" or \"stopped\" HAproxy produces following error: \"ERROR:root:u'SERVICE_NAME_GREEN'\""}}