)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":13,"context_line":"- Indicate the implementation of the masakari driver."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This PoC is based on a idea called as \"Modular architecture\"."},{"line_number":16,"context_line":"But \"Modular architecture\" is not implemented yet. So this is just"},{"line_number":17,"context_line":"a PoC."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"On this patch, we assumed that nova-host-alerter has \u0027driver\u0027 param"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_14621aaf","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":49},"updated":"2018-03-29 14:35:57.000000000","message":"Well, it\u0027s partially implemented ;-)","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":13,"context_line":"- Indicate the implementation of the masakari driver."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This PoC is based on a idea called as \"Modular architecture\"."},{"line_number":16,"context_line":"But \"Modular architecture\" is not implemented yet. So this is just"},{"line_number":17,"context_line":"a PoC."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"On this patch, we assumed that nova-host-alerter has \u0027driver\u0027 param"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_16099494","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":49},"in_reply_to":"bf659307_14621aaf","updated":"2018-04-02 04:09:46.000000000","message":"I modified this sentence.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"reference:"},{"line_number":26,"context_line":"* The idea of modular architecture"},{"line_number":27,"context_line":"  https://aspiers.github.io/openstack-day-israel-2017-compute-ha/#/modular"},{"line_number":28,"context_line":"* Specs of a method to recover all virtual machines"},{"line_number":29,"context_line":"  https://github.com/openstack/openstack-resource-agents-specs/blob/master/specs/newton/approved/newton-instance-ha-host-recovery.rst"},{"line_number":30,"context_line":"  https://review.openstack.org/#/c/406659/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_cff08f00","line":27,"updated":"2018-03-29 14:35:57.000000000","message":"Also worth mentioning the architecture diagram:\n\nhttps://aspiers.github.io/openstack-day-israel-2017-compute-ha/#/nova-host-alerter","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"reference:"},{"line_number":26,"context_line":"* The idea of modular architecture"},{"line_number":27,"context_line":"  https://aspiers.github.io/openstack-day-israel-2017-compute-ha/#/modular"},{"line_number":28,"context_line":"* Specs of a method to recover all virtual machines"},{"line_number":29,"context_line":"  https://github.com/openstack/openstack-resource-agents-specs/blob/master/specs/newton/approved/newton-instance-ha-host-recovery.rst"},{"line_number":30,"context_line":"  https://review.openstack.org/#/c/406659/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_96fcc470","line":27,"in_reply_to":"bf659307_cff08f00","updated":"2018-04-02 04:09:46.000000000","message":"I added this link.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"* The idea of modular architecture"},{"line_number":27,"context_line":"  https://aspiers.github.io/openstack-day-israel-2017-compute-ha/#/modular"},{"line_number":28,"context_line":"* Specs of a method to recover all virtual machines"},{"line_number":29,"context_line":"  https://github.com/openstack/openstack-resource-agents-specs/blob/master/specs/newton/approved/newton-instance-ha-host-recovery.rst"},{"line_number":30,"context_line":"  https://review.openstack.org/#/c/406659/"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Change-Id: I6768a1822ed5f19bc66f0d6d6887194bbc32abad"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_546bb283","line":29,"updated":"2018-03-29 14:35:57.000000000","message":"Please mention this one too, it\u0027s more relevant:\n\nhttps://github.com/openstack/openstack-resource-agents-specs/blob/master/specs/newton/approved/newton-instance-ha-host-monitoring-spec.rst","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":26,"context_line":"* The idea of modular architecture"},{"line_number":27,"context_line":"  https://aspiers.github.io/openstack-day-israel-2017-compute-ha/#/modular"},{"line_number":28,"context_line":"* Specs of a method to recover all virtual machines"},{"line_number":29,"context_line":"  https://github.com/openstack/openstack-resource-agents-specs/blob/master/specs/newton/approved/newton-instance-ha-host-recovery.rst"},{"line_number":30,"context_line":"  https://review.openstack.org/#/c/406659/"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Change-Id: I6768a1822ed5f19bc66f0d6d6887194bbc32abad"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bf659307_b6f7888b","line":29,"in_reply_to":"bf659307_546bb283","updated":"2018-04-02 04:09:46.000000000","message":"I added this link.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"}],"ocf/masakari_driver.py":[{"author":{"_account_id":17517,"name":"Andrew Beekhof","email":"abeekhof@redhat.com","username":"beekhof"},"change_message_id":"0f650805630c2d62bf73e7704d9d41b632cbefd9","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # NOTE: This function uses masakari-monitors\u0027s code as reference."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        # Make event."},{"line_number":131,"context_line":"        event \u003d self._make_event()"},{"line_number":132,"context_line":"        LOG.info(\"Send a notification. %s\", event)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        # Get client."}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_cd31fba4","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":34},"updated":"2018-03-19 02:05:00.000000000","message":"Seems strange to create an event (with HOST_STATUS_NORMAL??) only to extract particular fields  for create_notification()","commit_id":"60f7ae9fbb01f6fe04233c30f1bf9357765d8bcb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"7747138f454bf75599fac95ba3f7d17329a63bd4","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # NOTE: This function uses masakari-monitors\u0027s code as reference."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        # Make event."},{"line_number":131,"context_line":"        event \u003d self._make_event()"},{"line_number":132,"context_line":"        LOG.info(\"Send a notification. %s\", event)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        # Get client."}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_369c03bf","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":34},"in_reply_to":"df7087c5_2dda8e16","updated":"2018-03-23 06:36:34.000000000","message":"Done","commit_id":"60f7ae9fbb01f6fe04233c30f1bf9357765d8bcb"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"e57870b371e29edc643fad58a7f059df95aa842a","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        # NOTE: This function uses masakari-monitors\u0027s code as reference."},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        # Make event."},{"line_number":131,"context_line":"        event \u003d self._make_event()"},{"line_number":132,"context_line":"        LOG.info(\"Send a notification. %s\", event)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        # Get client."}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_2dda8e16","line":131,"range":{"start_line":131,"start_character":8,"end_line":131,"end_character":34},"in_reply_to":"df7087c5_cd31fba4","updated":"2018-03-23 01:04:31.000000000","message":"There is no reason.\nSo I address it.","commit_id":"60f7ae9fbb01f6fe04233c30f1bf9357765d8bcb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        print(\"Usage: %s \u003cfailure hostname\u003e\")"},{"line_number":165,"context_line":"        sys.exit(1)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    masakari_driver \u003d MasakariDriver(sys.argv[1])"},{"line_number":168,"context_line":"    masakari_driver.send_notification()"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    sys.exit(0)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_ef86b313","line":168,"range":{"start_line":167,"start_character":0,"end_line":168,"end_character":39},"updated":"2018-03-29 14:35:57.000000000","message":"As noted in nova-host-alerter, I think we need this driver to handle multiple hosts at once.  So maybe it could do something like:\n\n    hosts \u003d sys.stdin.read().splitlines()\n    masakari_driver \u003d MasakariDriver()\n    for host in hosts:\n        masakari_driver.send_notification(host)","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        print(\"Usage: %s \u003cfailure hostname\u003e\")"},{"line_number":165,"context_line":"        sys.exit(1)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    masakari_driver \u003d MasakariDriver(sys.argv[1])"},{"line_number":168,"context_line":"    masakari_driver.send_notification()"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    sys.exit(0)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_53aabe18","line":168,"range":{"start_line":167,"start_character":0,"end_line":168,"end_character":39},"in_reply_to":"bf659307_ef86b313","updated":"2018-04-02 04:09:46.000000000","message":"Done","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"}],"ocf/nova-host-alerter":[{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# NOTE: This code is PoC."},{"line_number":5,"context_line":"#       So please note that this is different from the real nova-host-alerter."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"#######################################################################"},{"line_number":8,"context_line":"# Initialization:"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_74fd96af","line":5,"updated":"2018-03-29 14:35:57.000000000","message":"I think it should be possible to get rid of this from the review, based on the suggestions I make below.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"# NOTE: This code is PoC."},{"line_number":5,"context_line":"#       So please note that this is different from the real nova-host-alerter."},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"#######################################################################"},{"line_number":8,"context_line":"# Initialization:"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_33c4eaf4","line":5,"in_reply_to":"bf659307_74fd96af","updated":"2018-04-02 04:09:46.000000000","message":"Removed.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"\u003cparameters\u003e"},{"line_number":27,"context_line":"\u003cparameter name\u003d\"driver\" unique\u003d\"1\" required\u003d\"1\"\u003e"},{"line_number":28,"context_line":"\u003clongdesc lang\u003d\"en\"\u003e"},{"line_number":29,"context_line":"Specify the driver of recovery. \"masakari\" or \"mistral\" is required to specify."},{"line_number":30,"context_line":"\u003c/longdesc\u003e"},{"line_number":31,"context_line":"\u003cshortdesc lang\u003d\"en\"\u003eDriver of recovery.\u003c/shortdesc\u003e"},{"line_number":32,"context_line":"\u003ccontent type\u003d\"string\" /\u003e"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_7416f6f3","line":29,"range":{"start_line":29,"start_character":32,"end_line":29,"end_character":79},"updated":"2018-03-29 14:35:57.000000000","message":"Just write \"Currently only masakari is supported\".","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":26,"context_line":"\u003cparameters\u003e"},{"line_number":27,"context_line":"\u003cparameter name\u003d\"driver\" unique\u003d\"1\" required\u003d\"1\"\u003e"},{"line_number":28,"context_line":"\u003clongdesc lang\u003d\"en\"\u003e"},{"line_number":29,"context_line":"Specify the driver of recovery. \"masakari\" or \"mistral\" is required to specify."},{"line_number":30,"context_line":"\u003c/longdesc\u003e"},{"line_number":31,"context_line":"\u003cshortdesc lang\u003d\"en\"\u003eDriver of recovery.\u003c/shortdesc\u003e"},{"line_number":32,"context_line":"\u003ccontent type\u003d\"string\" /\u003e"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_4bf1c26a","line":29,"range":{"start_line":29,"start_character":32,"end_line":29,"end_character":79},"in_reply_to":"bf659307_7416f6f3","updated":"2018-04-02 04:09:46.000000000","message":"Done","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":55,"context_line":"MASAKARI_DRIVER\u003d${SCRIPT_DIR}/masakari_driver.py"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"nova_host_alerter_start() {"},{"line_number":58,"context_line":"        nova_host_alerter_status"},{"line_number":59,"context_line":"        if [ $? -eq $OCF_SUCCESS ]"},{"line_number":60,"context_line":"        then"},{"line_number":61,"context_line":"                ocf_log info \"`basename $0` is already running.\""}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_f4168655","line":58,"updated":"2018-03-29 14:35:57.000000000","message":"This should not call the monitor code, because then \u0027start\u0027 would actually invoke the driver code even before it\u0027s officially started.  Better to copy NovaEvacuate\u0027s approach here:\n\nhttps://git.openstack.org/cgit/openstack/openstack-resource-agents/tree/ocf/NovaEvacuate?id\u003d42bb0c53e3c21550bc37bc63e0f0b1f59a2be000#n163","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":55,"context_line":"MASAKARI_DRIVER\u003d${SCRIPT_DIR}/masakari_driver.py"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"nova_host_alerter_start() {"},{"line_number":58,"context_line":"        nova_host_alerter_status"},{"line_number":59,"context_line":"        if [ $? -eq $OCF_SUCCESS ]"},{"line_number":60,"context_line":"        then"},{"line_number":61,"context_line":"                ocf_log info \"`basename $0` is already running.\""}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_8b2b5a93","line":58,"in_reply_to":"bf659307_f4168655","updated":"2018-04-02 04:09:46.000000000","message":"Done","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":67,"context_line":"}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"nova_host_alerter_stop() {"},{"line_number":70,"context_line":"        nova_host_alerter_status"},{"line_number":71,"context_line":"        RC\u003d$?"},{"line_number":72,"context_line":"        case \"$RC\" in"},{"line_number":73,"context_line":"        ${OCF_NOT_RUNNING})"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_4f1a3f6f","line":70,"updated":"2018-03-29 14:35:57.000000000","message":"This should not call the monitor code, because then \u0027stop\u0027 would actually invoke the driver code as part of shutdown, and we need \u0027stop\u0027 to be quick to avoid it exceeding the stop timeout which would cause fencing.  Better to copy NovaEvacuate\u0027s approach here:\n\nhttps://git.openstack.org/cgit/openstack/openstack-resource-agents/tree/ocf/NovaEvacuate?id\u003d42bb0c53e3c21550bc37bc63e0f0b1f59a2be000#n158","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":67,"context_line":"}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"nova_host_alerter_stop() {"},{"line_number":70,"context_line":"        nova_host_alerter_status"},{"line_number":71,"context_line":"        RC\u003d$?"},{"line_number":72,"context_line":"        case \"$RC\" in"},{"line_number":73,"context_line":"        ${OCF_NOT_RUNNING})"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_6b2046ad","line":70,"in_reply_to":"bf659307_4f1a3f6f","updated":"2018-04-02 04:09:46.000000000","message":"Done","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return $OCF_ERR_GENERIC"},{"line_number":84,"context_line":"}"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"nova_host_alerter_status() {"},{"line_number":87,"context_line":"        [ -f $OCF_RESKEY_state ] || return $OCF_NOT_RUNNING"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        # This condition is meaningless since this code is PoC."}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_74a6f655","line":86,"range":{"start_line":86,"start_character":0,"end_line":86,"end_character":24},"updated":"2018-03-29 14:35:57.000000000","message":"Let\u0027s call this nova_host_alerter_monitor, because the \u0027status\u0027 action is deprecated.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        return $OCF_ERR_GENERIC"},{"line_number":84,"context_line":"}"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"nova_host_alerter_status() {"},{"line_number":87,"context_line":"        [ -f $OCF_RESKEY_state ] || return $OCF_NOT_RUNNING"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"        # This condition is meaningless since this code is PoC."}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_6e05b410","line":86,"range":{"start_line":86,"start_character":0,"end_line":86,"end_character":24},"in_reply_to":"bf659307_74a6f655","updated":"2018-04-02 04:09:46.000000000","message":"Done","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # Actually, it should be condition that \"if nova-host-alerter detects"},{"line_number":91,"context_line":"        # a failure\"."},{"line_number":92,"context_line":"        FLG_FILE\u003d/tmp/nova-host-alerter-flg"},{"line_number":93,"context_line":"        if [ -e $FLG_FILE ]; then"},{"line_number":94,"context_line":"            case \"$OCF_RESKEY_driver\" in"},{"line_number":95,"context_line":"                \"masakari\")"},{"line_number":96,"context_line":"                    # Execute masakari_driver.py. Please note that"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_34bf1eb1","line":93,"updated":"2018-03-29 14:35:57.000000000","message":"This needs to check the attributes in Pacemaker\u0027s attrd, via attrd_updater.  Here is how we do it in the old architecture:\n\nhttps://git.openstack.org/cgit/openstack/openstack-resource-agents/tree/ocf/NovaEvacuate?id\u003d42bb0c53e3c21550bc37bc63e0f0b1f59a2be000#n254\n\nFrom this you can get a list of *all* nodes for which we need to notify masakari.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # Actually, it should be condition that \"if nova-host-alerter detects"},{"line_number":91,"context_line":"        # a failure\"."},{"line_number":92,"context_line":"        FLG_FILE\u003d/tmp/nova-host-alerter-flg"},{"line_number":93,"context_line":"        if [ -e $FLG_FILE ]; then"},{"line_number":94,"context_line":"            case \"$OCF_RESKEY_driver\" in"},{"line_number":95,"context_line":"                \"masakari\")"},{"line_number":96,"context_line":"                    # Execute masakari_driver.py. Please note that"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_f3a0b244","line":93,"in_reply_to":"bf659307_34bf1eb1","updated":"2018-04-02 04:09:46.000000000","message":"Done","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                    # The failure node is hard-corded since this code is PoC,"},{"line_number":99,"context_line":"                    # but actually the failure node should be set by some"},{"line_number":100,"context_line":"                    # kind of logic. Here\u0027s how to call masakari_driver.py."},{"line_number":101,"context_line":"                    FAILURE_NODE\u003d\"compute-node1\""},{"line_number":102,"context_line":"                    $MASAKARI_DRIVER \"$FAILURE_NODE\""},{"line_number":103,"context_line":"                    retval\u003d$?"},{"line_number":104,"context_line":"                    if [ $retval -eq 0 ]; then"},{"line_number":105,"context_line":"                        ocf_log info \"Succeeded in sending a notification.\""}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_0f0767cc","line":102,"range":{"start_line":101,"start_character":0,"end_line":102,"end_character":52},"updated":"2018-03-29 14:35:57.000000000","message":"As per above, I think we should send all hosts to a single invocation of $MASAKARI_DRIVER.  Maybe it would be cleaner to send them via stdin rather than as arguments?","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                    # The failure node is hard-corded since this code is PoC,"},{"line_number":99,"context_line":"                    # but actually the failure node should be set by some"},{"line_number":100,"context_line":"                    # kind of logic. Here\u0027s how to call masakari_driver.py."},{"line_number":101,"context_line":"                    FAILURE_NODE\u003d\"compute-node1\""},{"line_number":102,"context_line":"                    $MASAKARI_DRIVER \"$FAILURE_NODE\""},{"line_number":103,"context_line":"                    retval\u003d$?"},{"line_number":104,"context_line":"                    if [ $retval -eq 0 ]; then"},{"line_number":105,"context_line":"                        ocf_log info \"Succeeded in sending a notification.\""}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_938b76c1","line":102,"range":{"start_line":101,"start_character":0,"end_line":102,"end_character":52},"in_reply_to":"bf659307_0f0767cc","updated":"2018-04-02 04:09:46.000000000","message":"Done","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                    fi"},{"line_number":109,"context_line":"                    rm -rf $FLG_FILE"},{"line_number":110,"context_line":"                    ;;"},{"line_number":111,"context_line":"                \"mistral\")"},{"line_number":112,"context_line":"                    # Some logics."},{"line_number":113,"context_line":"                    ;;"},{"line_number":114,"context_line":"                *)"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_94e86ae2","line":111,"updated":"2018-03-29 14:35:57.000000000","message":"I think you can remove this one until we support it.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                    fi"},{"line_number":109,"context_line":"                    rm -rf $FLG_FILE"},{"line_number":110,"context_line":"                    ;;"},{"line_number":111,"context_line":"                \"mistral\")"},{"line_number":112,"context_line":"                    # Some logics."},{"line_number":113,"context_line":"                    ;;"},{"line_number":114,"context_line":"                *)"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_ce3c00ca","line":111,"in_reply_to":"bf659307_94e86ae2","updated":"2018-04-02 04:09:46.000000000","message":"Removed.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                    # Some logics."},{"line_number":113,"context_line":"                    ;;"},{"line_number":114,"context_line":"                *)"},{"line_number":115,"context_line":"                    # Some logics."},{"line_number":116,"context_line":"                    ;;"},{"line_number":117,"context_line":"            esac"},{"line_number":118,"context_line":"        fi"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_74c4b65f","line":115,"updated":"2018-03-29 14:35:57.000000000","message":"This one should result in an error, e.g.\n\n    ocf_log err \"Driver type \u0027$OCF_RESKEY_driver\u0027 is not supported.\"\n    return $OCF_ERR_CONFIGURED","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":112,"context_line":"                    # Some logics."},{"line_number":113,"context_line":"                    ;;"},{"line_number":114,"context_line":"                *)"},{"line_number":115,"context_line":"                    # Some logics."},{"line_number":116,"context_line":"                    ;;"},{"line_number":117,"context_line":"            esac"},{"line_number":118,"context_line":"        fi"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_0e5438fd","line":115,"in_reply_to":"bf659307_74c4b65f","updated":"2018-04-02 04:09:46.000000000","message":"Done","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        nova_host_alerter_stop"},{"line_number":129,"context_line":"        RC\u003d$?"},{"line_number":130,"context_line":"        ;;"},{"line_number":131,"context_line":"status)"},{"line_number":132,"context_line":"        nova_host_alerter_status"},{"line_number":133,"context_line":"        RC\u003d$?"},{"line_number":134,"context_line":"        ;;"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_747b56bd","line":131,"updated":"2018-03-29 14:35:57.000000000","message":"\u0027status\u0027 is deprecated so we don\u0027t actually need it.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        nova_host_alerter_stop"},{"line_number":129,"context_line":"        RC\u003d$?"},{"line_number":130,"context_line":"        ;;"},{"line_number":131,"context_line":"status)"},{"line_number":132,"context_line":"        nova_host_alerter_status"},{"line_number":133,"context_line":"        RC\u003d$?"},{"line_number":134,"context_line":"        ;;"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_ce41603b","line":131,"in_reply_to":"bf659307_747b56bd","updated":"2018-04-02 04:09:46.000000000","message":"Done","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"d6dd4f9940513675d670ac4197a7d8fcc894195f","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        RC\u003d$?"},{"line_number":134,"context_line":"        ;;"},{"line_number":135,"context_line":"monitor)"},{"line_number":136,"context_line":"        nova_host_alerter_status"},{"line_number":137,"context_line":"        RC\u003d$?"},{"line_number":138,"context_line":"        ;;"},{"line_number":139,"context_line":"meta-data)"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_b4f80e7b","line":136,"updated":"2018-03-29 14:35:57.000000000","message":"Let\u0027s call this nova_host_alerter_monitor, because the \u0027status\u0027 action is deprecated.","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":23226,"name":"takahara.kengo","email":"takahara-kn@njk.co.jp","username":"takahara.kengo"},"change_message_id":"3ef1ec3babd52e420955052d790353e78d155bbf","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        RC\u003d$?"},{"line_number":134,"context_line":"        ;;"},{"line_number":135,"context_line":"monitor)"},{"line_number":136,"context_line":"        nova_host_alerter_status"},{"line_number":137,"context_line":"        RC\u003d$?"},{"line_number":138,"context_line":"        ;;"},{"line_number":139,"context_line":"meta-data)"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"bf659307_2e59fc33","line":136,"in_reply_to":"bf659307_b4f80e7b","updated":"2018-04-02 04:09:46.000000000","message":"Done","commit_id":"c0d921672339e85231ecbc749149c72858f0c4bb"},{"author":{"_account_id":2394,"name":"Adam Spiers","email":"aspiers@suse.com","username":"adam.spiers"},"change_message_id":"1b3934092ec8a2338bcb84a40593a7247ceb6043","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"nova_host_alerter_start() {"},{"line_number":54,"context_line":"        touch \"$statefile\""},{"line_number":55,"context_line":"        # Do not invole monitor here so that the start timeout can be low"},{"line_number":56,"context_line":"        return $?"},{"line_number":57,"context_line":"}"},{"line_number":58,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"5fc1f717_33dd5e14","line":55,"range":{"start_line":55,"start_character":17,"end_line":55,"end_character":23},"updated":"2019-03-07 15:00:10.000000000","message":"nitpick: \"involve\"","commit_id":"39ec62f0a05ce4c0a66abf7398fb9554ebb518cc"}]}
