)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23717,"name":"Surya Prakash Singh","email":"singh.surya64mnnit@gmail.com","username":"SuryaPrakash"},"change_message_id":"f87ce31f6119ef4659e8730aaa751083e18c6087","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add health check to sensu-client container"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch HEALTCHECK directive to sensu client image according to spec [1]."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"[1] https://review.openstack.org/#/c/465633"},{"line_number":12,"context_line":"Implements: blueprint container-healthchecks"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"5f201791_b5600e03","line":9,"range":{"start_line":9,"start_character":11,"end_line":9,"end_character":21},"updated":"2017-06-24 11:00:08.000000000","message":"nit\nHEALTHCHECK","commit_id":"2bf2725323a8b1ed8a990954880a812e53836304"}],"docker/sensu/sensu-client/Dockerfile.j2":[{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"89cc5d3dd7562e14affcb5b2781b891d659ef3e1","unresolved":false,"context_lines":[{"line_number":17,"context_line":"{{ macros.install_packages(sensu_client_packages | customizable(\"packages\")) }}"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"# install healthcheck script"},{"line_number":20,"context_line":"COPY healthcheck /openstack/healthcheck"},{"line_number":21,"context_line":"RUN chmod -R 755 /openstack"},{"line_number":22,"context_line":"HEALTHCHECK CMD /openstack/healthcheck"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"df140735_12930b5d","line":20,"updated":"2017-06-04 01:37:47.000000000","message":"hrm why use /openstack folder? how about use /usr/local/bin/container_healthcheck?","commit_id":"36c20dbed8ef0e76bd0c6919c42a7fc3696e307a"},{"author":{"_account_id":8745,"name":"Lars Kellogg-Stedman","email":"lars@redhat.com","username":"lars"},"change_message_id":"035829164532a2de3bf5619390f8a10be980333d","unresolved":false,"context_lines":[{"line_number":17,"context_line":"{{ macros.install_packages(sensu_client_packages | customizable(\"packages\")) }}"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"# install healthcheck script"},{"line_number":20,"context_line":"COPY healthcheck /openstack/healthcheck"},{"line_number":21,"context_line":"RUN chmod -R 755 /openstack"},{"line_number":22,"context_line":"HEALTHCHECK CMD /openstack/healthcheck"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"df140735_04d82eec","line":20,"in_reply_to":"df140735_12930b5d","updated":"2017-06-06 11:38:53.000000000","message":"I think using /usr/local/\u003canything\u003e is a bad idea because in most distributions, /usr/local is used for \"things installed not using packages\" while /usr is for \"things installed using packages\".  This would mean that instead of using an explicit path we would need to just call \"container_healthcheck\" and hope that $PATH is configured correctly.  I think that having a specific namespace for our \"container api\" makes things easier, because we don\u0027t need to rely on $PATH *and* we don\u0027t need to argue with distribution policy about /usr vs /usr/local.\n\nFurther discussion should probably happen on the spec, rather than here.","commit_id":"36c20dbed8ef0e76bd0c6919c42a7fc3696e307a"},{"author":{"_account_id":19316,"name":"Eduardo Gonzalez","email":"dabarren@gmail.com","username":"egonzalez90"},"change_message_id":"2eb44c2c07ace725f292dd3b9133a470a203bd06","unresolved":false,"context_lines":[{"line_number":15,"context_line":"{% endif %}"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"{{ macros.install_packages(sensu_client_packages | customizable(\"packages\")) }}"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"# install healthcheck script"},{"line_number":20,"context_line":"COPY healthcheck /openstack/healthcheck"},{"line_number":21,"context_line":"RUN chmod -R 755 /openstack"}],"source_content_type":"text/x-jinja2","patch_set":6,"id":"5f201791_7a442c74","line":18,"updated":"2017-06-28 09:27:04.000000000","message":"can you add a {% block somethng %} in this copy/run/healthcheck ?\n\nSome people may not need this healthchecks","commit_id":"28a9e03df744acdac6317fa75112ae0a11ea84b5"},{"author":{"_account_id":13039,"name":"Martin André","email":"m.andre@redhat.com","username":"mandre"},"change_message_id":"09854696165b6371b70d8e2a47c12577e80e4550","unresolved":false,"context_lines":[{"line_number":20,"context_line":"# install healthcheck script"},{"line_number":21,"context_line":"COPY healthcheck /openstack/healthcheck"},{"line_number":22,"context_line":"RUN chmod -R 755 /openstack"},{"line_number":23,"context_line":"HEALTHCHECK CMD /openstack/healthcheck"},{"line_number":24,"context_line":"{% endblock %}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"{% block sensu_client_footer %}{% endblock %}"}],"source_content_type":"text/x-jinja2","patch_set":7,"id":"3f1d235d_e08719d7","line":23,"updated":"2017-06-30 16:51:37.000000000","message":"It\u0027s not clear to me how we can pass the ports to check to the healthcheck script. Do we need to override the sensu_client_healthcheck block?","commit_id":"d5c4751cdf5c776e6cb2bd3c07fee73f06f901ea"}],"docker/sensu/sensu-client/healthcheck":[{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"89cc5d3dd7562e14affcb5b2781b891d659ef3e1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# check if sensu process opened rabbitmq port"},{"line_number":4,"context_line":"if lsof -nP -i tcp:5671 -i tcp:5672 | grep \"^sensu*\"; then"},{"line_number":5,"context_line":"  exit 0"},{"line_number":6,"context_line":"else"},{"line_number":7,"context_line":"  echo \u0027There is no \"^sensu*\" process with opened RabbitMQ port (5671/5672) running in the container\u0027"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"df140735_32960f4e","line":4,"updated":"2017-06-04 01:37:47.000000000","message":"can we use a dynamic port rather than static port? end-user may change the port number.","commit_id":"36c20dbed8ef0e76bd0c6919c42a7fc3696e307a"},{"author":{"_account_id":5241,"name":"Martin Magr","email":"mmagr@redhat.com","username":"mmagr"},"change_message_id":"3646c5c947adc7f136cabcc560e09f4cf609baca","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# check if sensu process opened rabbitmq port"},{"line_number":4,"context_line":"if lsof -nP -i tcp:5671 -i tcp:5672 | grep \"^sensu*\"; then"},{"line_number":5,"context_line":"  exit 0"},{"line_number":6,"context_line":"else"},{"line_number":7,"context_line":"  echo \u0027There is no \"^sensu*\" process with opened RabbitMQ port (5671/5672) running in the container\u0027"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"df140735_05096c94","line":4,"in_reply_to":"df140735_32960f4e","updated":"2017-06-06 13:25:59.000000000","message":"I would love to, but how can we implement this?","commit_id":"36c20dbed8ef0e76bd0c6919c42a7fc3696e307a"},{"author":{"_account_id":22165,"name":"caoyuan","email":"cao.yingjunz@gmail.com","username":"caoyuan"},"change_message_id":"3eac65159eeb32176c28a8f170195ae0486d2619","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"# check if sensu process opened rabbitmq port"},{"line_number":4,"context_line":"if lsof -nP -i tcp:5671 -i tcp:5672 | grep \"^sensu*\"; then"},{"line_number":5,"context_line":"  exit 0"},{"line_number":6,"context_line":"else"},{"line_number":7,"context_line":"  echo \u0027There is no \"^sensu*\" process with opened RabbitMQ port (5671/5672) running in the container\u0027"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"df140735_8f7b37f3","line":4,"in_reply_to":"df140735_32960f4e","updated":"2017-06-06 12:05:38.000000000","message":"agree","commit_id":"36c20dbed8ef0e76bd0c6919c42a7fc3696e307a"},{"author":{"_account_id":22165,"name":"caoyuan","email":"cao.yingjunz@gmail.com","username":"caoyuan"},"change_message_id":"3eac65159eeb32176c28a8f170195ae0486d2619","unresolved":false,"context_lines":[{"line_number":4,"context_line":"if lsof -nP -i tcp:5671 -i tcp:5672 | grep \"^sensu*\"; then"},{"line_number":5,"context_line":"  exit 0"},{"line_number":6,"context_line":"else"},{"line_number":7,"context_line":"  echo \u0027There is no \"^sensu*\" process with opened RabbitMQ port (5671/5672) running in the container\u0027"},{"line_number":8,"context_line":"  exit 1"},{"line_number":9,"context_line":"fi"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"df140735_6f7ea3e4","line":7,"range":{"start_line":7,"start_character":65,"end_line":7,"end_character":74},"updated":"2017-06-06 12:05:38.000000000","message":"ditto","commit_id":"36c20dbed8ef0e76bd0c6919c42a7fc3696e307a"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"e9ae61cb21a07042be8f45a875a92f1fe781ceb0","unresolved":false,"context_lines":[{"line_number":6,"context_line":"  healthcheck_rabbit_ports\u003d\"$healthcheck_rabbit_ports -i tcp:$port\""},{"line_number":7,"context_line":"done"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"eval \"lsof -nP $healthcheck_rabbit_ports| grep \u0027^sensu*\u0027\""},{"line_number":10,"context_line":"# check if sensu process opened rabbitmq port"},{"line_number":11,"context_line":"if $?; then"},{"line_number":12,"context_line":"  exit 0"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"5f201791_550ae889","line":9,"updated":"2017-06-23 07:26:23.000000000","message":"please use \"grep -qE \u0027\\bsensu\\b\u0027\"\nthis makes it silenced, and matches the correct regex for the user that comes in the column #3, not from the start of the line","commit_id":"d172f060cb82ea2658bc7dcbc2f7d08efde454f3"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"3354f2ad75e9323cc79e7c8076933971466f958d","unresolved":false,"context_lines":[{"line_number":6,"context_line":"  healthcheck_rabbit_ports\u003d\"$healthcheck_rabbit_ports -i tcp:$port\""},{"line_number":7,"context_line":"done"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"eval \"lsof -nP $healthcheck_rabbit_ports| grep \u0027^sensu*\u0027\""},{"line_number":10,"context_line":"# check if sensu process opened rabbitmq port"},{"line_number":11,"context_line":"if $?; then"},{"line_number":12,"context_line":"  exit 0"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"5f201791_90188e75","line":9,"in_reply_to":"5f201791_550ae889","updated":"2017-06-23 07:28:14.000000000","message":"also lsof w/o sudo will not show child processes owned by sensu but with the parent process running another user. Perhaps that\u0027s not an issue inside of the container running pid 1 as the sensu user as well.","commit_id":"d172f060cb82ea2658bc7dcbc2f7d08efde454f3"},{"author":{"_account_id":6926,"name":"Bogdan Dobrelya","email":"bdobreli@redhat.com","username":"bogdando"},"change_message_id":"ad780ac5c6423b347ada3e80944a4e25ddcb034c","unresolved":false,"context_lines":[{"line_number":6,"context_line":"  healthcheck_rabbit_ports\u003d\"$healthcheck_rabbit_ports -i tcp:$port\""},{"line_number":7,"context_line":"done"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"eval \"lsof -nP $healthcheck_rabbit_ports| grep \u0027^sensu*\u0027\""},{"line_number":10,"context_line":"# check if sensu process opened rabbitmq port"},{"line_number":11,"context_line":"if $?; then"},{"line_number":12,"context_line":"  exit 0"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"5f201791_704e1270","line":9,"in_reply_to":"5f201791_550ae889","updated":"2017-06-23 07:30:30.000000000","message":"oh, my bad, if you\u0027d like to filter by the process name, then it should be fine, just use -q please","commit_id":"d172f060cb82ea2658bc7dcbc2f7d08efde454f3"},{"author":{"_account_id":23717,"name":"Surya Prakash Singh","email":"singh.surya64mnnit@gmail.com","username":"SuryaPrakash"},"change_message_id":"4a30a277eb6fc21532c3ab76e44e48076c45228d","unresolved":false,"context_lines":[{"line_number":3,"context_line":"args\u003d\"${@:-5671 5672}\""},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"for port in $args; do"},{"line_number":6,"context_line":"  healthcheck_rabbit_ports\u003d\"$healthcheck_rabbit_ports -i tcp:$port\""},{"line_number":7,"context_line":"done"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"# check if sensu process opened rabbitmq port"}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"5f201791_d9281c98","line":6,"range":{"start_line":6,"start_character":40,"end_line":6,"end_character":47},"updated":"2017-06-27 09:38:42.000000000","message":"ditto","commit_id":"d88322ae933c7722e090b8ff408e8747a1eea6e7"},{"author":{"_account_id":23717,"name":"Surya Prakash Singh","email":"singh.surya64mnnit@gmail.com","username":"SuryaPrakash"},"change_message_id":"4a30a277eb6fc21532c3ab76e44e48076c45228d","unresolved":false,"context_lines":[{"line_number":3,"context_line":"args\u003d\"${@:-5671 5672}\""},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"for port in $args; do"},{"line_number":6,"context_line":"  healthcheck_rabbit_ports\u003d\"$healthcheck_rabbit_ports -i tcp:$port\""},{"line_number":7,"context_line":"done"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"# check if sensu process opened rabbitmq port"}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"5f201791_192334bf","line":6,"range":{"start_line":6,"start_character":14,"end_line":6,"end_character":20},"updated":"2017-06-27 09:38:42.000000000","message":"rabbitmq just a bit of improvement in naming.","commit_id":"d88322ae933c7722e090b8ff408e8747a1eea6e7"},{"author":{"_account_id":23717,"name":"Surya Prakash Singh","email":"singh.surya64mnnit@gmail.com","username":"SuryaPrakash"},"change_message_id":"4a30a277eb6fc21532c3ab76e44e48076c45228d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"done"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"# check if sensu process opened rabbitmq port"},{"line_number":10,"context_line":"eval \"lsof -nP $healthcheck_rabbit_ports| grep -q \u0027^sensu*\u0027\""},{"line_number":11,"context_line":"if $?; then"},{"line_number":12,"context_line":"  exit 0"},{"line_number":13,"context_line":"else"}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"5f201791_992064ae","line":10,"range":{"start_line":10,"start_character":28,"end_line":10,"end_character":34},"updated":"2017-06-27 09:38:42.000000000","message":"ditto","commit_id":"d88322ae933c7722e090b8ff408e8747a1eea6e7"},{"author":{"_account_id":23717,"name":"Surya Prakash Singh","email":"singh.surya64mnnit@gmail.com","username":"SuryaPrakash"},"change_message_id":"4a30a277eb6fc21532c3ab76e44e48076c45228d","unresolved":false,"context_lines":[{"line_number":12,"context_line":"  exit 0"},{"line_number":13,"context_line":"else"},{"line_number":14,"context_line":"  ports\u003d${args// /,}"},{"line_number":15,"context_line":"  echo \"There is no \u0027sensu*\u0027 process with opened RabbitMQ ports ($ports) running in the container\""},{"line_number":16,"context_line":"  exit 1"},{"line_number":17,"context_line":"fi"}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"5f201791_59852cce","line":15,"range":{"start_line":15,"start_character":26,"end_line":15,"end_character":27},"updated":"2017-06-27 09:38:42.000000000","message":"* is not needed here, it will create a bit confusion in message understanding. Kind of nit needed.","commit_id":"d88322ae933c7722e090b8ff408e8747a1eea6e7"},{"author":{"_account_id":13039,"name":"Martin André","email":"m.andre@redhat.com","username":"mandre"},"change_message_id":"09854696165b6371b70d8e2a47c12577e80e4550","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"3f1d235d_008335ce","updated":"2017-06-30 16:51:37.000000000","message":"See my comments in the spec. I suppose it\u0027s ok to have the checks in Kolla at first to kick off the effort, but I believe it would be best to develop them outside of Kolla and have a mechanism that pulls the healtch checks at the right place at build time.","commit_id":"d5c4751cdf5c776e6cb2bd3c07fee73f06f901ea"}]}
