)]}'
{"elasticsearch/templates/bin/_elasticsearch.sh.tpl":[{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"a5ffc0afb1e022414557a6de9320595a7c95e223","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    done"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    echo \"Re-enabling Replica Shard Allocation\""},{"line_number":67,"context_line":"    curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" -XPUT -H \u0027Content-Type: application/json\u0027 \\"},{"line_number":68,"context_line":"     \"${ELASTICSEARCH_ENDPOINT}/_cluster/settings\" -d \"{"},{"line_number":69,"context_line":"      \\\"persistent\\\": {"},{"line_number":70,"context_line":"        \\\"cluster.routing.allocation.enable\\\": null"},{"line_number":71,"context_line":"      }"},{"line_number":72,"context_line":"    }\""},{"line_number":73,"context_line":"  fi"},{"line_number":74,"context_line":"}"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":1,"id":"ff570b3c_8c8f9a73","line":72,"range":{"start_line":67,"start_character":0,"end_line":72,"end_character":6},"updated":"2020-06-04 17:12:21.000000000","message":"I think this quoting is a bit off, might need to tweak it.","commit_id":"b67d2cdafccf099f45974c7f7aa464e99c7ae534"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"1ac90275f01a85976ac6dc672e18ba22f2763064","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    echo \"Node ${NODE_NAME} has restarted. Waiting to rejoin the cluster.\""},{"line_number":52,"context_line":"    rejoined\u003d$(curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" \"${ELASTICSEARCH_ENDPOINT}/_cat/nodes\" | grep -w $NODE_NAME || true )"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    while [ -z \"$rejoined\" ]; do"},{"line_number":55,"context_line":"      sleep 5"},{"line_number":56,"context_line":"      rejoined\u003d$(curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" \"${ELASTICSEARCH_ENDPOINT}/_cat/nodes\" | grep -w $NODE_NAME || true )"},{"line_number":57,"context_line":"    done"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    echo \"Re-enabling Replica Shard Allocation\""},{"line_number":60,"context_line":"    curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" -XPUT -H \u0027Content-Type: application/json\u0027 \\"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"ff570b3c_549ce868","line":57,"range":{"start_line":54,"start_character":0,"end_line":57,"end_character":8},"updated":"2020-06-04 19:49:14.000000000","message":"This could be it\u0027s own function since we use it multiple times","commit_id":"90ba90aa96c34223a72cb480c42fb38cd4b085c2"},{"author":{"_account_id":30777,"name":"Steven Fitzpatrick","email":"steven@fitzpatrick.wtf","username":"sf280x"},"change_message_id":"6bbb43dd4d38ec55df96df64128f3e26ab167f0e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    echo \"Node ${NODE_NAME} has restarted. Waiting to rejoin the cluster.\""},{"line_number":52,"context_line":"    rejoined\u003d$(curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" \"${ELASTICSEARCH_ENDPOINT}/_cat/nodes\" | grep -w $NODE_NAME || true )"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    while [ -z \"$rejoined\" ]; do"},{"line_number":55,"context_line":"      sleep 5"},{"line_number":56,"context_line":"      rejoined\u003d$(curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" \"${ELASTICSEARCH_ENDPOINT}/_cat/nodes\" | grep -w $NODE_NAME || true )"},{"line_number":57,"context_line":"    done"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    echo \"Re-enabling Replica Shard Allocation\""},{"line_number":60,"context_line":"    curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" -XPUT -H \u0027Content-Type: application/json\u0027 \\"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"ff570b3c_173d52c3","line":57,"range":{"start_line":54,"start_character":0,"end_line":57,"end_character":8},"in_reply_to":"ff570b3c_549ce868","updated":"2020-06-04 20:24:19.000000000","message":"Good point. Also, after moving this to a new function, I realized that this allocate_data_node is a no-op on initial startup. So I removed that branch of the conditional","commit_id":"90ba90aa96c34223a72cb480c42fb38cd4b085c2"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"1ac90275f01a85976ac6dc672e18ba22f2763064","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    version\u003d$(curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" \"${ELASTICSEARCH_ENDPOINT}/\" | jq -r .version.number)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    if [[ $version \u003d~ \"7.1\" ]]; then"},{"line_number":114,"context_line":"      action\u003d\"_flush/synced\""},{"line_number":115,"context_line":"    else"},{"line_number":116,"context_line":"      action\u003d\"_flush\""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"ff570b3c_f41d3c0f","line":113,"range":{"start_line":113,"start_character":10,"end_line":113,"end_character":27},"updated":"2020-06-04 19:49:14.000000000","message":"\u003d~ is regex, so it will match 7.1 as well as 7,1 or 721 or 7z1.\n\nI\u0027d ether do a hard match on \"7.1\" or do \"7\\.1\"","commit_id":"90ba90aa96c34223a72cb480c42fb38cd4b085c2"},{"author":{"_account_id":30777,"name":"Steven Fitzpatrick","email":"steven@fitzpatrick.wtf","username":"sf280x"},"change_message_id":"6bbb43dd4d38ec55df96df64128f3e26ab167f0e","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    version\u003d$(curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" \"${ELASTICSEARCH_ENDPOINT}/\" | jq -r .version.number)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    if [[ $version \u003d~ \"7.1\" ]]; then"},{"line_number":114,"context_line":"      action\u003d\"_flush/synced\""},{"line_number":115,"context_line":"    else"},{"line_number":116,"context_line":"      action\u003d\"_flush\""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"ff570b3c_d7547a00","line":113,"range":{"start_line":113,"start_character":10,"end_line":113,"end_character":27},"in_reply_to":"ff570b3c_f41d3c0f","updated":"2020-06-04 20:24:19.000000000","message":"I double checked this on my machine (ubuntu18.04). For me this dot is interpreted literally instead of as a regex:\n\n    steven@ubuntu-box:~$ if [[ \"7.1.0\" \u003d~ \"7.1\" ]]; then echo \"match\"; fi\n    match\n    steven@ubuntu-box:~$ if [[ \"7,1\" \u003d~ \"7.1\" ]]; then echo \"match\"; fi\n    steven@ubuntu-box:~$ if [[ \"721\" \u003d~ \"7.1\" ]]; then echo \"match\"; fi\n    steven@ubuntu-box:~$ if [[ \"7z1\" \u003d~ \"7.1\" ]]; then echo \"match\"; fi\n    steven@ubuntu-box:~$ if [[ \"7.1.0\" \u003d~ \"7\\.1\" ]]; then echo \"match\"; fi","commit_id":"90ba90aa96c34223a72cb480c42fb38cd4b085c2"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"1ac90275f01a85976ac6dc672e18ba22f2763064","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" -XPOST \"${ELASTICSEARCH_ENDPOINT}/$action\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    #TODO: Check the response of synced flush operations to make sure there are no failures."},{"line_number":122,"context_line":"    # Synced flush operations that fail due to pending indexing operations are listed in the response body,"},{"line_number":123,"context_line":"    # although the request itself still returns a 200 OK status. If there are failures, reissue the request."},{"line_number":124,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"ff570b3c_74a5acb4","line":121,"range":{"start_line":121,"start_character":4,"end_line":121,"end_character":9},"updated":"2020-06-04 19:49:14.000000000","message":"Put a space after the # and before the TODO","commit_id":"90ba90aa96c34223a72cb480c42fb38cd4b085c2"},{"author":{"_account_id":30777,"name":"Steven Fitzpatrick","email":"steven@fitzpatrick.wtf","username":"sf280x"},"change_message_id":"6bbb43dd4d38ec55df96df64128f3e26ab167f0e","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    curl -s -K- \u003c\u003c\u003c \"--user ${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}\" -XPOST \"${ELASTICSEARCH_ENDPOINT}/$action\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    #TODO: Check the response of synced flush operations to make sure there are no failures."},{"line_number":122,"context_line":"    # Synced flush operations that fail due to pending indexing operations are listed in the response body,"},{"line_number":123,"context_line":"    # although the request itself still returns a 200 OK status. If there are failures, reissue the request."},{"line_number":124,"context_line":""}],"source_content_type":"text/x-smarty","patch_set":2,"id":"ff570b3c_1742723e","line":121,"range":{"start_line":121,"start_character":4,"end_line":121,"end_character":9},"in_reply_to":"ff570b3c_74a5acb4","updated":"2020-06-04 20:24:19.000000000","message":"Done","commit_id":"90ba90aa96c34223a72cb480c42fb38cd4b085c2"},{"author":{"_account_id":30582,"name":"RADHIKA PAI","email":"rp592h@att.com","username":"rp592h"},"change_message_id":"83096eebc160d88a2d3d44dc49e898be87e9c837","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    touch /data/restarting"},{"line_number":120,"context_line":"    echo \"Node ${NODE_NAME} is ready to shutdown\""},{"line_number":121,"context_line":"    kill -TERM 1"},{"line_number":122,"context_line":"  }"},{"line_number":123,"context_line":"  trap drain_data_node TERM EXIT HUP INT"},{"line_number":124,"context_line":"  wait"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"ff570b3c_22b3f299","line":121,"updated":"2020-06-04 22:26:11.000000000","message":"nit: why dont we use stop() since its already defined..","commit_id":"309278389e6362202f97b24ac67d9732fd79a522"},{"author":{"_account_id":30777,"name":"Steven Fitzpatrick","email":"steven@fitzpatrick.wtf","username":"sf280x"},"change_message_id":"bf1d925b6c38f06687a7cdc16265eb5e7caba586","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    touch /data/restarting"},{"line_number":120,"context_line":"    echo \"Node ${NODE_NAME} is ready to shutdown\""},{"line_number":121,"context_line":"    kill -TERM 1"},{"line_number":122,"context_line":"  }"},{"line_number":123,"context_line":"  trap drain_data_node TERM EXIT HUP INT"},{"line_number":124,"context_line":"  wait"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"ff570b3c_e243ba6a","line":121,"in_reply_to":"ff570b3c_22b3f299","updated":"2020-06-04 22:29:18.000000000","message":"Thats a good point","commit_id":"309278389e6362202f97b24ac67d9732fd79a522"}]}
