)]}'
{"docker/mariadb/extend_start.sh":[{"author":{"_account_id":14103,"name":"wangtianfa","email":"wang.tianfa@99cloud.net","username":"wangtianfa"},"change_message_id":"7cd3c9b2d961f4f3a84eb99610516d4b85c9da70","unresolved":false,"context_lines":[{"line_number":59,"context_line":"if [[ \"$MARIADB_BOOTSTRAPPED\" \u003d\u003d \"false\" ]]; then"},{"line_number":60,"context_line":"    echo \"Mariadb bootstrapping isn\u0027t complete\""},{"line_number":61,"context_line":"    exit 1"},{"line_number":62,"context_line":"fi"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"#***** KOLLA-KUBERNETES *****"}],"source_content_type":"text/x-sh","patch_set":4,"id":"9abb7d3a_ec59eb5c","line":62,"range":{"start_line":62,"start_character":0,"end_line":62,"end_character":2},"updated":"2016-06-03 15:35:28.000000000","message":"if MARIADB_BOOTSTRAPPED !\u003d \"false\",Will it happen?","commit_id":"6008d7f076c9034d469eb59e72d41c58a8ee397a"},{"author":{"_account_id":21996,"name":"Ken Wronkiewicz","email":"wh-openstack@wirewd.com","username":"bowtie"},"change_message_id":"f0973cafac9db63abbbd147afdfe93cc410cbe70","unresolved":false,"context_lines":[{"line_number":44,"context_line":""},{"line_number":45,"context_line":"#***** KOLLA-KUBERNETES *****"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# TODO: Get Kubernetes to name mariadb-bootstrap pod without a hash so we don\u0027t"},{"line_number":48,"context_line":"# have to discover its name"},{"line_number":49,"context_line":"bootstrap_url\u003d$(curl http://localhost:8080/api/v1/namespaces/default/pods | grep /api/v1/namespaces/default/pods/mariadb-bootstrap | cut -d \u0027\"\u0027 -f 4) || true"},{"line_number":50,"context_line":"MARIADB_BOOTSTRAPPED\u003d$(curl http://localhost:8080$bootstrap_url | python -c \u0027import json,sys;obj\u003djson.load(sys.stdin);print obj[\"status\"][\"phase\"]\u0027) || MARIADB_BOOTSTRAPPED\u003d\u0027Succeeded\u0027"}],"source_content_type":"text/x-sh","patch_set":5,"id":"9abb7d3a_b5d6fac0","line":47,"updated":"2016-06-03 19:25:47.000000000","message":"So, we can add it to the bootstrap job instead of the bootstrap pod and then you don\u0027t need to deal with the hash.\n\nThing is, all of the job stuff disappears after the job completes.  So that\u0027ll help with restarts of the job but not necessarily prevent someone from coming along later and running bootstrap on a running cluster and wiping everything out.","commit_id":"a9a985013ade7d93cc88e838467f10c5da030b6a"},{"author":{"_account_id":21996,"name":"Ken Wronkiewicz","email":"wh-openstack@wirewd.com","username":"bowtie"},"change_message_id":"98c21051344003356f6fcab01fe66c1a37aed0fb","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# TODO: Get Kubernetes to name mariadb-bootstrap pod without a hash so we don\u0027t"},{"line_number":48,"context_line":"# have to discover its name"},{"line_number":49,"context_line":"bootstrap_url\u003d$(curl http://${KUBERNETES_IP_ADDRESS}:${KUBERNETES_CONTROLLER_PORT}/api/v1/namespaces/default/pods | grep /api/v1/namespaces/default/pods/mariadb-bootstrap | cut -d \u0027\"\u0027 -f 4) || true"},{"line_number":50,"context_line":"MARIADB_BOOTSTRAPPED\u003d$(curl http://${KUBERNETES_IP_ADDRESS}:${KUBERNETES_CONTROLLER_PORT}$bootstrap_url | python -c \u0027import json,sys;obj\u003djson.load(sys.stdin);print obj[\"status\"][\"phase\"]\u0027) || MARIADB_BOOTSTRAPPED\u003d\u0027Succeeded\u0027"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"if [[ \"$MARIADB_BOOTSTRAPPED\" !\u003d \"Succeeded\" ]]; then"}],"source_content_type":"text/x-sh","patch_set":6,"id":"9abb7d3a_bbc5493e","line":49,"updated":"2016-06-03 19:55:46.000000000","message":"we can just use http://localhost:8080/apis/extensions/v1beta1/namespaces/default/jobs/mariadb-bootstrap instead -- that\u0027s the job API endpoint.\n\nThis means that, if the machine the job is running on dies and the job pod is rescheduled onto another machine, you\u0027ll see the state of the previous job.","commit_id":"d89c342d0514cec2c1577320dbd7a0c660bfbaa4"},{"author":{"_account_id":10419,"name":"Ryan Hallisey","email":"rhallise@redhat.com","username":"rhallisey"},"change_message_id":"48aae92c7034a2863717bed64aadb5e7dd6bce50","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# TODO: Get Kubernetes to name mariadb-bootstrap pod without a hash so we don\u0027t"},{"line_number":48,"context_line":"# have to discover its name"},{"line_number":49,"context_line":"bootstrap_url\u003d$(curl http://${KUBERNETES_IP_ADDRESS}:${KUBERNETES_CONTROLLER_PORT}/api/v1/namespaces/default/pods | grep /api/v1/namespaces/default/pods/mariadb-bootstrap | cut -d \u0027\"\u0027 -f 4) || true"},{"line_number":50,"context_line":"MARIADB_BOOTSTRAPPED\u003d$(curl http://${KUBERNETES_IP_ADDRESS}:${KUBERNETES_CONTROLLER_PORT}$bootstrap_url | python -c \u0027import json,sys;obj\u003djson.load(sys.stdin);print obj[\"status\"][\"phase\"]\u0027) || MARIADB_BOOTSTRAPPED\u003d\u0027Succeeded\u0027"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"if [[ \"$MARIADB_BOOTSTRAPPED\" !\u003d \"Succeeded\" ]]; then"}],"source_content_type":"text/x-sh","patch_set":6,"id":"7aa08908_e24e6095","line":49,"in_reply_to":"9abb7d3a_bbc5493e","updated":"2016-06-05 13:55:51.000000000","message":"The only issue with this is that jobs have no sense of state.  Where as with pods we can check if the state is \u0027Succeeded\u0027 or if it\u0027s \u0027Running\u0027.\n\nWe could create a status within the job, but that gets us back to using a lock.","commit_id":"d89c342d0514cec2c1577320dbd7a0c660bfbaa4"}]}
