{"action":"closed","issue":{"url":"https://api.github.com/repos/markcaudill/haproxy-autoscale/issues/29","repository_url":"https://api.github.com/repos/markcaudill/haproxy-autoscale","labels_url":"https://api.github.com/repos/markcaudill/haproxy-autoscale/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/markcaudill/haproxy-autoscale/issues/29/comments","events_url":"https://api.github.com/repos/markcaudill/haproxy-autoscale/issues/29/events","html_url":"https://github.com/markcaudill/haproxy-autoscale/issues/29","id":242385533,"number":29,"title":"Wrong key/secret doesn't exit; empty instances list would generate empty cfg and reload and ruin the env.","user":{"login":"IronCore864","id":19277614,"avatar_url":"https://avatars3.githubusercontent.com/u/19277614?v=3","gravatar_id":"","url":"https://api.github.com/users/IronCore864","html_url":"https://github.com/IronCore864","followers_url":"https://api.github.com/users/IronCore864/followers","following_url":"https://api.github.com/users/IronCore864/following{/other_user}","gists_url":"https://api.github.com/users/IronCore864/gists{/gist_id}","starred_url":"https://api.github.com/users/IronCore864/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IronCore864/subscriptions","organizations_url":"https://api.github.com/users/IronCore864/orgs","repos_url":"https://api.github.com/users/IronCore864/repos","events_url":"https://api.github.com/users/IronCore864/events{/privacy}","received_events_url":"https://api.github.com/users/IronCore864/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-12T13:45:32Z","updated_at":"2017-07-13T10:45:31Z","closed_at":"2017-07-13T10:45:31Z","body":"Good script. Thanks a lot first. We are planning to use it in production.\r\n\r\n\r\nBut I met the issues mentioned in the title. I'm not sure if this is by design, or a bug.\r\n\r\n\r\n1. For example, you have a test environment, and a production one. After you test it, you run it on prod, but somehow you forget to update the key/secret, and boto.exception.EC2ResponseError is thrown, but since the program continues, a new conf with empty instance list would be generated and reloaded, and the environment won't work anymore.\r\n2. Or if the instance list from a group is empty, it would still generate a new conf with empty instance list.\r\n\r\nMy five cents:\r\n- Maybe we can add a new option, like IS_PRODUCTION, which if is true, don't generate empty conf and definitely don't reload the empty conf.\r\n- Or add some checks in generate_haproxy_config to test if instances is empty or not. If empty, give some warnings and don't reload.\r\n- Multiple ways to improve this. But again, I'm not sure if this is a bug or by design. Maybe you want to generate a conf no matter there is instance or not.\r\n\r\nIf I were you, I would exit directly in case of EC2ResponseError, and in case of empty instances list, give warning and don't reload.\r\n\r\nWhat do you think? If you agree but don't have time I can contribute a PR for this."}}
{"actor":{"display_login":"IronCore864"}}