)]}'
{"lib/ironic":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"90193a210cbf4f88d6a40114084e16c713406a94","unresolved":false,"context_lines":[{"line_number":504,"context_line":"    # After nodes have been enrolled, we need to wait for n-cpu\u0027s periodic"},{"line_number":505,"context_line":"    # task populate the resource tracker with available nodes.  Wait for 2"},{"line_number":506,"context_line":"    # minutes before timing out."},{"line_number":507,"context_line":"    expected_count\u003d$1"},{"line_number":508,"context_line":"    echo_summary \"Waiting 2 minutes for Nova resource tracker to pick up $expected_count Ironic nodes\""},{"line_number":509,"context_line":"    for i in `seq 1 120` ; do"},{"line_number":510,"context_line":"        if [ $(nova hypervisor-stats | grep \" count \" | get_field 2) -ge $expected_count ]; then"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"5a890539_a8e1e22b","line":507,"updated":"2014-12-01 22:30:36.000000000","message":"local please","commit_id":"0903e4050fdb71425107ee5f3ec16024e420c0d8"},{"author":{"_account_id":6635,"name":"John Davidge","email":"john.davidge@rackspace.com","username":"john-davidge"},"change_message_id":"8677171a966a9c38fde3eef059e88865e71d9885","unresolved":false,"context_lines":[{"line_number":506,"context_line":"    # minutes before timing out."},{"line_number":507,"context_line":"    local expected_count\u003d$1"},{"line_number":508,"context_line":"    echo_summary \"Waiting 2 minutes for Nova resource tracker to pick up $expected_count Ironic nodes\""},{"line_number":509,"context_line":"    for i in `seq 1 120` ; do"},{"line_number":510,"context_line":"        if [ $(nova hypervisor-stats | grep \" count \" | get_field 2) -ge $expected_count ]; then"},{"line_number":511,"context_line":"            return 0"},{"line_number":512,"context_line":"        fi"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"5a890539_86eb20a3","line":509,"updated":"2014-12-02 14:53:39.000000000","message":"I think timeouts should probably be handled by the timeout command. Something like this:\n\nif ! timeout 120 sh -c \"until $(nova hypervisor-stats | grep \" count \" | get_field 2) -ge $expected_count; do sleep 1; done\"; then\n    die $LINENO \"Nova hypervisor-stats did not register at least $expected_count nodes\"\nfi","commit_id":"908670fea98201941f38f983922b90ffb7ae3add"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"2989132a4eb6944d85afd017c087714e8e3b1603","unresolved":false,"context_lines":[{"line_number":506,"context_line":"    # minutes before timing out."},{"line_number":507,"context_line":"    local expected_count\u003d$1"},{"line_number":508,"context_line":"    echo_summary \"Waiting 2 minutes for Nova resource tracker to pick up $expected_count Ironic nodes\""},{"line_number":509,"context_line":"    for i in `seq 1 120` ; do"},{"line_number":510,"context_line":"        if [ $(nova hypervisor-stats | grep \" count \" | get_field 2) -ge $expected_count ]; then"},{"line_number":511,"context_line":"            return 0"},{"line_number":512,"context_line":"        fi"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"5a890539_2bb3079b","line":509,"in_reply_to":"5a890539_86eb20a3","updated":"2014-12-02 20:16:34.000000000","message":"running things in subshells causes problems when they don\u0027t catch errors correctly etc, so i prefer to avoid that.  timeout is good if you need to send a signal to something that has hung, but that\u0027s not happening here\n\nyou can restructure this with an until and it might be nicer; either or.\n\nIMO this is fine for a timeout, but please use $() and don\u0027t introduce more ``","commit_id":"908670fea98201941f38f983922b90ffb7ae3add"}]}
