)]}'
{"ranger/templates/bin/_health-probe.py.tpl":[{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"ebb7d26801917c5873f04dd9624b7af7f5dd74ce","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            if response.status_code \u003d\u003d 200 or response.status_code \u003d\u003d 404:"},{"line_number":60,"context_line":"                results[service] \u003d \u0027passed\u0027"},{"line_number":61,"context_line":"        except requests.exceptions.ConnectionError as ce:"},{"line_number":62,"context_line":"            message \u003d getattr(ce, \"message\", str(ce))"},{"line_number":63,"context_line":"            sys.stderr.write(\"Health probe ConnectionError Exp:%s\\n\" % message)"},{"line_number":64,"context_line":"        except requests.exceptions.ReadTimeout as to:"},{"line_number":65,"context_line":"            message \u003d getattr(to, \"message\", str(to))"},{"line_number":66,"context_line":"            sys.stderr.write(\"Health probe ReadTimeout Exp:%s\\n\" % message)"}],"source_content_type":"text/x-smarty","patch_set":1,"id":"3fa7e38b_ca04ce17","line":63,"range":{"start_line":62,"start_character":0,"end_line":63,"end_character":79},"updated":"2019-10-12 23:29:26.000000000","message":"why not just do print(ce) instead of doing getattr() to try for the message attribute which doesn\u0027t exist in py3?","commit_id":"a503f4a1e7b6d2497a4939d709f3ce14151dfb4d"},{"author":{"_account_id":19391,"name":"Chi Lo","email":"cl566n@att.com","username":"cl566n"},"change_message_id":"e66d981af32e6579700be0b232f05cf45f9db831","unresolved":false,"context_lines":[{"line_number":59,"context_line":"            if response.status_code \u003d\u003d 200 or response.status_code \u003d\u003d 404:"},{"line_number":60,"context_line":"                results[service] \u003d \u0027passed\u0027"},{"line_number":61,"context_line":"        except requests.exceptions.ConnectionError as ce:"},{"line_number":62,"context_line":"            message \u003d getattr(ce, \"message\", str(ce))"},{"line_number":63,"context_line":"            sys.stderr.write(\"Health probe ConnectionError Exp:%s\\n\" % message)"},{"line_number":64,"context_line":"        except requests.exceptions.ReadTimeout as to:"},{"line_number":65,"context_line":"            message \u003d getattr(to, \"message\", str(to))"},{"line_number":66,"context_line":"            sys.stderr.write(\"Health probe ReadTimeout Exp:%s\\n\" % message)"}],"source_content_type":"text/x-smarty","patch_set":1,"id":"3fa7e38b_9ada7948","line":63,"range":{"start_line":62,"start_character":0,"end_line":63,"end_character":79},"in_reply_to":"3fa7e38b_ca04ce17","updated":"2019-10-16 02:41:32.000000000","message":"I will get rid of the getattr call and will just use str(ce) since str(ce) work both for py2 and py3.  However, I would stick with using stderr.write instead of print since all health-probe implementations are using this approach.","commit_id":"a503f4a1e7b6d2497a4939d709f3ce14151dfb4d"},{"author":{"_account_id":8749,"name":"Evgeniy L","email":"eli@mirantis.com","username":"evgeniyl"},"change_message_id":"034465f81020c651c07b18b6fa023d042bab371f","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            port \u003d config.get(service, \u0027port\u0027)"},{"line_number":57,"context_line":"            url \u003d \"http://localhost:{}\".format(port)"},{"line_number":58,"context_line":"            response \u003d requests.get(url, timeout\u003d10)"},{"line_number":59,"context_line":"            if response.status_code \u003d\u003d 200 or response.status_code \u003d\u003d 404:"},{"line_number":60,"context_line":"                results[service] \u003d \u0027passed\u0027"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        except requests.exceptions.ConnectionError as ce:"}],"source_content_type":"text/x-smarty","patch_set":7,"id":"3fa7e38b_1145d943","line":59,"range":{"start_line":59,"start_character":39,"end_line":59,"end_character":42},"updated":"2019-10-18 20:31:19.000000000","message":"It may be ok for ranger, however all 2xx responses are considered to be success in http (e.g. 201/202).","commit_id":"965a0fa79dd407735e6d0a10e64cfc9f3b6b8254"},{"author":{"_account_id":19391,"name":"Chi Lo","email":"cl566n@att.com","username":"cl566n"},"change_message_id":"ec71a31d7054dd30b090adc0c50fb044a99aa294","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            port \u003d config.get(service, \u0027port\u0027)"},{"line_number":57,"context_line":"            url \u003d \"http://localhost:{}\".format(port)"},{"line_number":58,"context_line":"            response \u003d requests.get(url, timeout\u003d10)"},{"line_number":59,"context_line":"            if response.status_code \u003d\u003d 200 or response.status_code \u003d\u003d 404:"},{"line_number":60,"context_line":"                results[service] \u003d \u0027passed\u0027"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        except requests.exceptions.ConnectionError as ce:"}],"source_content_type":"text/x-smarty","patch_set":7,"id":"3fa7e38b_c85f8873","line":59,"range":{"start_line":59,"start_character":39,"end_line":59,"end_character":42},"in_reply_to":"3fa7e38b_1145d943","updated":"2019-10-21 14:48:21.000000000","message":"Yes, from http protocol perspective. However, this health-probe is identifying condition such as connection error or read timeout issues when calling the api. Ranger will respond with either 200 or 404, depending on which api we are calling.  As long as there is a response, it is considered as positive acknowledge from health perspective.","commit_id":"965a0fa79dd407735e6d0a10e64cfc9f3b6b8254"},{"author":{"_account_id":8749,"name":"Evgeniy L","email":"eli@mirantis.com","username":"evgeniyl"},"change_message_id":"034465f81020c651c07b18b6fa023d042bab371f","unresolved":false,"context_lines":[{"line_number":76,"context_line":"if __name__ \u003d\u003d \"__main__\":"},{"line_number":77,"context_line":"    run_health_check()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    sys.exit(0)  # return success"}],"source_content_type":"text/x-smarty","patch_set":7,"id":"3fa7e38b_d64e5795","line":79,"range":{"start_line":79,"start_character":0,"end_line":79,"end_character":33},"updated":"2019-10-18 20:31:19.000000000","message":"It will return 0 by default.","commit_id":"965a0fa79dd407735e6d0a10e64cfc9f3b6b8254"},{"author":{"_account_id":19391,"name":"Chi Lo","email":"cl566n@att.com","username":"cl566n"},"change_message_id":"ec71a31d7054dd30b090adc0c50fb044a99aa294","unresolved":false,"context_lines":[{"line_number":76,"context_line":"if __name__ \u003d\u003d \"__main__\":"},{"line_number":77,"context_line":"    run_health_check()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    sys.exit(0)  # return success"}],"source_content_type":"text/x-smarty","patch_set":7,"id":"3fa7e38b_e864c44b","line":79,"range":{"start_line":79,"start_character":0,"end_line":79,"end_character":33},"in_reply_to":"3fa7e38b_d64e5795","updated":"2019-10-21 14:48:21.000000000","message":"Will remove this in next patch","commit_id":"965a0fa79dd407735e6d0a10e64cfc9f3b6b8254"}],"ranger/templates/configmap-bin.yaml":[{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"add7c778b66eb3c160ee8ce91e85a58f8cd8f820","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  ranger-services.sh: |"},{"line_number":32,"context_line":"{{ tuple \"bin/_ranger-services.sh.tpl\" . | include \"helm-toolkit.utils.template\" | indent 4 }}"},{"line_number":33,"context_line":"  health-check.sh: |+"},{"line_number":34,"context_line":"{{ tuple \"bin/_health-check.sh.tpl\" . | include \"helm-toolkit.utils.template\" | indent 4 }}"},{"line_number":35,"context_line":"  ranger-test.sh: |+"},{"line_number":36,"context_line":"{{ tuple \"bin/_ranger-test.sh.tpl\" . | include \"helm-toolkit.utils.template\" | indent 4 }}"},{"line_number":37,"context_line":"  rabbit-init.sh: |"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"3fa7e38b_c0ce785a","side":"PARENT","line":34,"range":{"start_line":34,"start_character":14,"end_line":34,"end_character":34},"updated":"2019-10-21 21:09:02.000000000","message":"this file needs to be removed.","commit_id":"71fdc5fdb7ff7b7a6f98beb325b2821c512edde5"},{"author":{"_account_id":19391,"name":"Chi Lo","email":"cl566n@att.com","username":"cl566n"},"change_message_id":"05912d3e38ce967555221b274103e07fbefbd63e","unresolved":false,"context_lines":[{"line_number":31,"context_line":"  ranger-services.sh: |"},{"line_number":32,"context_line":"{{ tuple \"bin/_ranger-services.sh.tpl\" . | include \"helm-toolkit.utils.template\" | indent 4 }}"},{"line_number":33,"context_line":"  health-check.sh: |+"},{"line_number":34,"context_line":"{{ tuple \"bin/_health-check.sh.tpl\" . | include \"helm-toolkit.utils.template\" | indent 4 }}"},{"line_number":35,"context_line":"  ranger-test.sh: |+"},{"line_number":36,"context_line":"{{ tuple \"bin/_ranger-test.sh.tpl\" . | include \"helm-toolkit.utils.template\" | indent 4 }}"},{"line_number":37,"context_line":"  rabbit-init.sh: |"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"3fa7e38b_8e451146","side":"PARENT","line":34,"range":{"start_line":34,"start_character":14,"end_line":34,"end_character":34},"in_reply_to":"3fa7e38b_c0ce785a","updated":"2019-10-21 23:10:00.000000000","message":"Will remove this file in next patch","commit_id":"71fdc5fdb7ff7b7a6f98beb325b2821c512edde5"}],"ranger/templates/deployment-ranger-services.yaml":[{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"add7c778b66eb3c160ee8ce91e85a58f8cd8f820","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            - name: audit"},{"line_number":136,"context_line":"              containerPort: {{ tuple \"audit\" \"internal\" \"api\" . | include \"helm-toolkit.endpoints.endpoint_port_lookup\" }}"},{"line_number":137,"context_line":"{{ dict \"envAll\" $envAll \"component\" \"ranger\" \"container\" \"ranger-services\" \"type\" \"readiness\" \"probeTemplate\" (include \"RangerServicesProbeTemplate\" $envAll | fromYaml) | include \"helm-toolkit.snippets.kubernetes_probe\" | indent 10 }}"},{"line_number":138,"context_line":"{{ dict \"envAll\" $envAll \"component\" \"ranger\" \"container\" \"ranger-services\" \"type\" \"liveness\" \"probeTemplate\" (include \"RangerServicesProbeTemplate\" $envAll | fromYaml) | include \"helm-toolkit.snippets.kubernetes_probe\" | indent 10 }}"},{"line_number":139,"context_line":"          volumeMounts:"},{"line_number":140,"context_line":"            - name: pod-etc-ranger"},{"line_number":141,"context_line":"              mountPath: /etc/ranger"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"3fa7e38b_80d8801e","line":138,"range":{"start_line":138,"start_character":0,"end_line":138,"end_character":234},"updated":"2019-10-21 21:09:02.000000000","message":"im not familiar enough with ranger, but are there cases where we would not want the services pod to be killed when not every endpoint is returning \u0027ok\u0027?","commit_id":"06801553c4cf7734d193b41514bc8f5b74be0f8d"},{"author":{"_account_id":19391,"name":"Chi Lo","email":"cl566n@att.com","username":"cl566n"},"change_message_id":"05912d3e38ce967555221b274103e07fbefbd63e","unresolved":false,"context_lines":[{"line_number":135,"context_line":"            - name: audit"},{"line_number":136,"context_line":"              containerPort: {{ tuple \"audit\" \"internal\" \"api\" . | include \"helm-toolkit.endpoints.endpoint_port_lookup\" }}"},{"line_number":137,"context_line":"{{ dict \"envAll\" $envAll \"component\" \"ranger\" \"container\" \"ranger-services\" \"type\" \"readiness\" \"probeTemplate\" (include \"RangerServicesProbeTemplate\" $envAll | fromYaml) | include \"helm-toolkit.snippets.kubernetes_probe\" | indent 10 }}"},{"line_number":138,"context_line":"{{ dict \"envAll\" $envAll \"component\" \"ranger\" \"container\" \"ranger-services\" \"type\" \"liveness\" \"probeTemplate\" (include \"RangerServicesProbeTemplate\" $envAll | fromYaml) | include \"helm-toolkit.snippets.kubernetes_probe\" | indent 10 }}"},{"line_number":139,"context_line":"          volumeMounts:"},{"line_number":140,"context_line":"            - name: pod-etc-ranger"},{"line_number":141,"context_line":"              mountPath: /etc/ranger"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"3fa7e38b_eea285fc","line":138,"range":{"start_line":138,"start_character":0,"end_line":138,"end_character":234},"in_reply_to":"3fa7e38b_80d8801e","updated":"2019-10-21 23:10:00.000000000","message":"Ranger pod has multiple processes, each provides the endpoint.  Ideally, it would be good to restart the process in a pod instead of restarting the pod itself.  However, after some testing, it is not possible to delete individual process without creating a corresponding defunct process.  In addition, the log for the new process also does not come out when doing kubernetes logs.  Therefore, we abandoned restarting a single process.  In the near future, some re-architecture is needed to implement either a supervisor process or each process has its own pod.","commit_id":"06801553c4cf7734d193b41514bc8f5b74be0f8d"}]}
