)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"37ec52c18b0ef96506c97e67a7bb14a2d7a0b4f4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Prabhat Ranjan \u003cpranjank@in.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-03-16 16:33:46 +0530"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"When we change compute host name then devstack is breaking"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When we change the name of compute host then devstack is breaking"},{"line_number":10,"context_line":"because it is using default host name from host."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"df7087c5_2adbd94e","line":7,"updated":"2018-03-16 12:32:59.000000000","message":"This is a bug description and not what this patch does. Rather use something like\n\nFix wait_for_compute to work for modified compute host name","commit_id":"68a4617688abc026977ad03be206256c2752edc0"}],"functions":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"aed239a5b1aa3ad0d35daff1fe3911c0d2f9cfc2","unresolved":false,"context_lines":[{"line_number":443,"context_line":"    local rval\u003d0"},{"line_number":444,"context_line":"    time_start \"wait_for_service\""},{"line_number":445,"context_line":"    timeout $timeout bash -x \u003c\u003cEOF || rval\u003d$?"},{"line_number":446,"context_line":"    compute_hostname\u003d$(iniget $NOVA_CONF DEFAULT host)"},{"line_number":447,"context_line":"        ID\u003d\"\""},{"line_number":448,"context_line":"        while [[ \"\\$ID\" \u003d\u003d \"\" ]]; do"},{"line_number":449,"context_line":"            sleep 1"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"df7087c5_6a30f19f","line":446,"updated":"2018-03-16 12:31:00.000000000","message":"Indentation is wrong. Better yet move this upwards outside the timeout script. Also set a default value as mentioned below.","commit_id":"68a4617688abc026977ad03be206256c2752edc0"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"e9f15411c4afdf9ad1942c22eebda6b7376a1c65","unresolved":false,"context_lines":[{"line_number":450,"context_line":"            if [[ \"$VIRT_DRIVER\" \u003d \u0027fake\u0027 ]]; then"},{"line_number":451,"context_line":"                # When using the fake driver the compute hostnames have a suffix of 1 to NUMBER_FAKE_NOVA_COMPUTE"},{"line_number":452,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host `hostname`1 --service nova-compute -c ID -f value)"},{"line_number":453,"context_line":"            elif [[ ! -z $compute_hostname ]]; then"},{"line_number":454,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host \"$compute_hostname\" --service nova-compute -c ID -f value)"},{"line_number":455,"context_line":"            else"},{"line_number":456,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host `hostname` --service nova-compute -c ID -f value)"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"df7087c5_6f332315","line":453,"updated":"2018-03-16 12:11:44.000000000","message":"CI fails with\n\n2018-03-16 11:27:18.050 | + ::                                       :   ID\u003d\n2018-03-16 11:27:18.050 | bash: line 8: unexpected argument `]]\u0027 to conditional unary operator\n2018-03-16 11:27:18.050 | bash: line 8: syntax error near `;\u0027\n2018-03-16 11:27:18.050 | bash: line 8: `            elif [[ ! -z  ]]; then\u0027\n2018-03-16 11:27:18.053 | + functions:wait_for_compute:445           :   rval\u003d2","commit_id":"68a4617688abc026977ad03be206256c2752edc0"},{"author":{"_account_id":11307,"name":"Andreas Scheuring","email":"andreas.scheuring@de.ibm.com","username":"uniqueName"},"change_message_id":"3a28dc063f4d2cd5bbe6cb95018b5bbe7c181584","unresolved":false,"context_lines":[{"line_number":450,"context_line":"            if [[ \"$VIRT_DRIVER\" \u003d \u0027fake\u0027 ]]; then"},{"line_number":451,"context_line":"                # When using the fake driver the compute hostnames have a suffix of 1 to NUMBER_FAKE_NOVA_COMPUTE"},{"line_number":452,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host `hostname`1 --service nova-compute -c ID -f value)"},{"line_number":453,"context_line":"            elif [[ ! -z $compute_hostname ]]; then"},{"line_number":454,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host \"$compute_hostname\" --service nova-compute -c ID -f value)"},{"line_number":455,"context_line":"            else"},{"line_number":456,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host `hostname` --service nova-compute -c ID -f value)"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"df7087c5_cf27cfc6","line":453,"in_reply_to":"df7087c5_6f332315","updated":"2018-03-16 12:12:55.000000000","message":"I think you need a single pair of braces only","commit_id":"68a4617688abc026977ad03be206256c2752edc0"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"aed239a5b1aa3ad0d35daff1fe3911c0d2f9cfc2","unresolved":false,"context_lines":[{"line_number":450,"context_line":"            if [[ \"$VIRT_DRIVER\" \u003d \u0027fake\u0027 ]]; then"},{"line_number":451,"context_line":"                # When using the fake driver the compute hostnames have a suffix of 1 to NUMBER_FAKE_NOVA_COMPUTE"},{"line_number":452,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host `hostname`1 --service nova-compute -c ID -f value)"},{"line_number":453,"context_line":"            elif [[ ! -z $compute_hostname ]]; then"},{"line_number":454,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host \"$compute_hostname\" --service nova-compute -c ID -f value)"},{"line_number":455,"context_line":"            else"},{"line_number":456,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host `hostname` --service nova-compute -c ID -f value)"}],"source_content_type":"application/x-shellscript","patch_set":1,"id":"df7087c5_ca66ddbb","line":453,"in_reply_to":"df7087c5_cf27cfc6","updated":"2018-03-16 12:31:00.000000000","message":"No, you\u0027d need to use \"$compute_hostname\" in order to allow for the variable not being set.\n\nAlso \"! -z\" \u003d\u003d \"-n\".\n\nBut in fact I\u0027d rather set compute_hostname to `hostname` when it isn\u0027t set in NOVA_CONF and then we can avoid having two versions of the command below.","commit_id":"68a4617688abc026977ad03be206256c2752edc0"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"b0300fb2db3ff20046829a00ccbadeea0bfdf9a0","unresolved":false,"context_lines":[{"line_number":442,"context_line":"    local timeout\u003d$1"},{"line_number":443,"context_line":"    local rval\u003d0"},{"line_number":444,"context_line":"    time_start \"wait_for_service\""},{"line_number":445,"context_line":"    compute_hostname\u003d$(iniget $NOVA_CONF DEFAULT host)"},{"line_number":446,"context_line":"    if [[ -z $compute_hostname ]]; then"},{"line_number":447,"context_line":"        compute_hostname\u003d$(hostname)"},{"line_number":448,"context_line":"    fi"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"5f7c97a3_4187d813","line":445,"updated":"2018-06-18 11:04:43.000000000","message":"Maybe add a \"local compute_hostname\" for this above. Must be a separate statement though in order to avoid hiding possible errors from the iniget.","commit_id":"86cfa032b66df2e34e1d01b01b588fdbf51f4ee3"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"e6020902e58295cc4732f61712b8ea34d0e390df","unresolved":false,"context_lines":[{"line_number":446,"context_line":"    compute_hostname\u003d$(iniget $NOVA_CONF DEFAULT host)"},{"line_number":447,"context_line":"    if [[ -z $compute_hostname ]]; then"},{"line_number":448,"context_line":"        compute_hostname\u003d$(hostname)"},{"line_number":449,"context_line":"    fi"},{"line_number":450,"context_line":"    timeout $timeout bash -x \u003c\u003cEOF || rval\u003d$?"},{"line_number":451,"context_line":"        ID\u003d\"\""},{"line_number":452,"context_line":"        while [[ \"\\$ID\" \u003d\u003d \"\" ]]; do"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"5f7c97a3_0b0e768b","line":449,"updated":"2018-06-22 02:38:40.000000000","message":"I\u0027m being picky here, but my preference would be to lay this out much clearer.  Firstly, this isn\u0027t valid in the \"fake driver\" case below, because it seems to me there [DEFAULT]host will be set unconditionally.","commit_id":"fc3dc64a56e9e61fca7dd0254e95acd1cf97092b"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"e6020902e58295cc4732f61712b8ea34d0e390df","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                # When using the fake driver the compute hostnames have a suffix of 1 to NUMBER_FAKE_NOVA_COMPUTE"},{"line_number":456,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host `hostname`1 --service nova-compute -c ID -f value)"},{"line_number":457,"context_line":"            else"},{"line_number":458,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host \"$compute_hostname\" --service nova-compute -c ID -f value)"},{"line_number":459,"context_line":"            fi"},{"line_number":460,"context_line":"        done"},{"line_number":461,"context_line":"EOF"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"5f7c97a3_2b61f239","line":458,"updated":"2018-06-22 02:38:40.000000000","message":"so my preference here would be to move all the logic into here and do something like\n\n# note: we obey the hostname setup in config \n... --host ${$(iniget $NOVA_CONF DEFAULT host):-$HOSTNAME} ...\n\nwhich should, I think, be the same as taking the default hostname if the iniget returns nothing?","commit_id":"fc3dc64a56e9e61fca7dd0254e95acd1cf97092b"},{"author":{"_account_id":23367,"name":"Prabhat Ranjan","email":"pranjank@in.ibm.com","username":"pranjank"},"change_message_id":"d5c01d1f73af32465837fc469671ad92e23f833a","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                # When using the fake driver the compute hostnames have a suffix of 1 to NUMBER_FAKE_NOVA_COMPUTE"},{"line_number":456,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host `hostname`1 --service nova-compute -c ID -f value)"},{"line_number":457,"context_line":"            else"},{"line_number":458,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host \"$compute_hostname\" --service nova-compute -c ID -f value)"},{"line_number":459,"context_line":"            fi"},{"line_number":460,"context_line":"        done"},{"line_number":461,"context_line":"EOF"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"5f7c97a3_992a897b","line":458,"in_reply_to":"5f7c97a3_2b61f239","updated":"2018-06-27 07:18:48.000000000","message":"If you see comment from Jens Harbott (frickler) in patch set 1 then you may get clear idea. Basically we discuss we don\u0027t need two version in if-else condition.","commit_id":"fc3dc64a56e9e61fca7dd0254e95acd1cf97092b"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"09d45d04f1814394824eec6ca3fd35518f3a70a3","unresolved":false,"context_lines":[{"line_number":455,"context_line":"                # When using the fake driver the compute hostnames have a suffix of 1 to NUMBER_FAKE_NOVA_COMPUTE"},{"line_number":456,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host `hostname`1 --service nova-compute -c ID -f value)"},{"line_number":457,"context_line":"            else"},{"line_number":458,"context_line":"                ID\u003d\\$(openstack --os-cloud devstack-admin --os-region \"$REGION_NAME\" compute service list --host \"$compute_hostname\" --service nova-compute -c ID -f value)"},{"line_number":459,"context_line":"            fi"},{"line_number":460,"context_line":"        done"},{"line_number":461,"context_line":"EOF"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"5f7c97a3_4ecb69a3","line":458,"in_reply_to":"5f7c97a3_992a897b","updated":"2018-07-02 01:39:53.000000000","message":"I still think you could move the setting of compute_hostname into this branch, as it is only used here.","commit_id":"fc3dc64a56e9e61fca7dd0254e95acd1cf97092b"}]}
