)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3d7ccfdc5399478061041cc0df8e33d0e3c73278","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously the ceph.sh script used during the nova-live-migration job"},{"line_number":10,"context_line":"would only grep for a `compute` process when checking if the services"},{"line_number":11,"context_line":"had been restarted. This check was bogus and would always return 0 as it"},{"line_number":12,"context_line":"would always match itself. For example:"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"2020-03-13 21:06:47.682073 | primary | 2020-03-13 21:06:47.681 | root"},{"line_number":15,"context_line":"29529  0.0  0.0   4500   736 pts/0    S+   21:06   0:00 /bin/sh -c ps"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1fa4df85_e55a9f81","line":12,"range":{"start_line":11,"start_character":20,"end_line":12,"end_character":25},"updated":"2020-03-14 01:05:22.000000000","message":"Hah, nice. Sounds like something I would do","commit_id":"3ac7510a6cb6e1e05b6354814744d5334838140b"}],"gate/live_migration/hooks/ceph.sh":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3d7ccfdc5399478061041cc0df8e33d0e3c73278","unresolved":false,"context_lines":[{"line_number":102,"context_line":"function _wait_for_nova_compute_service_state {"},{"line_number":103,"context_line":"    source $BASE/new/devstack/openrc"},{"line_number":104,"context_line":"    export OS_USERNAME\u003dadmin"},{"line_number":105,"context_line":"    export OS_PROJECT_NAME\u003dadmin"},{"line_number":106,"context_line":"    local status\u003d$1"},{"line_number":107,"context_line":"    local attempt\u003d1"},{"line_number":108,"context_line":"    local max_attempts\u003d24"}],"source_content_type":"text/x-sh","patch_set":2,"id":"1fa4df85_8572cb10","line":105,"updated":"2020-03-14 01:05:22.000000000","message":"FWIW you can do all this as a one liner by:\n\n source $BASE/new/devstack/openrc admin admin","commit_id":"3ac7510a6cb6e1e05b6354814744d5334838140b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"62106c768559b30bdf24c216a073b84ca8247017","unresolved":false,"context_lines":[{"line_number":102,"context_line":"function _wait_for_nova_compute_service_state {"},{"line_number":103,"context_line":"    source $BASE/new/devstack/openrc"},{"line_number":104,"context_line":"    export OS_USERNAME\u003dadmin"},{"line_number":105,"context_line":"    export OS_PROJECT_NAME\u003dadmin"},{"line_number":106,"context_line":"    local status\u003d$1"},{"line_number":107,"context_line":"    local attempt\u003d1"},{"line_number":108,"context_line":"    local max_attempts\u003d24"}],"source_content_type":"text/x-sh","patch_set":2,"id":"1fa4df85_fb255cac","line":105,"in_reply_to":"1fa4df85_8572cb10","updated":"2020-03-14 09:50:32.000000000","message":"Gah, the thing I essentially do all the time in local devstack envs, thanks for catching that.","commit_id":"3ac7510a6cb6e1e05b6354814744d5334838140b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"3d7ccfdc5399478061041cc0df8e33d0e3c73278","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    local computes_count\u003d$(nova service-list | grep -c nova-compute)"},{"line_number":113,"context_line":"    local computes_up\u003d0"},{"line_number":114,"context_line":"    while [ \"$attempt\" -le \"$max_attempts\" ]; do"},{"line_number":115,"context_line":"        computes_up\u003d$(nova service-list | grep nova-compute | grep -c $status)"},{"line_number":116,"context_line":"        if [ \"$computes_up\" -eq \"$computes_count\" ]; then"},{"line_number":117,"context_line":"            echo \"All computes are now reporting as ${status}, proceeding...\""},{"line_number":118,"context_line":"            break"}],"source_content_type":"text/x-sh","patch_set":2,"id":"1fa4df85_c568c322","line":115,"range":{"start_line":115,"start_character":22,"end_line":115,"end_character":39},"updated":"2020-03-14 01:05:22.000000000","message":"I dunno if we should be picky, but it might be better to use the osc command here \u0027openstack compute service list\u0027 to encourage use of the unified client by example","commit_id":"3ac7510a6cb6e1e05b6354814744d5334838140b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"62106c768559b30bdf24c216a073b84ca8247017","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    local computes_count\u003d$(nova service-list | grep -c nova-compute)"},{"line_number":113,"context_line":"    local computes_up\u003d0"},{"line_number":114,"context_line":"    while [ \"$attempt\" -le \"$max_attempts\" ]; do"},{"line_number":115,"context_line":"        computes_up\u003d$(nova service-list | grep nova-compute | grep -c $status)"},{"line_number":116,"context_line":"        if [ \"$computes_up\" -eq \"$computes_count\" ]; then"},{"line_number":117,"context_line":"            echo \"All computes are now reporting as ${status}, proceeding...\""},{"line_number":118,"context_line":"            break"}],"source_content_type":"text/x-sh","patch_set":2,"id":"1fa4df85_9b3a28cb","line":115,"range":{"start_line":115,"start_character":22,"end_line":115,"end_character":39},"in_reply_to":"1fa4df85_c568c322","updated":"2020-03-14 09:50:32.000000000","message":"TIL, I was looking for this under openstack service list initially, thanks for pointing out the correct command!","commit_id":"3ac7510a6cb6e1e05b6354814744d5334838140b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"4918564f62793d0a8b68b9806704d6466c5c8c3c","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        elif [ \"$attempt\" -eq \"$max_attempts\" ]; then"},{"line_number":120,"context_line":"            echo \"Failed waiting for computes to report as ${status}, ${computes_up}/${computes_count} ${status} after ${max_attempts} attempts\""},{"line_number":121,"context_line":"            exit 1"},{"line_number":122,"context_line":"        else"},{"line_number":123,"context_line":"            echo \"Waiting for ${computes_count} computes to report as ${status}, ${computes_up}/${computes_count} ${status} after ${attempt}/${max_attempts} attempts\""},{"line_number":124,"context_line":"            attempt\u003d$((attempt+1))"},{"line_number":125,"context_line":"            sleep $attempt_sleep"},{"line_number":126,"context_line":"        fi"},{"line_number":127,"context_line":"    done"},{"line_number":128,"context_line":"}"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-sh","patch_set":2,"id":"1fa4df85_c21d1910","line":126,"range":{"start_line":122,"start_character":8,"end_line":126,"end_character":10},"updated":"2020-03-13 21:46:58.000000000","message":"This doesn\u0027t need to be in an else clause, I\u0027ll remove it if I respin as it doesn\u0027t hurt at the same time.","commit_id":"3ac7510a6cb6e1e05b6354814744d5334838140b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"62106c768559b30bdf24c216a073b84ca8247017","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        elif [ \"$attempt\" -eq \"$max_attempts\" ]; then"},{"line_number":120,"context_line":"            echo \"Failed waiting for computes to report as ${status}, ${computes_up}/${computes_count} ${status} after ${max_attempts} attempts\""},{"line_number":121,"context_line":"            exit 1"},{"line_number":122,"context_line":"        else"},{"line_number":123,"context_line":"            echo \"Waiting for ${computes_count} computes to report as ${status}, ${computes_up}/${computes_count} ${status} after ${attempt}/${max_attempts} attempts\""},{"line_number":124,"context_line":"            attempt\u003d$((attempt+1))"},{"line_number":125,"context_line":"            sleep $attempt_sleep"},{"line_number":126,"context_line":"        fi"},{"line_number":127,"context_line":"    done"},{"line_number":128,"context_line":"}"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-sh","patch_set":2,"id":"1fa4df85_7b316cec","line":126,"range":{"start_line":122,"start_character":8,"end_line":126,"end_character":10},"in_reply_to":"1fa4df85_4299291d","updated":"2020-03-14 09:50:32.000000000","message":"kk I\u0027ll leave it here then.","commit_id":"3ac7510a6cb6e1e05b6354814744d5334838140b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dad5f14ed4a11c3ef7612a7b4aef5cc55c395259","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        elif [ \"$attempt\" -eq \"$max_attempts\" ]; then"},{"line_number":120,"context_line":"            echo \"Failed waiting for computes to report as ${status}, ${computes_up}/${computes_count} ${status} after ${max_attempts} attempts\""},{"line_number":121,"context_line":"            exit 1"},{"line_number":122,"context_line":"        else"},{"line_number":123,"context_line":"            echo \"Waiting for ${computes_count} computes to report as ${status}, ${computes_up}/${computes_count} ${status} after ${attempt}/${max_attempts} attempts\""},{"line_number":124,"context_line":"            attempt\u003d$((attempt+1))"},{"line_number":125,"context_line":"            sleep $attempt_sleep"},{"line_number":126,"context_line":"        fi"},{"line_number":127,"context_line":"    done"},{"line_number":128,"context_line":"}"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-sh","patch_set":2,"id":"1fa4df85_4299291d","line":126,"range":{"start_line":122,"start_character":8,"end_line":126,"end_character":10},"in_reply_to":"1fa4df85_c21d1910","updated":"2020-03-13 22:34:04.000000000","message":"your right it does not but its also perfectly correct to be in the else clause so either would be fine.","commit_id":"3ac7510a6cb6e1e05b6354814744d5334838140b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dad5f14ed4a11c3ef7612a7b4aef5cc55c395259","unresolved":false,"context_lines":[{"line_number":128,"context_line":"}"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"function configure_and_start_nova {"},{"line_number":131,"context_line":"    _ceph_configure_nova"},{"line_number":132,"context_line":"    #import secret to libvirt"},{"line_number":133,"context_line":"    _populate_libvirt_secret"},{"line_number":134,"context_line":"    $ANSIBLE all --become -f 5 -i \"$WORKSPACE/inventory\" -m shell -a \"pgrep -u stack -a nova-compute\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    # stop nova-compute"}],"source_content_type":"text/x-sh","patch_set":2,"id":"1fa4df85_e29db50a","line":133,"range":{"start_line":131,"start_character":3,"end_line":133,"end_character":28},"updated":"2020-03-13 22:34:04.000000000","message":"nit personcally i kind of feel like this be done after the compute services are stoped","commit_id":"3ac7510a6cb6e1e05b6354814744d5334838140b"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"62106c768559b30bdf24c216a073b84ca8247017","unresolved":false,"context_lines":[{"line_number":128,"context_line":"}"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"function configure_and_start_nova {"},{"line_number":131,"context_line":"    _ceph_configure_nova"},{"line_number":132,"context_line":"    #import secret to libvirt"},{"line_number":133,"context_line":"    _populate_libvirt_secret"},{"line_number":134,"context_line":"    $ANSIBLE all --become -f 5 -i \"$WORKSPACE/inventory\" -m shell -a \"pgrep -u stack -a nova-compute\""},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    # stop nova-compute"}],"source_content_type":"text/x-sh","patch_set":2,"id":"1fa4df85_5b34b0de","line":133,"range":{"start_line":131,"start_character":3,"end_line":133,"end_character":28},"in_reply_to":"1fa4df85_e29db50a","updated":"2020-03-14 09:50:32.000000000","message":"kk that\u0027s valid, I\u0027ll move it below.","commit_id":"3ac7510a6cb6e1e05b6354814744d5334838140b"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e95bb0f61cf3feb4695c76f2dce607b26cbee048","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    $ANSIBLE all --become -f 5 -i \"$WORKSPACE/inventory\" -m shell -a \"pgrep -u stack -a nova-compute\""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    # Wait for the service to be marked as up"},{"line_number":151,"context_line":"    _wait_for_nova_compute_service_state \"up\""},{"line_number":152,"context_line":"}"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"function _ceph_configure_cinder {"}],"source_content_type":"text/x-sh","patch_set":14,"id":"1fa4df85_39b1aa90","line":151,"updated":"2020-03-16 20:35:35.000000000","message":"This logic all makes sense to me -- in order for us to detect that the restart completed and services are fully UP again, we have to see the state transition to DOWN first. Then we can start the services and look for state UP.","commit_id":"e23c3c2c8df3843c5853c87ef684bd21c4af95d8"}]}
