)]}'
{"nova/virt/xenapi/volume_utils.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"93c5c8a7be5caab0591c5e8805edbfd6780b1ee9","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    try:"},{"line_number":166,"context_line":"        vdi_ref \u003d _get_vdi_ref(session, sr_ref, vdi_uuid, target_lun)"},{"line_number":167,"context_line":"        if vdi_ref is None:"},{"line_number":168,"context_line":"            greenthread.sleep(CONF.xenserver.introduce_vdi_retry_wait)"},{"line_number":169,"context_line":"            session.call_xenapi(\"SR.scan\", sr_ref)"},{"line_number":170,"context_line":"            vdi_ref \u003d _get_vdi_ref(session, sr_ref, vdi_uuid, target_lun)"},{"line_number":171,"context_line":"    except session.XenAPI.Failure as exc:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Fp%2B0%3D","line":168,"updated":"2014-02-11 18:03:09.000000000","message":"I wonder if we should loop on this. But this seems like a fair stating point. I kinda feel waiting 5 seconds and looping with SR.scan is better. But lets try this and see how it goes.\n\nAlso, I prefer not using the greenthread call and using the general call, but I suspect others may disagree, and its a nit.","commit_id":"187d1668d43da6977eb9ae4d96cd85243838ed6b"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"b6fe29a39814d561455d8370473361757dba8c1c","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    try:"},{"line_number":166,"context_line":"        vdi_ref \u003d _get_vdi_ref(session, sr_ref, vdi_uuid, target_lun)"},{"line_number":167,"context_line":"        if vdi_ref is None:"},{"line_number":168,"context_line":"            greenthread.sleep(CONF.xenserver.introduce_vdi_retry_wait)"},{"line_number":169,"context_line":"            session.call_xenapi(\"SR.scan\", sr_ref)"},{"line_number":170,"context_line":"            vdi_ref \u003d _get_vdi_ref(session, sr_ref, vdi_uuid, target_lun)"},{"line_number":171,"context_line":"    except session.XenAPI.Failure as exc:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2FptA%3D","line":168,"in_reply_to":"AAAAUX%2F%2Fp%2B0%3D","updated":"2014-02-11 18:32:36.000000000","message":"I agree that a loop-n-wait is probably \u0027better\u0027, but this is fine for now...we can optimize later if this is a problem.\n\nJust out of curiosity, looks like `time.sleep` is slightly preferred, but doesn\u0027t really matter either way:\n\n$ grep -R \u0027greenthread.sleep\u0027 . | wc -l\n      25\n$ grep -R \u0027time.sleep\u0027 . | wc -l\n      61","commit_id":"187d1668d43da6977eb9ae4d96cd85243838ed6b"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"72aa06e3bb68113abaf27a9b295f348fb7a7e41c","unresolved":false,"context_lines":[{"line_number":165,"context_line":"    try:"},{"line_number":166,"context_line":"        vdi_ref \u003d _get_vdi_ref(session, sr_ref, vdi_uuid, target_lun)"},{"line_number":167,"context_line":"        if vdi_ref is None:"},{"line_number":168,"context_line":"            greenthread.sleep(CONF.xenserver.introduce_vdi_retry_wait)"},{"line_number":169,"context_line":"            session.call_xenapi(\"SR.scan\", sr_ref)"},{"line_number":170,"context_line":"            vdi_ref \u003d _get_vdi_ref(session, sr_ref, vdi_uuid, target_lun)"},{"line_number":171,"context_line":"    except session.XenAPI.Failure as exc:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUX%2F%2Foj4%3D","line":168,"in_reply_to":"AAAAUX%2F%2FptA%3D","updated":"2014-02-11 21:13:49.000000000","message":"Agree with comments on using time.sleep.  It supports the fantasy that we will dump eventlet and use a different threading model some day.\n\nPolling for the VDI on a loop with a backoff would probably be more reliable than a single pre-configured wait value.\nNot a big deal really.  Could be changed to a loop if the static timeout value doesn\u0027t work reliably.","commit_id":"187d1668d43da6977eb9ae4d96cd85243838ed6b"}]}
