)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"5eddfb8c44b5b91b05fb32d220224f77589a5667","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Live migration failure in API doesn\u0027t revert task_state to None"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"If API times out on a RPC during the processing of a migrate_server"},{"line_number":10,"context_line":"it does not revert the task_state back to None before or after"},{"line_number":11,"context_line":"sending the error response back to the user. When MessagingTimeout"},{"line_number":12,"context_line":"occurs, this fix will leave VM in error state with task_state None."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da9b358b_8604877e","line":9,"updated":"2015-03-30 14:06:51.000000000","message":"an RPC","commit_id":"bac28f4074eb44495550bc383528473289834f12"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"e8d0d7b707de87a6c40430f17161a14fe78b898e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"exception is going to be raised in this case."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1276214"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Id800e925fbb689d20e7907b698b67c92fd3da979"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"5afe65bd_aafec3ab","line":17,"updated":"2015-06-04 10:38:19.000000000","message":"APIImpact, please","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"e340db7179c9b9ef0ff7ac72bd303a0acf18fcf2","unresolved":false,"context_lines":[{"line_number":14,"context_line":"exception is going to be raised in this case."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: #1276214"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Id800e925fbb689d20e7907b698b67c92fd3da979"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3afb71cf_d3e30504","line":17,"in_reply_to":"5afe65bd_aafec3ab","updated":"2015-06-09 06:33:52.000000000","message":"This change has no direct impact on REST API. Why should we add here APIImpact flag ?\n\nhttps://review.openstack.org/#/q/status:open+project:openstack/nova-specs+message:apiimpact,n,z\n\nAccording to this link, I believe that this APIImpact flag is used mainly for specs.","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"7b28e3faf30d0064926774d8c6f666b36bb6ffa2","unresolved":false,"context_lines":[{"line_number":18,"context_line":"* nova-api couldn\u0027t reach nova-conductor - LM will not start"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Because we can\u0027t predict in API layer what happened below, this patch"},{"line_number":21,"context_line":"changes VM state to ERROR when MessagingTimeout is caught."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Co-Authored-By: Pawel Koniszewski \u003cpawel.koniszewski@intel.com\u003e"},{"line_number":24,"context_line":"                Bartosz Fic \u003cbartosz.fic@intel.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"5aef4532_0853f917","line":21,"updated":"2016-03-10 13:17:25.000000000","message":"We don\u0027t put VM into error anymore, but write instance fault to DB instead.","commit_id":"a9c5f01bbc764a6efc035139dadc05bbaade9463"},{"author":{"_account_id":14511,"name":"Maciej Szankin","email":"maciej+review@szankin.pl","username":"mszankin"},"change_message_id":"44958ad810ab9f2e1e0fd447d288dfd85b1a7de5","unresolved":false,"context_lines":[{"line_number":18,"context_line":"* nova-api couldn\u0027t reach nova-conductor - LM will not start"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Because we can\u0027t predict in API layer what happened below, this patch"},{"line_number":21,"context_line":"changes VM state to ERROR when MessagingTimeout is caught."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Co-Authored-By: Pawel Koniszewski \u003cpawel.koniszewski@intel.com\u003e"},{"line_number":24,"context_line":"                Bartosz Fic \u003cbartosz.fic@intel.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"5aef4532_72842b0a","line":21,"in_reply_to":"5aef4532_0853f917","updated":"2016-03-10 14:19:59.000000000","message":"Done","commit_id":"a9c5f01bbc764a6efc035139dadc05bbaade9463"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5fd83fc43396e23139f83a0f9c18ef14565ca440","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Live migration failure in API leaves VM in MIGRATING state"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When nova-api calls nova-conductor through RPC MessagingTimeout might"},{"line_number":10,"context_line":"occur. In such case we shouldn\u0027t leave VM in MIGRATING state. Possible"},{"line_number":11,"context_line":"scenarios are:"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":32,"id":"3afc51ec_e4db151a","line":9,"range":{"start_line":9,"start_character":35,"end_line":9,"end_character":42},"updated":"2016-03-11 20:11:46.000000000","message":"I\u0027m not sure this is the right word. Perhaps this should just be s/through/an/.","commit_id":"9924887ca51218eabdcd0fb35fa813ba10cb2898"},{"author":{"_account_id":14511,"name":"Maciej Szankin","email":"maciej+review@szankin.pl","username":"mszankin"},"change_message_id":"4086241123e51011bbc1142abe9a2674897c8326","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Live migration failure in API leaves VM in MIGRATING state"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When nova-api calls nova-conductor through RPC MessagingTimeout might"},{"line_number":10,"context_line":"occur. In such case we shouldn\u0027t leave VM in MIGRATING state. Possible"},{"line_number":11,"context_line":"scenarios are:"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":32,"id":"3afc51ec_d6779dd2","line":9,"range":{"start_line":9,"start_character":35,"end_line":9,"end_character":42},"in_reply_to":"3afc51ec_e4db151a","updated":"2016-03-12 10:19:07.000000000","message":"Done","commit_id":"9924887ca51218eabdcd0fb35fa813ba10cb2898"}],"nova/api/openstack/compute/contrib/admin_actions.py":[{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"147bbda51a63db3a96bec1f1ba041be8daebc370","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import traceback"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":"from oslo_messaging.exceptions import MessagingTimeout"},{"line_number":20,"context_line":"from oslo_utils import strutils"},{"line_number":21,"context_line":"import six"},{"line_number":22,"context_line":"import webob"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_a6aaeb6e","line":19,"updated":"2015-03-30 14:06:13.000000000","message":"Do not import objects, only modules. You should import exceptions module here instead of single class MessagingTimeout.","commit_id":"bac28f4074eb44495550bc383528473289834f12"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"89d13d97ec0b7a33ca1d09a669ef2ce29405ce12","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import traceback"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_log import log as logging"},{"line_number":19,"context_line":"from oslo_messaging.exceptions import MessagingTimeout"},{"line_number":20,"context_line":"from oslo_utils import strutils"},{"line_number":21,"context_line":"import six"},{"line_number":22,"context_line":"import webob"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_5cc1b0e3","line":19,"in_reply_to":"da9b358b_a6aaeb6e","updated":"2015-03-30 15:04:58.000000000","message":"Yes it\u0027s true i believe flake8 will complain about it","commit_id":"bac28f4074eb44495550bc383528473289834f12"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"89d13d97ec0b7a33ca1d09a669ef2ce29405ce12","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    \u0027os-migrateLive\u0027, id)"},{"line_number":350,"context_line":"        except MessagingTimeout as e:"},{"line_number":351,"context_line":"            msg \u003d _(\"Live migration of instance %s failed due to timeout\") % id"},{"line_number":352,"context_line":"            LOG.exception(msg)"},{"line_number":353,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":354,"context_line":"            instance.task_state \u003d None"},{"line_number":355,"context_line":"            instance.save(expected_task_state\u003dcompute.task_states.MIGRATING)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_dc5b8053","line":352,"updated":"2015-03-30 15:04:58.000000000","message":"A macro is needed when you add a LOG.exception. _LE","commit_id":"bac28f4074eb44495550bc383528473289834f12"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"eba505bcad21574457a4df7ef7cbddee270ba52e","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":353,"context_line":"            LOG.exception(msg)"},{"line_number":354,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":355,"context_line":"            instance.task_state \u003d None"},{"line_number":356,"context_line":"            instance.save(expected_task_state\u003dcompute.task_states.MIGRATING)"},{"line_number":357,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":358,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aaa499b_be0e99e3","line":355,"updated":"2015-04-10 15:49:41.000000000","message":"I don\u0027t think this is the right place to reset either of these states. The compute api and manager both have state reversion code. If we\u0027re going to revert the states, I think it should be done there to match.\n\nThat said, I think that landing the instance in ERROR state makes sense, but reverting the task state makes less sense to me. Since live migration is an admin operation, if it fails, leaving the task_state in place as a lock to prevent further action seems like the right thing to do here. The \"check if the VM is okay\" step can only be done by a human, so it\u0027s *really* hard and risky for us to make that determination in nova and drop the lock. Admins can reset the task state via the API once they do the check.\n\nSo, IMHO, we should just set the vm_state to ERROR, in the manager/api where those things are done, and leave task_state.\n\nThoughts?","commit_id":"376f6f8b89c75759796990bcd823115162135030"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"7eedd2851799e756c1503c12c6b2448c8b1c7b2b","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":353,"context_line":"            LOG.exception(msg)"},{"line_number":354,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":355,"context_line":"            instance.task_state \u003d None"},{"line_number":356,"context_line":"            instance.save(expected_task_state\u003dcompute.task_states.MIGRATING)"},{"line_number":357,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":358,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7aaa499b_97a8de78","line":355,"in_reply_to":"7aaa499b_be0e99e3","updated":"2015-04-15 13:35:51.000000000","message":"Hi Dan, thank you for your feedback. \n\nWhat do you think about putting this logic in compute api using decorator which will be checking whether timeout message occurs ? If timeout occurs, vm state will be set as ERROR and appropriate exception will be reraised. This decorator could be used with other methods, preventing unexpected timeouts.","commit_id":"376f6f8b89c75759796990bcd823115162135030"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"1c7fed0139bce9c22853d3ada7a536d577958701","unresolved":false,"context_lines":[{"line_number":353,"context_line":"            msg \u003d _LE(\"Live migration of instance %(id)s failed due to \""},{"line_number":354,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":355,"context_line":"            LOG.exception(msg)"},{"line_number":356,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":357,"context_line":"        except Exception:"},{"line_number":358,"context_line":"            if host is None:"},{"line_number":359,"context_line":"                msg \u003d _(\"Live migration of instance %s to another host \""}],"source_content_type":"text/x-python","patch_set":7,"id":"dac4157f_f2284ee4","line":356,"updated":"2015-04-22 14:35:51.000000000","message":"http://en.wikipedia.org/wiki/List_of_HTTP_status_codes\nThe client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.\"\n\nis it proper here?","commit_id":"af1243c999a8a1377ef0311914481c44bc398e89"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"1b6c39c9d69217dd56265019933c24ba83251f28","unresolved":false,"context_lines":[{"line_number":353,"context_line":"            msg \u003d _LE(\"Live migration of instance %(id)s failed due to \""},{"line_number":354,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":355,"context_line":"            LOG.exception(msg)"},{"line_number":356,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":357,"context_line":"        except Exception:"},{"line_number":358,"context_line":"            if host is None:"},{"line_number":359,"context_line":"                msg \u003d _(\"Live migration of instance %s to another host \""}],"source_content_type":"text/x-python","patch_set":7,"id":"dac4157f_1871a1a8","line":356,"in_reply_to":"dac4157f_f2284ee4","updated":"2015-04-22 15:12:44.000000000","message":"You are right. It is actually wrong exception. Client won\u0027t be able to repeat the request because of error vm_state. Maybe you could propose better solution?","commit_id":"af1243c999a8a1377ef0311914481c44bc398e89"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d5a0420c6c022225ed687001b3552163180842ae","unresolved":false,"context_lines":[{"line_number":350,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":351,"context_line":"                    \u0027os-migrateLive\u0027, id)"},{"line_number":352,"context_line":"        except oslo_exceptions.MessagingTimeout as e:"},{"line_number":353,"context_line":"            msg \u003d _LE(\"Live migration of instance %(id)s failed due to \""},{"line_number":354,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":355,"context_line":"            LOG.warning(msg)"},{"line_number":356,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_2c51f9d8","line":353,"updated":"2015-04-24 08:02:59.000000000","message":"_LW , :)","commit_id":"cc9463fa47c70e7559b78e4ddf80ae69b792bd91"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d5a0420c6c022225ed687001b3552163180842ae","unresolved":false,"context_lines":[{"line_number":353,"context_line":"            msg \u003d _LE(\"Live migration of instance %(id)s failed due to \""},{"line_number":354,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":355,"context_line":"            LOG.warning(msg)"},{"line_number":356,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":357,"context_line":"        except Exception:"},{"line_number":358,"context_line":"            if host is None:"},{"line_number":359,"context_line":"                msg \u003d _(\"Live migration of instance %s to another host \""}],"source_content_type":"text/x-python","patch_set":8,"id":"bab921fb_6cf5b1c9","line":356,"updated":"2015-04-24 08:02:59.000000000","message":"I won\u0027t -1 on this because \nI don\u0027t know there is more accurate exception may fit here\nactually I prefer 500 since it *is* internal error","commit_id":"cc9463fa47c70e7559b78e4ddf80ae69b792bd91"},{"author":{"_account_id":12813,"name":"Rong Han","email":"han.rong3@zte.com.cn","username":"hanrong-zte"},"change_message_id":"2435352d494adaa728cbf23c869d86c0b565c66c","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":355,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":356,"context_line":"            LOG.warning(msg)"},{"line_number":357,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":358,"context_line":"        except Exception:"},{"line_number":359,"context_line":"            if host is None:"},{"line_number":360,"context_line":"                msg \u003d _(\"Live migration of instance %s to another host \""}],"source_content_type":"text/x-python","patch_set":11,"id":"5afe65bd_87101450","line":357,"updated":"2015-06-05 06:17:28.000000000","message":"HTTPServerError?","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"e8d0d7b707de87a6c40430f17161a14fe78b898e","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":355,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":356,"context_line":"            LOG.warning(msg)"},{"line_number":357,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":358,"context_line":"        except Exception:"},{"line_number":359,"context_line":"            if host is None:"},{"line_number":360,"context_line":"                msg \u003d _(\"Live migration of instance %s to another host \""}],"source_content_type":"text/x-python","patch_set":11,"id":"5afe65bd_ef24cdc5","line":357,"updated":"2015-06-04 10:38:19.000000000","message":"This is the wrong exception to raise here. HTTP/408 has a specific meaning which is not appropriate.\n\nI think HTTPInternalServerError is probably right, but if you add the APIImpact to the commit message then the API WG will have a look.","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"26e3c2e373edee01770c33d942b696b00069b5e0","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":355,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":356,"context_line":"            LOG.warning(msg)"},{"line_number":357,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":358,"context_line":"        except Exception:"},{"line_number":359,"context_line":"            if host is None:"},{"line_number":360,"context_line":"                msg \u003d _(\"Live migration of instance %s to another host \""}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_5862a53f","line":357,"in_reply_to":"3afb71cf_330db990","updated":"2015-06-16 21:48:14.000000000","message":"For external user it still remains 500 Internal Server Error, even if it is messaging timeout. It will be enough to log such error. API user couldn\u0027t influence such situation.","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"9a5562ee4c82a512599193087eed50334c761333","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":355,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":356,"context_line":"            LOG.warning(msg)"},{"line_number":357,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":358,"context_line":"        except Exception:"},{"line_number":359,"context_line":"            if host is None:"},{"line_number":360,"context_line":"                msg \u003d _(\"Live migration of instance %s to another host \""}],"source_content_type":"text/x-python","patch_set":11,"id":"3afb71cf_48b2bf07","line":357,"in_reply_to":"3afb71cf_d3cd455e","updated":"2015-06-09 08:56:57.000000000","message":"This kind of doubt is why we should add the APIImpact flag to the commit message ;) This is a server error - the client didn\u0027t do anything wrong here. So any 4xx error is inappropriate. The only appropriate server error is 500/Internal Server Error, although I agree it\u0027s quite generic I think it is the best fit.","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"e340db7179c9b9ef0ff7ac72bd303a0acf18fcf2","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":355,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":356,"context_line":"            LOG.warning(msg)"},{"line_number":357,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":358,"context_line":"        except Exception:"},{"line_number":359,"context_line":"            if host is None:"},{"line_number":360,"context_line":"                msg \u003d _(\"Live migration of instance %s to another host \""}],"source_content_type":"text/x-python","patch_set":11,"id":"3afb71cf_330db990","line":357,"in_reply_to":"5afe65bd_87101450","updated":"2015-06-09 06:33:52.000000000","message":"http://en.wikipedia.org/wiki/List_of_HTTP_status_codes\n\nAccording to this link, there is no such status code :)","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"e340db7179c9b9ef0ff7ac72bd303a0acf18fcf2","unresolved":false,"context_lines":[{"line_number":354,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":355,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":356,"context_line":"            LOG.warning(msg)"},{"line_number":357,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":358,"context_line":"        except Exception:"},{"line_number":359,"context_line":"            if host is None:"},{"line_number":360,"context_line":"                msg \u003d _(\"Live migration of instance %s to another host \""}],"source_content_type":"text/x-python","patch_set":11,"id":"3afb71cf_d3cd455e","line":357,"in_reply_to":"5afe65bd_ef24cdc5","updated":"2015-06-09 06:33:52.000000000","message":"I think that HTTPInternalServerError is too generic and means unpredicatble failure, but in this case we already know what happened.","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ddc8fdef6843c8bcbe1bbd0102eac86bdaa0c83d","unresolved":false,"context_lines":[{"line_number":349,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":350,"context_line":"                    \u0027os-migrateLive\u0027, id)"},{"line_number":351,"context_line":"        except oslo_exceptions.MessagingTimeout as e:"},{"line_number":352,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":353,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":354,"context_line":"            LOG.warning(msg)"},{"line_number":355,"context_line":"            raise exc.HTTPInternalServerError(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_e6bb360d","line":352,"updated":"2015-07-20 12:41:19.000000000","message":"a translated message used in a an exception should not have a log hint. Please change _LW to _","commit_id":"a9006914f13b61ae0ce2094517080b5cfb5b5cf0"}],"nova/api/openstack/compute/migrate_server.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6eff78f030275bbae4be915326a70cd7ce06ff69","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dex.format_message())"},{"line_number":98,"context_line":"        except exception.InstanceIsLocked as e:"},{"line_number":99,"context_line":"            raise exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":100,"context_line":"        except oslo_exceptions.MessagingTimeout as e:"},{"line_number":101,"context_line":"            msg \u003d _(\"Live migration of instance %(id)s failed due to \""},{"line_number":102,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":103,"context_line":"            LOG.warning(msg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa1b9901_64e4133b","line":100,"updated":"2015-08-17 13:35:20.000000000","message":"I don\u0027t think we should catch this exception, this isn\u0027t expected error state. So we should just raise it up, then the wsgi infrastructure code will turn this into 500, that same as what you doing at line 104","commit_id":"da1372917f0603909dd9e81b4a432d0595853ac8"}],"nova/api/openstack/compute/plugins/v3/migrate_server.py":[{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"147bbda51a63db3a96bec1f1ba041be8daebc370","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#   under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"from oslo_log import log as logging"},{"line_number":17,"context_line":"from oslo_messaging.exceptions import MessagingTimeout"},{"line_number":18,"context_line":"from oslo_utils import strutils"},{"line_number":19,"context_line":"from webob import exc"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_46b0bfdd","line":17,"updated":"2015-03-30 14:06:13.000000000","message":"ditto","commit_id":"bac28f4074eb44495550bc383528473289834f12"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"89d13d97ec0b7a33ca1d09a669ef2ce29405ce12","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                    \u0027os-migrateLive\u0027, id)"},{"line_number":103,"context_line":"        except MessagingTimeout:"},{"line_number":104,"context_line":"            msg \u003d _(\"Live migration of instance %s failed due to timeout\") % id"},{"line_number":105,"context_line":"            LOG.exception(msg)"},{"line_number":106,"context_line":"            instance.vm_state \u003d compute.vm_states.ERROR"},{"line_number":107,"context_line":"            instance.task_state \u003d None"},{"line_number":108,"context_line":"            instance.save(expected_task_state\u003dcompute.task_states.MIGRATING)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da9b358b_1c40c855","line":105,"updated":"2015-03-30 15:04:58.000000000","message":"Same here about _LE","commit_id":"bac28f4074eb44495550bc383528473289834f12"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"1c7fed0139bce9c22853d3ada7a536d577958701","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        except oslo_exceptions.MessagingTimeout as e:"},{"line_number":101,"context_line":"            msg \u003d _LE(\"Live migration of instance %(id)s failed due to \""},{"line_number":102,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":103,"context_line":"            LOG.exception(msg)"},{"line_number":104,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":105,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":106,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"}],"source_content_type":"text/x-python","patch_set":7,"id":"dac4157f_929a326d","line":103,"updated":"2015-04-22 14:35:51.000000000","message":"I don\u0027t think it\u0027s something that is very uncommon \nmaybe a WARNING or INFO or even DEBUG is enough \n\nhttps://wiki.openstack.org/wiki/LoggingStandards","commit_id":"af1243c999a8a1377ef0311914481c44bc398e89"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"1b6c39c9d69217dd56265019933c24ba83251f28","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        except oslo_exceptions.MessagingTimeout as e:"},{"line_number":101,"context_line":"            msg \u003d _LE(\"Live migration of instance %(id)s failed due to \""},{"line_number":102,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":103,"context_line":"            LOG.exception(msg)"},{"line_number":104,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":105,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":106,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"}],"source_content_type":"text/x-python","patch_set":7,"id":"dac4157f_3d333764","line":103,"in_reply_to":"dac4157f_929a326d","updated":"2015-04-22 15:12:44.000000000","message":"ok","commit_id":"af1243c999a8a1377ef0311914481c44bc398e89"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"26e3c2e373edee01770c33d942b696b00069b5e0","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":102,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":103,"context_line":"            LOG.warning(msg)"},{"line_number":104,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":105,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":106,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":107,"context_line":"                    \u0027os-migrateLive\u0027, id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"fa32b979_b8edf1b8","line":104,"updated":"2015-06-16 21:48:14.000000000","message":"Agree with Matthew, there is no request timeout for API user. it looks like simple 500 Internal server error.","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"e8d0d7b707de87a6c40430f17161a14fe78b898e","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":102,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":103,"context_line":"            LOG.warning(msg)"},{"line_number":104,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":105,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":106,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":107,"context_line":"                    \u0027os-migrateLive\u0027, id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5afe65bd_0afcb7b6","line":104,"updated":"2015-06-04 10:38:19.000000000","message":"Same comment as elsewhere - http/408 is not right here.","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"e340db7179c9b9ef0ff7ac72bd303a0acf18fcf2","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":102,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":103,"context_line":"            LOG.warning(msg)"},{"line_number":104,"context_line":"            raise exc.HTTPRequestTimeout(explanation\u003dmsg)"},{"line_number":105,"context_line":"        except exception.InstanceInvalidState as state_error:"},{"line_number":106,"context_line":"            common.raise_http_conflict_for_instance_invalid_state(state_error,"},{"line_number":107,"context_line":"                    \u0027os-migrateLive\u0027, id)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3afb71cf_d3fe6537","line":104,"in_reply_to":"5afe65bd_0afcb7b6","updated":"2015-06-09 06:33:52.000000000","message":"Same comment as in admin_actins.py . HTTPInternalServerError is too generic and means unpredicatble failure, but in this case we already know what happened.\n\nBut I agree with you Matthew, that  HTTPRequestTimeout with its specific meaning is not fully appropriate here. Also I know that it is hard to come up with better status code...","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ddc8fdef6843c8bcbe1bbd0102eac86bdaa0c83d","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            raise exc.HTTPConflict(explanation\u003de.format_message())"},{"line_number":100,"context_line":"        except oslo_exceptions.MessagingTimeout as e:"},{"line_number":101,"context_line":"            msg \u003d _LW(\"Live migration of instance %(id)s failed due to \""},{"line_number":102,"context_line":"                      \"timeout\") % {\u0027id\u0027: id}"},{"line_number":103,"context_line":"            LOG.warning(msg)"},{"line_number":104,"context_line":"            raise exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":105,"context_line":"        except exception.InstanceInvalidState as state_error:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_4641ca0a","line":102,"updated":"2015-07-20 12:41:19.000000000","message":"ditto","commit_id":"a9006914f13b61ae0ce2094517080b5cfb5b5cf0"}],"nova/compute/api.py":[{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"10303d44193818b7d5f594bf25fd374de92608e0","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    return outer"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"def check_messaging_timeout(function):"},{"line_number":207,"context_line":"    \"\"\"Check if messaging timeout occurs\"\"\""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    @functools.wraps(function)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dac4157f_b1de660f","line":206,"updated":"2015-04-22 07:40:52.000000000","message":"There\u0027s not check inside this decorator, please change name to something like \"error_vm_on_timeout\"","commit_id":"91771f6b0c5b8c86a5654624f522b55441a20f28"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"1c23c62b057a833b84a422380f377a802108ec62","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    return outer"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"def check_messaging_timeout(function):"},{"line_number":207,"context_line":"    \"\"\"Check if messaging timeout occurs\"\"\""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    @functools.wraps(function)"}],"source_content_type":"text/x-python","patch_set":5,"id":"dac4157f_b40654cc","line":206,"in_reply_to":"dac4157f_b1de660f","updated":"2015-04-22 08:04:28.000000000","message":"ok","commit_id":"91771f6b0c5b8c86a5654624f522b55441a20f28"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"10303d44193818b7d5f594bf25fd374de92608e0","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    def wrapper(self, context, instance, *args, **kwargs):"},{"line_number":211,"context_line":"        try:"},{"line_number":212,"context_line":"            return function(self, context, instance, *args, **kwargs)"},{"line_number":213,"context_line":"        except oslo_exceptions.MessagingTimeout as e:"},{"line_number":214,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":215,"context_line":"            instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":216,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":5,"id":"dac4157f_71ffae67","line":213,"updated":"2015-04-22 07:40:52.000000000","message":"Why don\u0027t you use excutils.save_and_reraise_exception?","commit_id":"91771f6b0c5b8c86a5654624f522b55441a20f28"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"1c23c62b057a833b84a422380f377a802108ec62","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    def wrapper(self, context, instance, *args, **kwargs):"},{"line_number":211,"context_line":"        try:"},{"line_number":212,"context_line":"            return function(self, context, instance, *args, **kwargs)"},{"line_number":213,"context_line":"        except oslo_exceptions.MessagingTimeout as e:"},{"line_number":214,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":215,"context_line":"            instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":216,"context_line":"            raise e"}],"source_content_type":"text/x-python","patch_set":5,"id":"dac4157f_34748466","line":213,"in_reply_to":"dac4157f_71ffae67","updated":"2015-04-22 08:04:28.000000000","message":"Because oslo_exceptions.MessagingTimeout does not inherit from BaseExceptions class.\n\nIf I use excutils.save_and_reraise_exception, I  get following error:\n\"TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType\"","commit_id":"91771f6b0c5b8c86a5654624f522b55441a20f28"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"08cb57375cc5c9744c067abd16f97928b29f539f","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":215,"context_line":"            instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":216,"context_line":"            raise e"},{"line_number":217,"context_line":"    return wrapper"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"def check_instance_host(function):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dac4157f_8cc0fc7d","line":217,"updated":"2015-04-21 17:47:09.000000000","message":"We already have a decorator for this, and it\u0027s called resets_task_state. Why isn\u0027t that sufficient here?","commit_id":"91771f6b0c5b8c86a5654624f522b55441a20f28"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"1c23c62b057a833b84a422380f377a802108ec62","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":215,"context_line":"            instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":216,"context_line":"            raise e"},{"line_number":217,"context_line":"    return wrapper"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":""},{"line_number":220,"context_line":"def check_instance_host(function):"}],"source_content_type":"text/x-python","patch_set":5,"id":"dac4157f_34436444","line":217,"in_reply_to":"dac4157f_8cc0fc7d","updated":"2015-04-22 08:04:28.000000000","message":"I\u0027ve found only \"reverts_task_state\" decorator in compute/manager.py and it only sets task_state of instance to None and then reraise an exception. If I properly understand your previous comment, we don\u0027t want to set task_state to None, but set vm_state to ERROR and leave task_state as it was. This behaviour should allow admin to make his own decission whether instance is still \"okay\" after exception occurs. After that Admin can reset the task state manually via API. By the way \"reverts_task_state\" decorator is not reverting task_state but setting it to None. This name is not appropriate.","commit_id":"91771f6b0c5b8c86a5654624f522b55441a20f28"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"1c7fed0139bce9c22853d3ada7a536d577958701","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    return outer"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"def error_vm_on_messaging_timeout(function):"},{"line_number":207,"context_line":"    \"\"\"If messaging timeout occurs, vm_state is set to ERROR and exception is"},{"line_number":208,"context_line":"    reraised"},{"line_number":209,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"dac4157f_724f9e6b","line":206,"updated":"2015-04-22 14:35:51.000000000","message":"every rpc could time out \ndo we need to wrap this for every call?","commit_id":"af1243c999a8a1377ef0311914481c44bc398e89"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"1b6c39c9d69217dd56265019933c24ba83251f28","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    return outer"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"def error_vm_on_messaging_timeout(function):"},{"line_number":207,"context_line":"    \"\"\"If messaging timeout occurs, vm_state is set to ERROR and exception is"},{"line_number":208,"context_line":"    reraised"},{"line_number":209,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"dac4157f_3da33702","line":206,"in_reply_to":"dac4157f_724f9e6b","updated":"2015-04-22 15:12:44.000000000","message":"I believe yes. I\u0027d like to add another patch (dependent on this) using more generic approach to cover more rpc calls.","commit_id":"af1243c999a8a1377ef0311914481c44bc398e89"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"1c7fed0139bce9c22853d3ada7a536d577958701","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            return function(self, context, instance, *args, **kwargs)"},{"line_number":215,"context_line":"        except oslo_exceptions.MessagingTimeout as e:"},{"line_number":216,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":217,"context_line":"            instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":218,"context_line":"            raise e"},{"line_number":219,"context_line":"    return wrapper"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"dac4157f_9267d2b6","line":217,"updated":"2015-04-22 14:35:51.000000000","message":"Is it possible that we send a command --\u003e compute process --\u003e set task state --\u003e compute still in processing --\u003e timeout ? \n\nin this case, this will raise exception?","commit_id":"af1243c999a8a1377ef0311914481c44bc398e89"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"1b6c39c9d69217dd56265019933c24ba83251f28","unresolved":false,"context_lines":[{"line_number":214,"context_line":"            return function(self, context, instance, *args, **kwargs)"},{"line_number":215,"context_line":"        except oslo_exceptions.MessagingTimeout as e:"},{"line_number":216,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":217,"context_line":"            instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":218,"context_line":"            raise e"},{"line_number":219,"context_line":"    return wrapper"},{"line_number":220,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"dac4157f_9dd6c3ef","line":217,"in_reply_to":"dac4157f_9267d2b6","updated":"2015-04-22 15:12:44.000000000","message":"If we would like to use this decorator in more generic approach (like for example - in case you mentioned) expected_task_state attribute should be removed. I will remove it in next patchset.","commit_id":"af1243c999a8a1377ef0311914481c44bc398e89"},{"author":{"_account_id":12813,"name":"Rong Han","email":"han.rong3@zte.com.cn","username":"hanrong-zte"},"change_message_id":"2435352d494adaa728cbf23c869d86c0b565c66c","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            return function(self, context, instance, *args, **kwargs)"},{"line_number":211,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":212,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":213,"context_line":"            instance.save()"},{"line_number":214,"context_line":"            raise"},{"line_number":215,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a016987_35a0ac41","line":212,"updated":"2015-06-05 06:17:28.000000000","message":"I hope vm_state would be vm_states.ACTIVE, revert instance state.","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"e340db7179c9b9ef0ff7ac72bd303a0acf18fcf2","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            return function(self, context, instance, *args, **kwargs)"},{"line_number":211,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":212,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":213,"context_line":"            instance.save()"},{"line_number":214,"context_line":"            raise"},{"line_number":215,"context_line":"    return wrapper"}],"source_content_type":"text/x-python","patch_set":11,"id":"3afb71cf_2e58b231","line":212,"in_reply_to":"7a016987_35a0ac41","updated":"2015-06-09 06:33:52.000000000","message":"But we dont know when exactly this exception will be thrown. The safest solution is to set vm_state as error. In addition I believe that this decorator could be used in other methods preventing messaging timeouts.\n\nIt is worth mentioning that, there was a discussion about desirable vm_state in earlier patchsets.","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ddc8fdef6843c8bcbe1bbd0102eac86bdaa0c83d","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    def wrapper(self, context, instance, *args, **kwargs):"},{"line_number":209,"context_line":"        try:"},{"line_number":210,"context_line":"            return function(self, context, instance, *args, **kwargs)"},{"line_number":211,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":212,"context_line":"            instance.vm_state \u003d vm_states.ERROR"},{"line_number":213,"context_line":"            instance.save()"},{"line_number":214,"context_line":"            raise"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_665de6e8","line":211,"updated":"2015-07-20 12:41:19.000000000","message":"can you you please use with excutils.save_and_reraise_exception():","commit_id":"a9006914f13b61ae0ce2094517080b5cfb5b5cf0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6eff78f030275bbae4be915326a70cd7ce06ff69","unresolved":false,"context_lines":[{"line_number":3373,"context_line":""},{"line_number":3374,"context_line":"        self._record_action_start(context, instance,"},{"line_number":3375,"context_line":"                                  instance_actions.LIVE_MIGRATION)"},{"line_number":3376,"context_line":""},{"line_number":3377,"context_line":"        self.compute_task_api.live_migrate_instance(context, instance,"},{"line_number":3378,"context_line":"                host_name, block_migration\u003dblock_migration,"},{"line_number":3379,"context_line":"                disk_over_commit\u003ddisk_over_commit)"}],"source_content_type":"text/x-python","patch_set":14,"id":"fa1b9901_e4802349","line":3376,"updated":"2015-08-17 13:35:20.000000000","message":"we totally can rollback to active state here, because before this line we really did nothing.","commit_id":"da1372917f0603909dd9e81b4a432d0595853ac8"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4b4892fc84fd5e978e8e3ee69cf65162ba41581f","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            return function(self, context, instance, *args, **kwargs)"},{"line_number":212,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":213,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":214,"context_line":"                instance.vm_state \u003d vm_states.ERROR"},{"line_number":215,"context_line":"                instance.save()"},{"line_number":216,"context_line":"    return wrapper"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"ba15a1d1_ddb4f082","line":214,"updated":"2015-09-18 14:18:17.000000000","message":"I think you will also want to set the task_state \u003d None, for example:\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L761\n\nWe should probably also log something here I guess?","commit_id":"8cbbdf4173bc6ee9e9c55c74bff14bf9cbc448c2"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4b4892fc84fd5e978e8e3ee69cf65162ba41581f","unresolved":false,"context_lines":[{"line_number":3275,"context_line":"    @check_instance_lock"},{"line_number":3276,"context_line":"    @check_instance_cell"},{"line_number":3277,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.PAUSED])"},{"line_number":3278,"context_line":"    @error_vm_on_messaging_timeout"},{"line_number":3279,"context_line":"    def live_migrate(self, context, instance, block_migration,"},{"line_number":3280,"context_line":"                     disk_over_commit, host_name):"},{"line_number":3281,"context_line":"        \"\"\"Migrate a server lively to a new host.\"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"ba15a1d1_81d4d2eb","line":3278,"updated":"2015-09-18 14:18:17.000000000","message":"Hmm, so I am not sure you will get a messaging timeout here, because of this:\nhttps://github.com/openstack/nova/blob/master/nova/conductor/tasks/live_migrate.py#L149\n\nI really think this should be handled inside the above file.","commit_id":"8cbbdf4173bc6ee9e9c55c74bff14bf9cbc448c2"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9c56f33c5610deddabe0ad63d0077cc2116b873f","unresolved":false,"context_lines":[{"line_number":3298,"context_line":"    @check_instance_cell"},{"line_number":3299,"context_line":"    @check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.PAUSED])"},{"line_number":3300,"context_line":"    @handle_messaging_timeout(new_vm_state\u003dvm_states.ACTIVE,"},{"line_number":3301,"context_line":"                              clean_task_state\u003dTrue)"},{"line_number":3302,"context_line":"    def live_migrate(self, context, instance, block_migration,"},{"line_number":3303,"context_line":"                     disk_over_commit, host_name):"},{"line_number":3304,"context_line":"        \"\"\"Migrate a server lively to a new host.\"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"ba15a1d1_047fc2e0","line":3301,"updated":"2015-09-23 15:58:19.000000000","message":"This is a very specific issue, and only affects the actual compute_task_api call in the body here. I would prefer you just catch that exception around that call and not as a decorator here. Technically the instance.save() could also generate a MessagingTimeout, and you would not want to do the same thing in that case, most likely.\n\nAlso, we have decorators in compute manager for reverting states on failure, so it would be good to re-use one of those if we do use decorators in here.","commit_id":"761346f68ec336c6340f6e77a1add4c83e43682d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"4a5405454041fa3fb20303e58b9b09a2571c22b4","unresolved":false,"context_lines":[{"line_number":3292,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3293,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3294,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3295,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3296,"context_line":"                instance.task_state \u003d None"},{"line_number":3297,"context_line":"                instance.save()"},{"line_number":3298,"context_line":"                LOG.debug(\u0027RPC timeout during processing live_migrate \u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba8a016a_d60ee2e4","line":3295,"updated":"2015-11-16 15:28:19.000000000","message":"really I think this needs to go to the ERROR state.\n\nwe can\u0027t be sure what has failed, and what has been cleaned up, an it those cases we put the instance into an ERROR state.\n\nThe important bit here is not to leave it in the live-migrating state.","commit_id":"1c4b7d42889e74fc76c58037df7825bdb28ba4d3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"00ddcb8e93423b83591317c5d2381505a5c8b5ab","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"            self.compute_task_api.live_migrate_instance(context, instance,"},{"line_number":3270,"context_line":"                    host_name, block_migration\u003dblock_migration,"},{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_9702943d","line":3272,"updated":"2015-11-16 16:15:41.000000000","message":"Another problem with this is you\u0027re going to get a 500 back because the API code here:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/migrate_server.py#L81\n\nDoesn\u0027t expect to handle this type of failure - it\u0027s a 3rd party library exception getting bubbled up to the API layer, which we don\u0027t want to have to handle there.  We should translate the MessagingTimeout exception to something else before it gets up to the REST API code, either one of these:\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/migrate_server.py#L85-L95\n\nOr something new.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"444a4099c7b74d99d144f7a245c8ac6042372a3a","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"            self.compute_task_api.live_migrate_instance(context, instance,"},{"line_number":3270,"context_line":"                    host_name, block_migration\u003dblock_migration,"},{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_799ee257","line":3272,"in_reply_to":"ba8a016a_1b7d4e1c","updated":"2015-11-17 08:27:31.000000000","message":"Ouch, found case where MessagingTimeout will occur, but LM will still be in progress. In this case we should set VM to ERROR/MIGRATING state.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7292112765726cd0d92996f81a92ef7c7df333fc","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"            self.compute_task_api.live_migrate_instance(context, instance,"},{"line_number":3270,"context_line":"                    host_name, block_migration\u003dblock_migration,"},{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_cfef1daf","line":3272,"in_reply_to":"ba8a016a_69bf18d1","updated":"2015-11-16 19:38:16.000000000","message":"We shouldn\u0027t leak 500s IMO, why not handle and return 408 instead?","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"102f03a02404f42241f7602886bceab614290831","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"            self.compute_task_api.live_migrate_instance(context, instance,"},{"line_number":3270,"context_line":"                    host_name, block_migration\u003dblock_migration,"},{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_1b7d4e1c","line":3272,"in_reply_to":"ba8a016a_7b733ab2","updated":"2015-11-17 07:27:41.000000000","message":"MessagingTimeout is RPC timeout which basically means that the message was not delivered.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"84d31e258ceac594e7ef0113ed73c1ea4357a27b","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"            self.compute_task_api.live_migrate_instance(context, instance,"},{"line_number":3270,"context_line":"                    host_name, block_migration\u003dblock_migration,"},{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_69bf18d1","line":3272,"in_reply_to":"ba8a016a_9702943d","updated":"2015-11-16 16:29:32.000000000","message":"And we want to keep this 500, because actually it is internal error. All we want is to revert VM state to something normal, keeping it in MIGRATING state is not a good idea.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"35e75448b055819dc64816d7e719cb5ef0bd5e12","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"            self.compute_task_api.live_migrate_instance(context, instance,"},{"line_number":3270,"context_line":"                    host_name, block_migration\u003dblock_migration,"},{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_7b733ab2","line":3272,"in_reply_to":"ba8a016a_cfef1daf","updated":"2015-11-17 07:22:37.000000000","message":"Here, does essagingTimeout  means something wrong with RPC? \n\n To me, 408 means server was busy, do not reply the response in time. \n That means the server is still running do the migration. \n So I can request  the status of the migration later.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"7c53352f5ceb08dff452a645b5d41ec795df3556","unresolved":false,"context_lines":[{"line_number":3269,"context_line":"            self.compute_task_api.live_migrate_instance(context, instance,"},{"line_number":3270,"context_line":"                    host_name, block_migration\u003dblock_migration,"},{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_c8bb7ec3","line":3272,"in_reply_to":"ba8a016a_cfef1daf","updated":"2015-11-17 06:51:31.000000000","message":"There\u0027s not suitable http code for such error IMO (we discussed it few patches ago). 408 says that request timed out - in this case it is misleading because request was accepted.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"59002bae2ede0bcacb1171571d93f36b9c81787b","unresolved":false,"context_lines":[{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"},{"line_number":3276,"context_line":"                instance.save()"},{"line_number":3277,"context_line":"                LOG.debug(\u0027RPC timeout during processing live_migrate \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_f6ba066e","line":3274,"updated":"2015-11-16 15:33:00.000000000","message":"I think we should put this into an error state here.\n\nNote really we should also update the instance action that has been started above, to register both the error and that the action has now failed. See self._record_action_start above.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"102f03a02404f42241f7602886bceab614290831","unresolved":false,"context_lines":[{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"},{"line_number":3276,"context_line":"                instance.save()"},{"line_number":3277,"context_line":"                LOG.debug(\u0027RPC timeout during processing live_migrate \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_fbee4aeb","line":3274,"in_reply_to":"ba8a016a_db5586c6","updated":"2015-11-17 07:27:41.000000000","message":"Please refer to a line below where we set task_state to None, which means that live migrations didn\u0027t start because of RPC problems.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"35e75448b055819dc64816d7e719cb5ef0bd5e12","unresolved":false,"context_lines":[{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"},{"line_number":3276,"context_line":"                instance.save()"},{"line_number":3277,"context_line":"                LOG.debug(\u0027RPC timeout during processing live_migrate \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_db5586c6","line":3274,"in_reply_to":"ba8a016a_f6ba066e","updated":"2015-11-17 07:22:37.000000000","message":"Does ACTIVE mean migration is  executed by the underlying driver (libvirt)  ? \n IMO, MessagingTimeout can not guarantee the migration is in process.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d00d17b4ccb087d027a4333a0507d741eea6ee6c","unresolved":false,"context_lines":[{"line_number":3271,"context_line":"                    disk_over_commit\u003ddisk_over_commit)"},{"line_number":3272,"context_line":"        except oslo_exceptions.MessagingTimeout:"},{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":3275,"context_line":"                instance.task_state \u003d None"},{"line_number":3276,"context_line":"                instance.save()"},{"line_number":3277,"context_line":"                LOG.debug(\u0027RPC timeout during processing live_migrate \u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_1ca1eba9","line":3274,"in_reply_to":"ba8a016a_f6ba066e","updated":"2015-11-16 15:59:05.000000000","message":"Is there any reason we can\u0027t handle this here?\n\nhttps://github.com/openstack/nova/blob/master/nova/conductor/manager.py#L294\n\nIt seems we should handle the messaging timeout in conductor rather than leak these details into the compute API.\n\nAnd I agree with John, we can\u0027t just put the instance back in ACTIVE state and assume it\u0027s OK.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"2add5892d930a758ae83e1b3c724c999a412af9f","unresolved":false,"context_lines":[{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                # NOTE(pkoniszewski): It is possible that MessagingTimeout"},{"line_number":3275,"context_line":"                # occurs, but LM will still be in progress, so set VM to error"},{"line_number":3276,"context_line":"                # state and don\u0027t touch task state."},{"line_number":3277,"context_line":"                instance.vm_state \u003d vm_states.ERROR"},{"line_number":3278,"context_line":"                instance.save()"},{"line_number":3279,"context_line":"                LOG.debug(\u0027RPC timeout during processing live_migrate \u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba8a016a_0a6e562f","line":3276,"updated":"2015-11-17 09:47:18.000000000","message":"yes. \n Talk with Pawel: \" basically messaging timeout can occur in every rpc call which means that i should put VM to error state and leave task state in migrating state\"\n\n a live-migration call: \n request:    client(computer api) ---1---\u003e amqp ---2---\u003e live-migration executor(conductor api)\n response:  client ---4---\u003e amqp ---3---\u003e live-migration executor\n if there is something wrong(disconnection) during the 2 process. will messagingtimeout, but migration is not in progress.\n and something wrong (disconnection) during the 3 and 4 process. migration is be in progress. 　\n\n\n Also \n Extreme situation:\n  Other errors come out  during the the migration. also the rpc disconnection(3 and 4). \n  So what will be the final exception, it should be MessagingTimeout.","commit_id":"c18be1aa628bea1355b848fb490635db26b3ac48"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"ebf0978cdc9e95199e809b9c82e5a2a1ebef58d1","unresolved":false,"context_lines":[{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                # NOTE(pkoniszewski): It is possible that MessagingTimeout"},{"line_number":3275,"context_line":"                # occurs, but LM will still be in progress, so set VM to error"},{"line_number":3276,"context_line":"                # state and don\u0027t touch task state."},{"line_number":3277,"context_line":"                instance.vm_state \u003d vm_states.ERROR"},{"line_number":3278,"context_line":"                instance.save()"},{"line_number":3279,"context_line":"                LOG.debug(\u0027RPC timeout during processing live_migrate \u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba8a016a_4a445e73","line":3276,"in_reply_to":"ba8a016a_0a6e562f","updated":"2015-11-17 09:53:26.000000000","message":"All cases are explained in commit message. Please refer to commit message.","commit_id":"c18be1aa628bea1355b848fb490635db26b3ac48"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"63174be3a07319235791b38da1f5ddd4398b2020","unresolved":false,"context_lines":[{"line_number":3273,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3274,"context_line":"                # NOTE(pkoniszewski): It is possible that MessagingTimeout"},{"line_number":3275,"context_line":"                # occurs, but LM will still be in progress, so set VM to error"},{"line_number":3276,"context_line":"                # state and don\u0027t touch task state."},{"line_number":3277,"context_line":"                instance.vm_state \u003d vm_states.ERROR"},{"line_number":3278,"context_line":"                instance.save()"},{"line_number":3279,"context_line":"                LOG.debug(\u0027RPC timeout during processing live_migrate \u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba8a016a_6845abb1","line":3276,"in_reply_to":"ba8a016a_4a445e73","updated":"2015-11-17 10:04:52.000000000","message":"yes.\n here my comments agree with your commit message.","commit_id":"c18be1aa628bea1355b848fb490635db26b3ac48"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"7b28e3faf30d0064926774d8c6f666b36bb6ffa2","unresolved":false,"context_lines":[{"line_number":3362,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3363,"context_line":"                # NOTE(pkoniszewski): It is possible that MessagingTimeout"},{"line_number":3364,"context_line":"                # occurs, but LM will still be in progress, so set VM state"},{"line_number":3365,"context_line":"                # to error and don\u0027t touch task state."},{"line_number":3366,"context_line":"                compute_utils.add_instance_fault_from_exc(context,"},{"line_number":3367,"context_line":"                                                          instance,"},{"line_number":3368,"context_line":"                                                          messaging_timeout)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5aef4532_c82e318b","line":3365,"updated":"2016-03-10 13:17:25.000000000","message":"You forgot to change this note.","commit_id":"a9c5f01bbc764a6efc035139dadc05bbaade9463"},{"author":{"_account_id":14511,"name":"Maciej Szankin","email":"maciej+review@szankin.pl","username":"mszankin"},"change_message_id":"44958ad810ab9f2e1e0fd447d288dfd85b1a7de5","unresolved":false,"context_lines":[{"line_number":3362,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":3363,"context_line":"                # NOTE(pkoniszewski): It is possible that MessagingTimeout"},{"line_number":3364,"context_line":"                # occurs, but LM will still be in progress, so set VM state"},{"line_number":3365,"context_line":"                # to error and don\u0027t touch task state."},{"line_number":3366,"context_line":"                compute_utils.add_instance_fault_from_exc(context,"},{"line_number":3367,"context_line":"                                                          instance,"},{"line_number":3368,"context_line":"                                                          messaging_timeout)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5aef4532_120327b9","line":3365,"in_reply_to":"5aef4532_c82e318b","updated":"2016-03-10 14:19:59.000000000","message":"Done","commit_id":"a9c5f01bbc764a6efc035139dadc05bbaade9463"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0693c8bb03dd3ced47e8e513ab4e659ad2a6fc23","unresolved":false,"context_lines":[{"line_number":3363,"context_line":"                # NOTE(pkoniszewski): It is possible that MessagingTimeout"},{"line_number":3364,"context_line":"                # occurs, but LM will still be in progress, so write"},{"line_number":3365,"context_line":"                # instance fault to database"},{"line_number":3366,"context_line":"                compute_utils.add_instance_fault_from_exc(context,"},{"line_number":3367,"context_line":"                                                          instance,"},{"line_number":3368,"context_line":"                                                          messaging_timeout)"},{"line_number":3369,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"3afc51ec_0649fb8b","line":3366,"updated":"2016-03-11 13:46:01.000000000","message":"I forgot we had instance_actions here now.\n\nWe should really add some info there as well, see this code:\n* https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L408\n* https://github.com/openstack/nova/blob/master/nova/compute/utils.py#L521\n\nI think we want this bit:\nhttps://github.com/openstack/nova/blob/master/nova/objects/instance_action.py#L175\n\nIts basically all a follow on from @3347. Lets have a quick chat about this.","commit_id":"2d825fe18a0c84307ee6a9419a604707747b6b88"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0693c8bb03dd3ced47e8e513ab4e659ad2a6fc23","unresolved":false,"context_lines":[{"line_number":3365,"context_line":"                # instance fault to database"},{"line_number":3366,"context_line":"                compute_utils.add_instance_fault_from_exc(context,"},{"line_number":3367,"context_line":"                                                          instance,"},{"line_number":3368,"context_line":"                                                          messaging_timeout)"},{"line_number":3369,"context_line":""},{"line_number":3370,"context_line":"    @check_instance_lock"},{"line_number":3371,"context_line":"    @check_instance_cell"}],"source_content_type":"text/x-python","patch_set":31,"id":"3afc51ec_43c77545","line":3368,"updated":"2016-03-11 13:46:01.000000000","message":"Does this exception get logged OK in the API?","commit_id":"2d825fe18a0c84307ee6a9419a604707747b6b88"}],"nova/tests/unit/api/openstack/compute/contrib/test_migrate_server.py":[{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"70205e534deadb2d6934252e737052b1fe67a9d2","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        else:"},{"line_number":209,"context_line":"            instance \u003d self._stub_instance_get("},{"line_number":210,"context_line":"                uuid\u003duuid, task_state\u003dtask_states.MIGRATING)"},{"line_number":211,"context_line":"            self.mox.StubOutWithMock(instance, \u0027save\u0027)"},{"line_number":212,"context_line":"            instance.save("},{"line_number":213,"context_line":"                expected_task_state\u003dtask_states.MIGRATING).AndReturn(None)"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9aa53dc9_2f54471f","line":211,"updated":"2015-04-08 04:16:51.000000000","message":"You should use \u0027mock\u0027 instead of \u0027mox\u0027 when you add new logic in unit tests.","commit_id":"376f6f8b89c75759796990bcd823115162135030"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"7eedd2851799e756c1503c12c6b2448c8b1c7b2b","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        else:"},{"line_number":209,"context_line":"            instance \u003d self._stub_instance_get("},{"line_number":210,"context_line":"                uuid\u003duuid, task_state\u003dtask_states.MIGRATING)"},{"line_number":211,"context_line":"            self.mox.StubOutWithMock(instance, \u0027save\u0027)"},{"line_number":212,"context_line":"            instance.save("},{"line_number":213,"context_line":"                expected_task_state\u003dtask_states.MIGRATING).AndReturn(None)"},{"line_number":214,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7aaa499b_57e496df","line":211,"in_reply_to":"9aa53dc9_2f54471f","updated":"2015-04-15 13:35:51.000000000","message":"Ok","commit_id":"376f6f8b89c75759796990bcd823115162135030"},{"author":{"_account_id":9420,"name":"Matthew Gilliard","email":"matthew.gilliard@hp.com","username":"gilliard"},"change_message_id":"e8d0d7b707de87a6c40430f17161a14fe78b898e","unresolved":false,"context_lines":[{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        instance \u003d self._get_fake_instance(uuid\u003duuid)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        with contextlib.nested("},{"line_number":216,"context_line":"            mock.patch.object(self.compute_api, \u0027get\u0027, return_value\u003dinstance),"},{"line_number":217,"context_line":"            mock.patch.object(self.compute_api, \u0027live_migrate\u0027,"},{"line_number":218,"context_line":"                              side_effect\u003dfake_exc)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5afe65bd_8fbe7963","line":215,"updated":"2015-06-04 10:38:19.000000000","message":"Just a nit: we don\u0027t need to use contextlib.nested any more as we don\u0027t support 2.6 any more https://docs.python.org/dev/whatsnew/2.7.html#other-language-changes","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"},{"author":{"_account_id":12814,"name":"Bartosz Fic","email":"bartosz.fic@intel.com","username":"bartosz-fic"},"change_message_id":"e340db7179c9b9ef0ff7ac72bd303a0acf18fcf2","unresolved":false,"context_lines":[{"line_number":212,"context_line":""},{"line_number":213,"context_line":"        instance \u003d self._get_fake_instance(uuid\u003duuid)"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":"        with contextlib.nested("},{"line_number":216,"context_line":"            mock.patch.object(self.compute_api, \u0027get\u0027, return_value\u003dinstance),"},{"line_number":217,"context_line":"            mock.patch.object(self.compute_api, \u0027live_migrate\u0027,"},{"line_number":218,"context_line":"                              side_effect\u003dfake_exc)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3afb71cf_ce647ee6","line":215,"in_reply_to":"5afe65bd_8fbe7963","updated":"2015-06-09 06:33:52.000000000","message":"Ok, I\u0027ll fix that.","commit_id":"770165085608f8e90904dc66a1bea5223aec6c43"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"59002bae2ede0bcacb1171571d93f36b9c81787b","unresolved":false,"context_lines":[{"line_number":1717,"context_line":"                          self.compute_api.live_migrate,"},{"line_number":1718,"context_line":"                          self.context, instance, host_name\u003d\u0027fake_dest_host\u0027,"},{"line_number":1719,"context_line":"                          block_migration\u003dTrue, disk_over_commit\u003dTrue)"},{"line_number":1720,"context_line":"            self.assertEqual(vm_states.ACTIVE, instance.vm_state)"},{"line_number":1721,"context_line":"            self.assertIsNone(instance.task_state)"},{"line_number":1722,"context_line":""},{"line_number":1723,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba8a016a_76f9364d","line":1720,"updated":"2015-11-16 15:33:00.000000000","message":"I think we should move this to the ERROR state, as we are unsure what went wrong.","commit_id":"0db67b179eb6331c5a5aaa2624b026df97337df7"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"7b28e3faf30d0064926774d8c6f666b36bb6ffa2","unresolved":false,"context_lines":[{"line_number":1838,"context_line":"                              self.compute_api.live_migrate,"},{"line_number":1839,"context_line":"                              self.context, instance,"},{"line_number":1840,"context_line":"                              host_name\u003d\u0027fake_dest_host\u0027,"},{"line_number":1841,"context_line":"                              block_migration\u003dTrue, disk_over_commit\u003dTrue)"},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"    @mock.patch.object(objects.RequestSpec, \u0027get_by_instance_uuid\u0027)"},{"line_number":1844,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5aef4532_e854cdca","line":1841,"updated":"2016-03-10 13:17:25.000000000","message":"You can make sure there that add_instance_fault_from_exp was called, but it\u0027s a nit.","commit_id":"a9c5f01bbc764a6efc035139dadc05bbaade9463"},{"author":{"_account_id":14511,"name":"Maciej Szankin","email":"maciej+review@szankin.pl","username":"mszankin"},"change_message_id":"44958ad810ab9f2e1e0fd447d288dfd85b1a7de5","unresolved":false,"context_lines":[{"line_number":1838,"context_line":"                              self.compute_api.live_migrate,"},{"line_number":1839,"context_line":"                              self.context, instance,"},{"line_number":1840,"context_line":"                              host_name\u003d\u0027fake_dest_host\u0027,"},{"line_number":1841,"context_line":"                              block_migration\u003dTrue, disk_over_commit\u003dTrue)"},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"    @mock.patch.object(objects.RequestSpec, \u0027get_by_instance_uuid\u0027)"},{"line_number":1844,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"}],"source_content_type":"text/x-python","patch_set":28,"id":"5aef4532_35644db7","line":1841,"in_reply_to":"5aef4532_e854cdca","updated":"2016-03-10 14:19:59.000000000","message":"Done","commit_id":"a9c5f01bbc764a6efc035139dadc05bbaade9463"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"98879ed5290bf815bd4d806dcdbf0259688a9a67","unresolved":false,"context_lines":[{"line_number":1839,"context_line":"                              self.context, instance,"},{"line_number":1840,"context_line":"                              host_name\u003d\u0027fake_dest_host\u0027,"},{"line_number":1841,"context_line":"                              block_migration\u003dTrue, disk_over_commit\u003dTrue)"},{"line_number":1842,"context_line":"            self.assertTrue(add_instance_fault_from_exc.called)"},{"line_number":1843,"context_line":""},{"line_number":1844,"context_line":"    @mock.patch.object(objects.RequestSpec, \u0027get_by_instance_uuid\u0027)"},{"line_number":1845,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"}],"source_content_type":"text/x-python","patch_set":31,"id":"3afc51ec_86034b0f","line":1842,"updated":"2016-03-11 13:47:59.000000000","message":"Nit: I would prefer add_instance_fault_from_exc.assert_called_once_with(...)","commit_id":"2d825fe18a0c84307ee6a9419a604707747b6b88"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"5fd83fc43396e23139f83a0f9c18ef14565ca440","unresolved":false,"context_lines":[{"line_number":1843,"context_line":"                self.context,"},{"line_number":1844,"context_line":"                instance,"},{"line_number":1845,"context_line":"                mock.ANY"},{"line_number":1846,"context_line":"            )"},{"line_number":1847,"context_line":""},{"line_number":1848,"context_line":"    @mock.patch.object(objects.RequestSpec, \u0027get_by_instance_uuid\u0027)"},{"line_number":1849,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"}],"source_content_type":"text/x-python","patch_set":32,"id":"3afc51ec_e44955d2","line":1846,"updated":"2016-03-11 20:11:46.000000000","message":"This should be on the same line as mock.ANY","commit_id":"9924887ca51218eabdcd0fb35fa813ba10cb2898"},{"author":{"_account_id":14511,"name":"Maciej Szankin","email":"maciej+review@szankin.pl","username":"mszankin"},"change_message_id":"4086241123e51011bbc1142abe9a2674897c8326","unresolved":false,"context_lines":[{"line_number":1843,"context_line":"                self.context,"},{"line_number":1844,"context_line":"                instance,"},{"line_number":1845,"context_line":"                mock.ANY"},{"line_number":1846,"context_line":"            )"},{"line_number":1847,"context_line":""},{"line_number":1848,"context_line":"    @mock.patch.object(objects.RequestSpec, \u0027get_by_instance_uuid\u0027)"},{"line_number":1849,"context_line":"    @mock.patch.object(objects.Instance, \u0027save\u0027)"}],"source_content_type":"text/x-python","patch_set":32,"id":"3afc51ec_b67491cf","line":1846,"in_reply_to":"3afc51ec_e44955d2","updated":"2016-03-12 10:19:07.000000000","message":"Done","commit_id":"9924887ca51218eabdcd0fb35fa813ba10cb2898"}]}
