)]}'
{"healthcheck/common.sh":[{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"272ed509c42a13c6681c4e3f9d96a24d38f5bd1b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    # First match exits - usually TCP and \"sudo TCP\" are enough."},{"line_number":46,"context_line":"    # `sudo\u0027 is needed, as in some cases even root can get a \"permission denied\""},{"line_number":47,"context_line":"    # on some file descriptors (case for heat_manager for example)"},{"line_number":48,"context_line":"    # UDP support is needed for octavia manager (UDP:5555)."},{"line_number":49,"context_line":"    lsof -w -P -a -iTCP:${ports} -p${pids} || \\"},{"line_number":50,"context_line":"      sudo -u $puser lsof -w -P -a -iTCP:${ports} -p${pids} || \\"},{"line_number":51,"context_line":"      lsof -w -P -a -iUDP:${ports} -p${pids} || \\"}],"source_content_type":"text/x-sh","patch_set":1,"id":"3fa7e38b_b3b3ad0c","line":48,"updated":"2020-02-18 14:12:12.000000000","message":"please consider moving UDP checks out for the service checks that require it","commit_id":"eff72cc6cd44c855c0e0e27ef98dd3cf41c60a78"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"2d015b8de71ade12f165993bbf7d37e549892edd","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    # First match exits - usually TCP and \"sudo TCP\" are enough."},{"line_number":46,"context_line":"    # `sudo\u0027 is needed, as in some cases even root can get a \"permission denied\""},{"line_number":47,"context_line":"    # on some file descriptors (case for heat_manager for example)"},{"line_number":48,"context_line":"    # UDP support is needed for octavia manager (UDP:5555)."},{"line_number":49,"context_line":"    lsof -w -P -a -iTCP:${ports} -p${pids} || \\"},{"line_number":50,"context_line":"      sudo -u $puser lsof -w -P -a -iTCP:${ports} -p${pids} || \\"},{"line_number":51,"context_line":"      lsof -w -P -a -iUDP:${ports} -p${pids} || \\"}],"source_content_type":"text/x-sh","patch_set":1,"id":"3fa7e38b_537d99c1","line":48,"in_reply_to":"3fa7e38b_b3b3ad0c","updated":"2020-02-18 14:32:32.000000000","message":"not really sure this is wanted - that would make a big change and the gain is pretty close to null...","commit_id":"eff72cc6cd44c855c0e0e27ef98dd3cf41c60a78"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"6f07ea47f495906ddb4d64bae73aac3f6124639b","unresolved":false,"context_lines":[{"line_number":2,"context_line":"set -euo pipefail"},{"line_number":3,"context_line":": ${HEALTHCHECK_DEBUG:\u003d0}"},{"line_number":4,"context_line":"if [ $HEALTHCHECK_DEBUG -ne 0 ]; then"},{"line_number":5,"context_line":"    set -x"},{"line_number":6,"context_line":"else"},{"line_number":7,"context_line":"    exec 3\u003e\u00261 \u0026\u003e/dev/null"},{"line_number":8,"context_line":"fi"}],"source_content_type":"text/x-sh","patch_set":6,"id":"3fa7e38b_f3136559","line":5,"updated":"2020-02-18 13:57:46.000000000","message":"don\u0027t you need to do something with fd 3 in this case too?","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"1e4da6543370af229133084d0f49715316abb480","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    lsof -w -P -a -iTCP:${ports} -p${pids} || \\"},{"line_number":55,"context_line":"        sudo -u $puser lsof -w -P -a -iTCP:${ports} -p${pids} || \\"},{"line_number":56,"context_line":"        lsof -w -P -a -iUDP:${ports} -p${pids} || \\"},{"line_number":57,"context_line":"        sudo -u $puser lsof -w -P -a -iUDP:${ports} -p${pids}"},{"line_number":58,"context_line":"}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"healthcheck_listen () {"}],"source_content_type":"text/x-sh","patch_set":6,"id":"3fa7e38b_f3c0454e","line":57,"updated":"2020-02-18 14:13:26.000000000","message":"...or parametrizing it so that the UDP part becomes optional","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"eb08109a0f5b81c3bf876e5ff3499a5a5caba143","unresolved":false,"context_lines":[{"line_number":93,"context_line":"}"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"get_config_val () {"},{"line_number":96,"context_line":"    crudini --get \"$1\" \"$2\" \"$3\" 2\u003e /dev/null || health_output \"$4\""},{"line_number":97,"context_line":"}"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"# apachectl -S is slightly harder to parse and doesn\u0027t say if the vhost is serving SSL"}],"source_content_type":"text/x-sh","patch_set":6,"id":"3fa7e38b_33381dcb","line":96,"range":{"start_line":96,"start_character":49,"end_line":96,"end_character":62},"updated":"2020-02-18 13:59:33.000000000","message":"should stay as echo here too","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"eb08109a0f5b81c3bf876e5ff3499a5a5caba143","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        if [[ $wsgi_alias !\u003d \"/\" ]]; then"},{"line_number":112,"context_line":"            wsgi_alias\u003d\"${wsgi_alias}/\""},{"line_number":113,"context_line":"        fi"},{"line_number":114,"context_line":"        health_output ${proto}://${server_name}:${bind_port}${wsgi_alias}"},{"line_number":115,"context_line":"    else"},{"line_number":116,"context_line":"        exit 1"},{"line_number":117,"context_line":"    fi"}],"source_content_type":"text/x-sh","patch_set":6,"id":"3fa7e38b_133f21b3","line":114,"range":{"start_line":114,"start_character":8,"end_line":114,"end_character":21},"updated":"2020-02-18 13:59:33.000000000","message":"should stay as echo here too","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"3c20d4ba496e9497a9df749abf6878ce57d70d6c","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"check_swift_interval () {"},{"line_number":121,"context_line":"    service\u003d$1"},{"line_number":122,"context_line":"    if ps -e | grep --quiet swift-$service; then"},{"line_number":123,"context_line":"        interval\u003d$(get_config_val $conf $service interval 300)"},{"line_number":124,"context_line":"        last\u003d`grep -o \"\\\"replication_last\\\": [0-9]*\" $cache | cut -f 2 -d \" \"`"},{"line_number":125,"context_line":"        now\u003d`date +%s`"}],"source_content_type":"text/x-sh","patch_set":6,"id":"3fa7e38b_13864161","line":122,"range":{"start_line":122,"start_character":7,"end_line":122,"end_character":27},"updated":"2020-02-18 14:02:42.000000000","message":"pgrep?","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"2d015b8de71ade12f165993bbf7d37e549892edd","unresolved":false,"context_lines":[{"line_number":119,"context_line":""},{"line_number":120,"context_line":"check_swift_interval () {"},{"line_number":121,"context_line":"    service\u003d$1"},{"line_number":122,"context_line":"    if ps -e | grep --quiet swift-$service; then"},{"line_number":123,"context_line":"        interval\u003d$(get_config_val $conf $service interval 300)"},{"line_number":124,"context_line":"        last\u003d`grep -o \"\\\"replication_last\\\": [0-9]*\" $cache | cut -f 2 -d \" \"`"},{"line_number":125,"context_line":"        now\u003d`date +%s`"}],"source_content_type":"text/x-sh","patch_set":6,"id":"3fa7e38b_d35f494a","line":122,"range":{"start_line":122,"start_character":7,"end_line":122,"end_character":27},"in_reply_to":"3fa7e38b_13864161","updated":"2020-02-18 14:32:32.000000000","message":"hmmm maybe, yes. Wondering now. Will check if I have something kicking it in my current env.","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"d3e8dbea0fa1efc57ead9236849036ccdb851971","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    # `sudo\u0027 is needed, as in some cases even root can get a \"permission denied\""},{"line_number":50,"context_line":"    # on some file descriptors (case for heat_manager for example)"},{"line_number":51,"context_line":"    # UDP support is needed for octavia manager (UDP:5555)."},{"line_number":52,"context_line":"    lsof -w -P -a -iTCP:${ports} -p${pids} \u003e\u00263 2\u003e\u00261 || \\"},{"line_number":53,"context_line":"        sudo -u $puser lsof -w -P -a -iTCP:${ports} -p${pids} \u003e\u00263 2\u003e\u00261 || \\"},{"line_number":54,"context_line":"        lsof -w -P -a -iUDP:${ports} -p${pids} \u003e\u00263 2\u003e\u00261 || \\"},{"line_number":55,"context_line":"        sudo -u $puser lsof -w -P -a -iUDP:${ports} -p${pids} \u003e\u00263 2\u003e\u00261"}],"source_content_type":"text/x-sh","patch_set":8,"id":"3fa7e38b_407cc873","line":52,"updated":"2020-02-19 15:11:50.000000000","message":"we should do a -n so we don\u0027t do hostname lookups","commit_id":"0d0db5e5c39c0b2e6e2ae22096418886e021f879"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"b8aa39dd0397e935fb1139c40cb1e7e11aff2083","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    # `sudo\u0027 is needed, as in some cases even root can get a \"permission denied\""},{"line_number":50,"context_line":"    # on some file descriptors (case for heat_manager for example)"},{"line_number":51,"context_line":"    # UDP support is needed for octavia manager (UDP:5555)."},{"line_number":52,"context_line":"    lsof -w -P -a -iTCP:${ports} -p${pids} \u003e\u00263 2\u003e\u00261 || \\"},{"line_number":53,"context_line":"        sudo -u $puser lsof -w -P -a -iTCP:${ports} -p${pids} \u003e\u00263 2\u003e\u00261 || \\"},{"line_number":54,"context_line":"        lsof -w -P -a -iUDP:${ports} -p${pids} \u003e\u00263 2\u003e\u00261 || \\"},{"line_number":55,"context_line":"        sudo -u $puser lsof -w -P -a -iUDP:${ports} -p${pids} \u003e\u00263 2\u003e\u00261"}],"source_content_type":"text/x-sh","patch_set":8,"id":"3fa7e38b_c653e56d","line":52,"in_reply_to":"3fa7e38b_407cc873","updated":"2020-02-20 08:50:51.000000000","message":"oh. damn. you\u0027re completely right! Lemme  check the others as well","commit_id":"0d0db5e5c39c0b2e6e2ae22096418886e021f879"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b1027f0882c1db776b78d190761c325118bda3e3","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    # Here, we use the embedded `ps\u0027 filter capabilities, and remove the"},{"line_number":22,"context_line":"    # output header. We ensure we get the user for the selected PIDs only."},{"line_number":23,"context_line":"    # In order to ensure we don\u0027t get multiple lines, we truncate it with `head\u0027"},{"line_number":24,"context_line":"    ps -h -q${pid} -o user | head -n1"},{"line_number":25,"context_line":"}"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"healthcheck_curl () {"}],"source_content_type":"text/x-sh","patch_set":9,"id":"3fa7e38b_b9902799","line":24,"range":{"start_line":24,"start_character":29,"end_line":24,"end_character":37},"updated":"2020-02-22 13:03:05.000000000","message":"We could use \u0027uniq -u\u0027 as well?\nWould there be any value in failing the healthcheck in case a process has PID\u0027s under different users?","commit_id":"d03401438c22e59d4f51cedfd0af6d7d48328d45"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"0bd86bb6cdc6624194ab829972faa23a2280a37d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    # Here, we use the embedded `ps\u0027 filter capabilities, and remove the"},{"line_number":22,"context_line":"    # output header. We ensure we get the user for the selected PIDs only."},{"line_number":23,"context_line":"    # In order to ensure we don\u0027t get multiple lines, we truncate it with `head\u0027"},{"line_number":24,"context_line":"    ps -h -q${pid} -o user | head -n1"},{"line_number":25,"context_line":"}"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"healthcheck_curl () {"}],"source_content_type":"text/x-sh","patch_set":9,"id":"1fa4df85_ef75cccd","line":24,"range":{"start_line":24,"start_character":29,"end_line":24,"end_character":37},"in_reply_to":"1fa4df85_9d06d320","updated":"2020-02-24 11:04:13.000000000","message":"ok, Thanks Cédric,","commit_id":"d03401438c22e59d4f51cedfd0af6d7d48328d45"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"14d7141d55b02c66bdc65b7719c74a1372d32898","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    # Here, we use the embedded `ps\u0027 filter capabilities, and remove the"},{"line_number":22,"context_line":"    # output header. We ensure we get the user for the selected PIDs only."},{"line_number":23,"context_line":"    # In order to ensure we don\u0027t get multiple lines, we truncate it with `head\u0027"},{"line_number":24,"context_line":"    ps -h -q${pid} -o user | head -n1"},{"line_number":25,"context_line":"}"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"healthcheck_curl () {"}],"source_content_type":"text/x-sh","patch_set":9,"id":"1fa4df85_9d06d320","line":24,"range":{"start_line":24,"start_character":29,"end_line":24,"end_character":37},"in_reply_to":"3fa7e38b_b9902799","updated":"2020-02-24 07:38:36.000000000","message":"during my multiple tests, I couldn\u0027t find a check using this method with multiple pids. The \"head -n1\" here is a security belt in order to ensure we don\u0027t get any other line, but I doubt it\u0027s really useful - as said, all the tests made didn\u0027t return anything with more than one line...","commit_id":"d03401438c22e59d4f51cedfd0af6d7d48328d45"}],"healthcheck/memcached":[{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"6f07ea47f495906ddb4d64bae73aac3f6124639b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    listen_addr\u003d\"[${listen_addr}]\""},{"line_number":8,"context_line":"fi"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"health_output \"version\" | socat - TCP:$listen_addr:11211 1\u003e/dev/null"},{"line_number":11,"context_line":"exit $?"}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"3fa7e38b_a0427566","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":13},"updated":"2020-02-18 13:57:46.000000000","message":"echo should stay for this one I expect","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"},{"author":{"_account_id":28223,"name":"Cedric Jeanneret","display_name":"cjeanner (Tengu)","email":"cjeanner@redhat.com","username":"cjeanner"},"change_message_id":"2d015b8de71ade12f165993bbf7d37e549892edd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    listen_addr\u003d\"[${listen_addr}]\""},{"line_number":8,"context_line":"fi"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"health_output \"version\" | socat - TCP:$listen_addr:11211 1\u003e/dev/null"},{"line_number":11,"context_line":"exit $?"}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"3fa7e38b_536b59ed","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":13},"in_reply_to":"3fa7e38b_a0427566","updated":"2020-02-18 14:32:32.000000000","message":"yeah, I made a \"tiny\" mistake there ^^\u0027. Playing with redirections is pretty ugly anyway. latest version should work better. (same goes for the other \"echo\")","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"}],"healthcheck/redis":[{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"6f07ea47f495906ddb4d64bae73aac3f6124639b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"if parse_out\u003d$(cat \"/etc/redis.conf\" | egrep \"^bind +.*$\"); then"},{"line_number":4,"context_line":"    redis_host\u003d$(health_output -n $parse_out | awk \u0027{print $2}\u0027)"},{"line_number":5,"context_line":"else"},{"line_number":6,"context_line":"    redis_host\u003d127.0.0.1"},{"line_number":7,"context_line":"fi"}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"3fa7e38b_401ce17b","line":4,"range":{"start_line":4,"start_character":17,"end_line":4,"end_character":30},"updated":"2020-02-18 13:57:46.000000000","message":"this one too","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"6f07ea47f495906ddb4d64bae73aac3f6124639b","unresolved":false,"context_lines":[{"line_number":7,"context_line":"fi"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"if parse_out\u003d$(cat \"/etc/redis.conf\" | egrep \"^port +.*$\"); then"},{"line_number":10,"context_line":"    redis_port\u003d$(health_output -n $parse_out | awk \u0027{print $2}\u0027)"},{"line_number":11,"context_line":"else"},{"line_number":12,"context_line":"    redis_port\u003d6379"},{"line_number":13,"context_line":"fi"}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"3fa7e38b_6019dd89","line":10,"range":{"start_line":10,"start_character":17,"end_line":10,"end_character":30},"updated":"2020-02-18 13:57:46.000000000","message":"this one too","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"6f07ea47f495906ddb4d64bae73aac3f6124639b","unresolved":false,"context_lines":[{"line_number":13,"context_line":"fi"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"if parse_out\u003d$(cat \"/etc/redis.conf\" | egrep \"^requirepass +.*$\"); then"},{"line_number":16,"context_line":"    redis_pass\u003d$(health_output -n $parse_out | awk \u0027{print $2}\u0027)"},{"line_number":17,"context_line":"    result\u003d$(printf \"*2\\r\\n\\$4\\r\\nAUTH\\r\\n\\$${#redis_pass}\\r\\n${redis_pass}\\r\\n*1\\r\\n\\$4\\r\\nPING\\r\\n\" | socat - TCP:$redis_host:$redis_port)"},{"line_number":18,"context_line":"else"},{"line_number":19,"context_line":"    result\u003d$(printf \"*1\\r\\n\\$4\\r\\nPING\\r\\n\" | socat - TCP:$redis_host:$redis_port)"}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"3fa7e38b_2023e5bd","line":16,"range":{"start_line":16,"start_character":17,"end_line":16,"end_character":30},"updated":"2020-02-18 13:57:46.000000000","message":"this one too","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"6f07ea47f495906ddb4d64bae73aac3f6124639b","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    result\u003d$(printf \"*1\\r\\n\\$4\\r\\nPING\\r\\n\" | socat - TCP:$redis_host:$redis_port)"},{"line_number":20,"context_line":"fi"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"if health_output $result | grep -q \u0027+PONG\u0027; then"},{"line_number":23,"context_line":"    health_output \"Redis server responded correctly on ${redis_host}:${redis_port}.\""},{"line_number":24,"context_line":"else"},{"line_number":25,"context_line":"    health_output \"Redis server does not respond correctly: ${result}\""}],"source_content_type":"application/x-shellscript","patch_set":6,"id":"3fa7e38b_c028d19f","line":22,"range":{"start_line":22,"start_character":3,"end_line":22,"end_character":16},"updated":"2020-02-18 13:57:46.000000000","message":"this one too","commit_id":"3e3d34665f95bbb7c962a5519dde457244f94140"}]}
