)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64fe846011c69d58c1b6131ad354138be48b0ae6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Erik Olof Gunnar Andersson \u003ceandersson@blizzard.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-07-26 14:44:36 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Always cleanup when hitting MaxRetriesExceeded"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We never clean up when raising this exception. This"},{"line_number":10,"context_line":"catches the exception and then triggers the appropriate"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7faddb67_3a4f37be","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":6},"updated":"2019-07-29 17:59:23.000000000","message":"As noted inline we\u0027re not always cleaning up when we hit MaxRetriesExceeded - if we didn\u0027t get any alternate hosts from the reschedule then we just raise MaxRetriesExceeded and don\u0027t cleanup.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6978a031bf83451053b76540d58628ac992abf71","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Erik Olof Gunnar Andersson \u003ceandersson@blizzard.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-07-26 14:44:36 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Always cleanup when hitting MaxRetriesExceeded"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We never clean up when raising this exception. This"},{"line_number":10,"context_line":"catches the exception and then triggers the appropriate"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7faddb67_3a80978b","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":6},"in_reply_to":"7faddb67_3a4f37be","updated":"2019-07-29 18:05:35.000000000","message":"Ignore this, I\u0027m wrong.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"64fe846011c69d58c1b6131ad354138be48b0ae6","unresolved":false,"context_lines":[{"line_number":10,"context_line":"catches the exception and then triggers the appropriate"},{"line_number":11,"context_line":"cleaning routine."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We raise an exception as _cleanup_when_reschedule_fails,"},{"line_number":14,"context_line":"expects an exception."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I6a2c63a4c33e783100208fd3f45eb52aad49e3d6"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7faddb67_1aca7b19","line":13,"range":{"start_line":13,"start_character":3,"end_line":13,"end_character":8},"updated":"2019-07-29 17:59:23.000000000","message":"We don\u0027t really raise it, we generate it for the error notification and fault message.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"}],"nova/conductor/manager.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"dd2a2ae468052b0fd47c379e8440004b138983a0","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                self._cleanup_when_reschedule_fails("},{"line_number":668,"context_line":"                    context, instance, exc, legacy_request_spec,"},{"line_number":669,"context_line":"                    requested_networks)"},{"line_number":670,"context_line":"            return"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"        elevated \u003d context.elevated()"},{"line_number":673,"context_line":"        for (instance, host_list) in six.moves.zip(instances, host_lists):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_026eb495","line":670,"updated":"2019-07-26 04:18:11.000000000","message":"Wondering if we need any of the additional handling that is here in this example?","commit_id":"5fb702d72586c9efbeb6c76ac3c8aa385a5c7032"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"50503730eb2837ac03602509ba88f07958496a94","unresolved":false,"context_lines":[{"line_number":667,"context_line":"                self._cleanup_when_reschedule_fails("},{"line_number":668,"context_line":"                    context, instance, exc, legacy_request_spec,"},{"line_number":669,"context_line":"                    requested_networks)"},{"line_number":670,"context_line":"            return"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"        elevated \u003d context.elevated()"},{"line_number":673,"context_line":"        for (instance, host_list) in six.moves.zip(instances, host_lists):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_cb5e7744","line":670,"in_reply_to":"7faddb67_026eb495","updated":"2019-07-26 10:25:55.000000000","message":"num_attempts \u003c\u003d1 is the non resudule cased so by the time we get to the error below the build request is gone and there is nothing to clean up so i thnk we are good.","commit_id":"5fb702d72586c9efbeb6c76ac3c8aa385a5c7032"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"dd2a2ae468052b0fd47c379e8440004b138983a0","unresolved":false,"context_lines":[{"line_number":725,"context_line":"                               {"},{"line_number":726,"context_line":"                                   \"instance_uuid\": instance.uuid"},{"line_number":727,"context_line":"                               })"},{"line_number":728,"context_line":"                        raise exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":729,"context_line":"                    except exception.MaxRetriesExceeded as exc:"},{"line_number":730,"context_line":"                        self._cleanup_when_reschedule_fails("},{"line_number":731,"context_line":"                            context, instance, exc, legacy_request_spec,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_225970fd","line":728,"updated":"2019-07-26 04:18:11.000000000","message":"Indeed, this is the only place in this file where MaxRetriesExceeded is raised outside of a try-except block.","commit_id":"5fb702d72586c9efbeb6c76ac3c8aa385a5c7032"},{"author":{"_account_id":22623,"name":"Erik Olof Gunnar Andersson","email":"eandersson@blizzard.com","username":"eoandersson"},"change_message_id":"cc922d89edb18e38de7293b9d731aa3a8474eb89","unresolved":false,"context_lines":[{"line_number":725,"context_line":"                               {"},{"line_number":726,"context_line":"                                   \"instance_uuid\": instance.uuid"},{"line_number":727,"context_line":"                               })"},{"line_number":728,"context_line":"                        raise exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":729,"context_line":"                    except exception.MaxRetriesExceeded as exc:"},{"line_number":730,"context_line":"                        self._cleanup_when_reschedule_fails("},{"line_number":731,"context_line":"                            context, instance, exc, legacy_request_spec,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_b2492761","line":728,"in_reply_to":"7faddb67_1cfe1438","updated":"2019-07-26 18:07:17.000000000","message":"Yep - wrote this late last night and went through many iterations. Will change this.","commit_id":"5fb702d72586c9efbeb6c76ac3c8aa385a5c7032"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"50503730eb2837ac03602509ba88f07958496a94","unresolved":false,"context_lines":[{"line_number":725,"context_line":"                               {"},{"line_number":726,"context_line":"                                   \"instance_uuid\": instance.uuid"},{"line_number":727,"context_line":"                               })"},{"line_number":728,"context_line":"                        raise exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":729,"context_line":"                    except exception.MaxRetriesExceeded as exc:"},{"line_number":730,"context_line":"                        self._cleanup_when_reschedule_fails("},{"line_number":731,"context_line":"                            context, instance, exc, legacy_request_spec,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_2bbaab6d","line":728,"in_reply_to":"7faddb67_225970fd","updated":"2019-07-26 10:25:55.000000000","message":"based on what we observed yesterday this is likely correct.\n\n_cleanup_when_reschedule_fails does not exist on rocky\nbut it looks like the patch that added it was trying to solve the same issue and missed this branch \n\nhttps://github.com/openstack/nova/commit/b096d9303acfea81ca56394cab681d2b2eed2d91\n\nso when backporting we should backport that first then this change","commit_id":"5fb702d72586c9efbeb6c76ac3c8aa385a5c7032"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1c56637fc60be67eeb403dd5c1ea7087afc9f3c1","unresolved":false,"context_lines":[{"line_number":725,"context_line":"                               {"},{"line_number":726,"context_line":"                                   \"instance_uuid\": instance.uuid"},{"line_number":727,"context_line":"                               })"},{"line_number":728,"context_line":"                        raise exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":729,"context_line":"                    except exception.MaxRetriesExceeded as exc:"},{"line_number":730,"context_line":"                        self._cleanup_when_reschedule_fails("},{"line_number":731,"context_line":"                            context, instance, exc, legacy_request_spec,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_1cfe1438","line":728,"in_reply_to":"7faddb67_2bbaab6d","updated":"2019-07-26 16:58:06.000000000","message":"A tad bizarre to raise the exception only to immediately trap it just so you can use it as a param. Does this behave differently than just:\n\n exc \u003d exception.MaxRetriesExceeded(reason\u003dmsg)\n self._cleanup_when_reschedule_fails(\n     context, instance, exc, legacy_request_spec,\n     requested_networks)\n\nUnless I\u0027m missing something, it shouldn\u0027t.\n\n In [1]: e \u003d Exception(\u0027goo\u0027)\n\n In [2]: e\n Out[2]: Exception(\u0027goo\u0027)\n\n In [3]: try:\n   ...:     raise e\n   ...: except Exception as e2:\n   ...:     pass\n   ...: \n\n In [4]: e2\n Out[4]: Exception(\u0027goo\u0027)\n\n In [5]: e2 is e\n Out[5]: True","commit_id":"5fb702d72586c9efbeb6c76ac3c8aa385a5c7032"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"b8cab813fb2295cbac2af4c4d1e548b21a228d3a","unresolved":false,"context_lines":[{"line_number":725,"context_line":"                               {"},{"line_number":726,"context_line":"                                   \"instance_uuid\": instance.uuid"},{"line_number":727,"context_line":"                               })"},{"line_number":728,"context_line":"                        raise exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":729,"context_line":"                    except exception.MaxRetriesExceeded as exc:"},{"line_number":730,"context_line":"                        self._cleanup_when_reschedule_fails("},{"line_number":731,"context_line":"                            context, instance, exc, legacy_request_spec,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7faddb67_141d7272","line":728,"in_reply_to":"7faddb67_b2492761","updated":"2019-07-29 16:02:15.000000000","message":"im not sure if\n\nexc \u003d exception.MaxRetriesExceeded(reason\u003dmsg)\n self._cleanup_when_reschedule_fails(\n     context, instance, exc, legacy_request_spec,\n     requested_networks)\n\nwill contain a correct stacktrace since it has not been thrown or not so perhaps that is why we do it this way.\ni.e. i dont know  if construction an exception populates the stack/frampointer or if that is only done  when the excetion is raised so it may actully be different.","commit_id":"5fb702d72586c9efbeb6c76ac3c8aa385a5c7032"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"13e45efc1302bd45f52f04007126bb29abfcb0ea","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        self._cleanup_allocated_networks("},{"line_number":564,"context_line":"            context, instance, requested_networks)"},{"line_number":565,"context_line":""},{"line_number":566,"context_line":"    # NOTE(danms): This is never cell-targeted because it is only used for"},{"line_number":567,"context_line":"    # cellsv1 (which does not target cells directly) and n-cpu reschedules"},{"line_number":568,"context_line":"    # (which go to the cell conductor and thus are always cell-specific)."},{"line_number":569,"context_line":"    def build_instances(self, context, instances, image, filter_properties,"},{"line_number":570,"context_line":"            admin_password, injected_files, requested_networks,"},{"line_number":571,"context_line":"            security_groups, block_device_mapping\u003dNone, legacy_bdm\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_afe9a780","line":568,"range":{"start_line":566,"start_character":4,"end_line":568,"end_character":73},"updated":"2019-07-29 16:55:28.000000000","message":"when i intially looked at this code i got quite confused by the comment too as i ws not sure if this was ever used in a non cellv1 case. if it wasnt from the fact that we saw that it was being called for the resudle it would have assumed it was cellv1 only code","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c2f14ea51a6fc17d55231654b93bc334051c46a2","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                    msg \u003d (\"Exhausted all hosts available for retrying build \""},{"line_number":631,"context_line":"                           \"failures for instance %(instance_uuid)s.\" %"},{"line_number":632,"context_line":"                           {\"instance_uuid\": instances[0].uuid})"},{"line_number":633,"context_line":"                    raise exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                # This is not a reschedule, so we need to call the scheduler to"},{"line_number":636,"context_line":"                # get appropriate hosts for the request."}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_4feef3b4","line":633,"updated":"2019-07-29 16:41:12.000000000","message":"What about this? Similar end result but different cause, i.e. you had an alternative host but it\u0027s no longer available when we tried to allocation against it (below), but in this case there just aren\u0027t alternates.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6978a031bf83451053b76540d58628ac992abf71","unresolved":false,"context_lines":[{"line_number":630,"context_line":"                    msg \u003d (\"Exhausted all hosts available for retrying build \""},{"line_number":631,"context_line":"                           \"failures for instance %(instance_uuid)s.\" %"},{"line_number":632,"context_line":"                           {\"instance_uuid\": instances[0].uuid})"},{"line_number":633,"context_line":"                    raise exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":634,"context_line":"            else:"},{"line_number":635,"context_line":"                # This is not a reschedule, so we need to call the scheduler to"},{"line_number":636,"context_line":"                # get appropriate hosts for the request."}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_9a718be1","line":633,"in_reply_to":"7faddb67_4feef3b4","updated":"2019-07-29 18:05:35.000000000","message":"Oh I\u0027m sorry, this is handled in the except block below.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c2f14ea51a6fc17d55231654b93bc334051c46a2","unresolved":false,"context_lines":[{"line_number":670,"context_line":"            return"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"        elevated \u003d context.elevated()"},{"line_number":673,"context_line":"        for (instance, host_list) in six.moves.zip(instances, host_lists):"},{"line_number":674,"context_line":"            host \u003d host_list.pop(0)"},{"line_number":675,"context_line":"            if is_reschedule:"},{"line_number":676,"context_line":"                # If this runs in the superconductor, the first instance will"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_6ff96f7e","line":673,"updated":"2019-07-29 16:41:12.000000000","message":"Note that you\u0027re in a loop here so returning breaks the loop (as would raising). In the \"if is_reschedule\" block though you\u0027d only have one instance (passed up from the compute service) anyway so the loop isn\u0027t a big deal.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"475ba74269925244e3122a577cd0d7a258f9429d","unresolved":false,"context_lines":[{"line_number":670,"context_line":"            return"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"        elevated \u003d context.elevated()"},{"line_number":673,"context_line":"        for (instance, host_list) in six.moves.zip(instances, host_lists):"},{"line_number":674,"context_line":"            host \u003d host_list.pop(0)"},{"line_number":675,"context_line":"            if is_reschedule:"},{"line_number":676,"context_line":"                # If this runs in the superconductor, the first instance will"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_6f6c0f36","line":673,"in_reply_to":"7faddb67_0f179ba5","updated":"2019-07-29 16:47:05.000000000","message":"In the reschedule case compute is going to only ever send one instance, not a list:\n\nhttps://github.com/openstack/nova/blob/1599e3cf68779eafaaa2b13a273d3bebd1379c19/nova/compute/manager.py#L2047\n\nSo like I said, it\u0027s a loop over a list of 1 so it\u0027s not a big deal.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"13e45efc1302bd45f52f04007126bb29abfcb0ea","unresolved":false,"context_lines":[{"line_number":670,"context_line":"            return"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"        elevated \u003d context.elevated()"},{"line_number":673,"context_line":"        for (instance, host_list) in six.moves.zip(instances, host_lists):"},{"line_number":674,"context_line":"            host \u003d host_list.pop(0)"},{"line_number":675,"context_line":"            if is_reschedule:"},{"line_number":676,"context_line":"                # If this runs in the superconductor, the first instance will"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_afd0c7ca","line":673,"in_reply_to":"7faddb67_6f6c0f36","updated":"2019-07-29 16:55:28.000000000","message":"cool just checking. i didnt notice that it was in a loop friday night and i was focusing on erric question today so i was unsure. but yes if its always a loop over a list of 1 element then yes return is fine.\n\ni also agree with your top level comment that we should likely clean this up now that cellsv1 has been removed to just concentrate on the reshedule case.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"163f886de2b0ded510a33df8f165d7377d23b60b","unresolved":false,"context_lines":[{"line_number":670,"context_line":"            return"},{"line_number":671,"context_line":""},{"line_number":672,"context_line":"        elevated \u003d context.elevated()"},{"line_number":673,"context_line":"        for (instance, host_list) in six.moves.zip(instances, host_lists):"},{"line_number":674,"context_line":"            host \u003d host_list.pop(0)"},{"line_number":675,"context_line":"            if is_reschedule:"},{"line_number":676,"context_line":"                # If this runs in the superconductor, the first instance will"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_0f179ba5","line":673,"in_reply_to":"7faddb67_6ff96f7e","updated":"2019-07-29 16:44:36.000000000","message":"do you think we should do a continue instead? and continue to process other instances. could we have to deal with that in a multi-create case where one fo the instace failed?","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"621ad419e6020ea3ff05ed18a304d3378353dcf7","unresolved":false,"context_lines":[{"line_number":721,"context_line":"                    msg \u003d (\"Exhausted all hosts available for retrying build \""},{"line_number":722,"context_line":"                           \"failures for instance %(instance_uuid)s.\" %"},{"line_number":723,"context_line":"                           {\"instance_uuid\": instance.uuid})"},{"line_number":724,"context_line":"                    exc \u003d exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":725,"context_line":"                    self._cleanup_when_reschedule_fails("},{"line_number":726,"context_line":"                        context, instance, exc, legacy_request_spec,"},{"line_number":727,"context_line":"                        requested_networks)"},{"line_number":728,"context_line":"                    return"},{"line_number":729,"context_line":"            instance.availability_zone \u003d ("},{"line_number":730,"context_line":"                availability_zones.get_host_availability_zone(context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_effebf03","line":727,"range":{"start_line":724,"start_character":20,"end_line":727,"end_character":43},"updated":"2019-07-29 16:04:40.000000000","message":"as noted this may actully be a chivnve in behavior if the exception is not populated with a referenfce to the current stack frame and/or a traceback on construction vs raising and then catching the exception.\n\nthis should however fix the issue even if the log message is different so i guess this is fine.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a1cc95d88d95122dfbfe0abe9cc342da518f2f47","unresolved":false,"context_lines":[{"line_number":721,"context_line":"                    msg \u003d (\"Exhausted all hosts available for retrying build \""},{"line_number":722,"context_line":"                           \"failures for instance %(instance_uuid)s.\" %"},{"line_number":723,"context_line":"                           {\"instance_uuid\": instance.uuid})"},{"line_number":724,"context_line":"                    exc \u003d exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":725,"context_line":"                    self._cleanup_when_reschedule_fails("},{"line_number":726,"context_line":"                        context, instance, exc, legacy_request_spec,"},{"line_number":727,"context_line":"                        requested_networks)"},{"line_number":728,"context_line":"                    return"},{"line_number":729,"context_line":"            instance.availability_zone \u003d ("},{"line_number":730,"context_line":"                availability_zones.get_host_availability_zone(context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_ba9ec704","line":727,"range":{"start_line":724,"start_character":20,"end_line":727,"end_character":43},"in_reply_to":"7faddb67_8fc62b49","updated":"2019-07-29 18:02:26.000000000","message":"If we wanted a traceback, couldn\u0027t we do something like this?\n\ntry:\n    raise exception.MaxRetriesExceeded(reason\u003dmsg)\nexcept exception.MaxRetriesExceeded as exc:\n    with excutils.save_and_reraise_exception():\n        self._cleanup_when_reschedule_fails(\n            context, instance, exc, legacy_request_spec,\n            requested_networks)","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a480a22ff11175025e868b636e52d1403286ffd9","unresolved":false,"context_lines":[{"line_number":721,"context_line":"                    msg \u003d (\"Exhausted all hosts available for retrying build \""},{"line_number":722,"context_line":"                           \"failures for instance %(instance_uuid)s.\" %"},{"line_number":723,"context_line":"                           {\"instance_uuid\": instance.uuid})"},{"line_number":724,"context_line":"                    exc \u003d exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":725,"context_line":"                    self._cleanup_when_reschedule_fails("},{"line_number":726,"context_line":"                        context, instance, exc, legacy_request_spec,"},{"line_number":727,"context_line":"                        requested_networks)"},{"line_number":728,"context_line":"                    return"},{"line_number":729,"context_line":"            instance.availability_zone \u003d ("},{"line_number":730,"context_line":"                availability_zones.get_host_availability_zone(context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_7a0daf3c","line":727,"range":{"start_line":724,"start_character":20,"end_line":727,"end_character":43},"in_reply_to":"7faddb67_ba9ec704","updated":"2019-07-29 18:07:44.000000000","message":"The save_and_reraise would make it raise the exception after cleanup, which we don\u0027t actually want.\n\nBut otherwise, yeah, this is substantially what was in PS3 where I thought it looked a bit weird to raise an exception just to immediately trap it purely for the purpose of passing it to the cleanup method.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"5811b1cb66973bf84a17bad5e684b3a3a94be6fe","unresolved":false,"context_lines":[{"line_number":721,"context_line":"                    msg \u003d (\"Exhausted all hosts available for retrying build \""},{"line_number":722,"context_line":"                           \"failures for instance %(instance_uuid)s.\" %"},{"line_number":723,"context_line":"                           {\"instance_uuid\": instance.uuid})"},{"line_number":724,"context_line":"                    exc \u003d exception.MaxRetriesExceeded(reason\u003dmsg)"},{"line_number":725,"context_line":"                    self._cleanup_when_reschedule_fails("},{"line_number":726,"context_line":"                        context, instance, exc, legacy_request_spec,"},{"line_number":727,"context_line":"                        requested_networks)"},{"line_number":728,"context_line":"                    return"},{"line_number":729,"context_line":"            instance.availability_zone \u003d ("},{"line_number":730,"context_line":"                availability_zones.get_host_availability_zone(context,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_8fc62b49","line":727,"range":{"start_line":724,"start_character":20,"end_line":727,"end_character":43},"in_reply_to":"7faddb67_effebf03","updated":"2019-07-29 16:37:44.000000000","message":"so for clarity the traceback object in python3 is only constructed when the excetpion object is raised\n\nPython 3.6.8 (default, Jan 14 2019, 11:02:34) \n[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e val_error \u003d ValueError()\n\u003e\u003e\u003e val_error.__traceback__\n\u003e\u003e\u003e raise val_error\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nValueError\n\u003e\u003e\u003e val_error.__traceback__\n\u003ctraceback object at 0x7fc44ac5db48\u003e\n\nbut since we dont use the traceback for anythin other then loging it this does not change any behavior we care about\n\nafter breifly discussing this on irc im changing my +0 to +1\n\nand just leaving this comment to not that we know this is not the same as raising and catching but we are also ok with that.\n\n\nsimilarly on python 2 there would be no exception currently in flight so \n\nimport traceback, sys\n...\n ex_type, ex, tb \u003d sys.exc_info()\n...         traceback.print_tb(tb)\n\nwould also not work.","commit_id":"6a4dc140d78d013fe1c0b0e18d91640e7436984d"}],"nova/tests/functional/regressions/test_bug_1837955.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"18a3bd151fd4c9f8124020c66f7a5595f7214c72","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        # set_vm_state_and_notify sets the vm_state to ERROR before the fault"},{"line_number":91,"context_line":"        # is recorded but after the notification is sent. So wait for the"},{"line_number":92,"context_line":"        # unversioned notification to show up and then get the fault."},{"line_number":93,"context_line":"        self._wait_for_unversioned_notification("},{"line_number":94,"context_line":"            \u0027compute_task.build_instances\u0027)"},{"line_number":95,"context_line":"        server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":96,"context_line":"        self.assertIn(\u0027fault\u0027, server)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_a7e6abe7","line":93,"updated":"2019-07-29 20:06:43.000000000","message":"nit: join lines","commit_id":"ef573da1aa7d0caaf1c8e889b0ecd8cdabd5c32a"}],"nova/tests/unit/conductor/test_conductor.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f96b2de2032038fac240893ede325b57eb93957d","unresolved":false,"context_lines":[{"line_number":719,"context_line":"        )"},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"        # Since claim_resources() is mocked to always return False, we will run"},{"line_number":722,"context_line":"        # out of alternate hosts, and MaxRetriesExceeded should be raised."},{"line_number":723,"context_line":"        mock_notify.assert_called_once_with("},{"line_number":724,"context_line":"            self.context, \u0027build_instances\u0027,"},{"line_number":725,"context_line":"            instance.uuid, test.MatchType(dict), \u0027error\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_c7ade79b","line":722,"range":{"start_line":722,"start_character":38,"end_line":722,"end_character":73},"updated":"2019-07-29 19:57:01.000000000","message":"not so much raised as complained about","commit_id":"ef573da1aa7d0caaf1c8e889b0ecd8cdabd5c32a"}]}
