)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[{"line_number":11,"context_line":"of the instance against the image required traits and allow the action"},{"line_number":12,"context_line":"only if the current allocations can satisfy the image requirements."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Fix minor comments from https://review.openstack.org/#/c/560596/"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ie49d605c66062d2548241d7e04f5a2a6b98c011e"},{"line_number":17,"context_line":"Implements: blueprint glance-image-traits"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f7c97a3_72f528ed","line":14,"updated":"2018-06-04 18:42:55.000000000","message":"I haven\u0027t looked at what this entails yet, but this should really be done in a separate patch.","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"df31e0b40c2f60abbd455cf0901bb17dc1e43c29","unresolved":false,"context_lines":[{"line_number":11,"context_line":"of the instance against the image required traits and allow the action"},{"line_number":12,"context_line":"only if the current allocations can satisfy the image requirements."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Fix minor comments from https://review.openstack.org/#/c/560596/"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: Ie49d605c66062d2548241d7e04f5a2a6b98c011e"},{"line_number":17,"context_line":"Implements: blueprint glance-image-traits"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f7c97a3_e6fe5eae","line":14,"in_reply_to":"5f7c97a3_72f528ed","updated":"2018-06-15 08:16:52.000000000","message":"Moving this fix to a different patch, removed the line","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"}],"nova/conductor/manager.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[{"line_number":941,"context_line":"                    # if we want to make sure that the next destination"},{"line_number":942,"context_line":"                    # is not forced to be the original host"},{"line_number":943,"context_line":"                    request_spec.reset_forced_destinations()"},{"line_number":944,"context_line":"                else:"},{"line_number":945,"context_line":"                    # The user is requesting a rebuild with a new image on the"},{"line_number":946,"context_line":"                    # same host, we need to validate the traits vs allocations."},{"line_number":947,"context_line":"                    try:"},{"line_number":948,"context_line":"                        self._validate_image_traits_for_rebuild(context,"},{"line_number":949,"context_line":"                                                                instance,"},{"line_number":950,"context_line":"                                                                image_ref)"},{"line_number":951,"context_line":"                    except exception.NoValidHost as ex:"},{"line_number":952,"context_line":"                        self._handle_rebuild_exception(context, ex, instance,"},{"line_number":953,"context_line":"                                                       image_ref,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_f2a618ac","line":950,"range":{"start_line":944,"start_character":0,"end_line":950,"end_character":74},"updated":"2018-06-04 18:42:55.000000000","message":"-- Read the comment on L1006 first --\n\n...so what I\u0027m saying is, IMO this `else` is hard to reason about.  It\u0027s especially difficult to see how `else` translates to \"same host, new image\".  It would be easier to understand (and the code flow would be prettier, exception-wise) if the `try` on L957 below contained:\n\n try:\n     if \u003csame host\u003e and \u003cnew image\u003e:\n         self._validate_image_traits_for_rebuild(...)\n     # below is unchanged...\n     request_spec.ensure_project_and_user_id(instance)\n     host_lists \u003d self._schedule_instances...\n     ...\n except ...:\n     # leave this as it was before","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"df31e0b40c2f60abbd455cf0901bb17dc1e43c29","unresolved":false,"context_lines":[{"line_number":941,"context_line":"                    # if we want to make sure that the next destination"},{"line_number":942,"context_line":"                    # is not forced to be the original host"},{"line_number":943,"context_line":"                    request_spec.reset_forced_destinations()"},{"line_number":944,"context_line":"                else:"},{"line_number":945,"context_line":"                    # The user is requesting a rebuild with a new image on the"},{"line_number":946,"context_line":"                    # same host, we need to validate the traits vs allocations."},{"line_number":947,"context_line":"                    try:"},{"line_number":948,"context_line":"                        self._validate_image_traits_for_rebuild(context,"},{"line_number":949,"context_line":"                                                                instance,"},{"line_number":950,"context_line":"                                                                image_ref)"},{"line_number":951,"context_line":"                    except exception.NoValidHost as ex:"},{"line_number":952,"context_line":"                        self._handle_rebuild_exception(context, ex, instance,"},{"line_number":953,"context_line":"                                                       image_ref,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_e6ec1ef6","line":950,"range":{"start_line":944,"start_character":0,"end_line":950,"end_character":74},"in_reply_to":"5f7c97a3_f2a618ac","updated":"2018-06-15 08:16:52.000000000","message":"Removed \u0027else\u0027 and follow the 2nd option in comment made on L1006, which seems to me most preferred fix","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[{"line_number":1003,"context_line":"        if orig_image_ref and orig_image_ref !\u003d image_ref:"},{"line_number":1004,"context_line":"            instance.image_ref \u003d orig_image_ref"},{"line_number":1005,"context_line":"            instance.save()"},{"line_number":1006,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":1007,"context_line":"            self._set_vm_state_and_notify(context, instance.uuid,"},{"line_number":1008,"context_line":"                                          \u0027rebuild_server\u0027,"},{"line_number":1009,"context_line":"                                          {\u0027vm_state\u0027: vm_states.ERROR,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_f2b29849","line":1006,"range":{"start_line":1006,"start_character":8,"end_line":1006,"end_character":51},"updated":"2018-06-04 18:42:55.000000000","message":"Hm.  I get that this is just a cut/paste of existing code, but it seems like this save_and_reraise_exception should really come first - especially before the migration.save() and instance.save(), which could easily muck with the exception context.\n\nI\u0027m also pretty ooked out by save_and_reraise_exception not being glued to the `except` clause it\u0027s handling.\n\nSo I think a better overall approach would be for each of the two exceptions using this to say:\n\n except ...:\n     with save_and_reraise_exception(...):\n         self._handle_rebuild_exception(...)\n\n...and remove the save_and_reraise_exception from this helper method.\n\n[LATER] Or you could avoid the issue by invoking _validate_image_traits_for_rebuild from within the existing `try` clause on L957.  I get that we want to be efficient and only do the check if we\u0027re working with a new image - but IMO this code would be easier to reason about if that condition were explicit.  See above.","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"df31e0b40c2f60abbd455cf0901bb17dc1e43c29","unresolved":false,"context_lines":[{"line_number":1003,"context_line":"        if orig_image_ref and orig_image_ref !\u003d image_ref:"},{"line_number":1004,"context_line":"            instance.image_ref \u003d orig_image_ref"},{"line_number":1005,"context_line":"            instance.save()"},{"line_number":1006,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":1007,"context_line":"            self._set_vm_state_and_notify(context, instance.uuid,"},{"line_number":1008,"context_line":"                                          \u0027rebuild_server\u0027,"},{"line_number":1009,"context_line":"                                          {\u0027vm_state\u0027: vm_states.ERROR,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_a6b866e8","line":1006,"range":{"start_line":1006,"start_character":8,"end_line":1006,"end_character":51},"in_reply_to":"5f7c97a3_f2b29849","updated":"2018-06-15 08:16:52.000000000","message":"Done","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"        image_traits \u003d set()"},{"line_number":1025,"context_line":"        image_meta \u003d objects.ImageMeta.from_image_ref("},{"line_number":1026,"context_line":"            context, self.image_api, image_ref)"},{"line_number":1027,"context_line":"        if (\u0027properties\u0027 in image_meta and"},{"line_number":1028,"context_line":"                \u0027traits_required\u0027 in image_meta.properties):"},{"line_number":1029,"context_line":"            image_traits.update("},{"line_number":1030,"context_line":"                image_meta.properties.traits_required)"},{"line_number":1031,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_52590c8c","line":1028,"range":{"start_line":1027,"start_character":8,"end_line":1028,"end_character":60},"updated":"2018-06-04 18:42:55.000000000","message":"or if *not* this, return.  Then you can nix the condition on L1033 and save an indent on the rest of the method.","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"df31e0b40c2f60abbd455cf0901bb17dc1e43c29","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"        image_traits \u003d set()"},{"line_number":1025,"context_line":"        image_meta \u003d objects.ImageMeta.from_image_ref("},{"line_number":1026,"context_line":"            context, self.image_api, image_ref)"},{"line_number":1027,"context_line":"        if (\u0027properties\u0027 in image_meta and"},{"line_number":1028,"context_line":"                \u0027traits_required\u0027 in image_meta.properties):"},{"line_number":1029,"context_line":"            image_traits.update("},{"line_number":1030,"context_line":"                image_meta.properties.traits_required)"},{"line_number":1031,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_66b24e09","line":1028,"range":{"start_line":1027,"start_character":8,"end_line":1028,"end_character":60},"in_reply_to":"5f7c97a3_52590c8c","updated":"2018-06-15 08:16:52.000000000","message":"Done","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[{"line_number":1049,"context_line":""},{"line_number":1050,"context_line":"            missing_traits \u003d image_traits - traits_in_instance_rp"},{"line_number":1051,"context_line":""},{"line_number":1052,"context_line":"            if len(missing_traits) \u003e 0:"},{"line_number":1053,"context_line":"                LOG.warning("},{"line_number":1054,"context_line":"                    \"The following traits were in the image but not \""},{"line_number":1055,"context_line":"                    \"in the instance\u0027s allocated Resource Providers: %s\","}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_b2c0a0e2","line":1052,"range":{"start_line":1052,"start_character":12,"end_line":1052,"end_character":39},"updated":"2018-06-04 18:42:55.000000000","message":"or just:\n\n if missing_traits:","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"df31e0b40c2f60abbd455cf0901bb17dc1e43c29","unresolved":false,"context_lines":[{"line_number":1049,"context_line":""},{"line_number":1050,"context_line":"            missing_traits \u003d image_traits - traits_in_instance_rp"},{"line_number":1051,"context_line":""},{"line_number":1052,"context_line":"            if len(missing_traits) \u003e 0:"},{"line_number":1053,"context_line":"                LOG.warning("},{"line_number":1054,"context_line":"                    \"The following traits were in the image but not \""},{"line_number":1055,"context_line":"                    \"in the instance\u0027s allocated Resource Providers: %s\","}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_e6c5fe5d","line":1052,"range":{"start_line":1052,"start_character":12,"end_line":1052,"end_character":39},"in_reply_to":"5f7c97a3_b2c0a0e2","updated":"2018-06-15 08:16:52.000000000","message":"Done","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[{"line_number":1050,"context_line":"            missing_traits \u003d image_traits - traits_in_instance_rp"},{"line_number":1051,"context_line":""},{"line_number":1052,"context_line":"            if len(missing_traits) \u003e 0:"},{"line_number":1053,"context_line":"                LOG.warning("},{"line_number":1054,"context_line":"                    \"The following traits were in the image but not \""},{"line_number":1055,"context_line":"                    \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1056,"context_line":"                    \u0027, \u0027.join(missing_traits))"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_72ba086f","line":1053,"range":{"start_line":1053,"start_character":20,"end_line":1053,"end_character":27},"updated":"2018-06-04 18:42:55.000000000","message":"this is probably LOG.error-worthy.","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"                    \"The following traits were in the image but not \""},{"line_number":1055,"context_line":"                    \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1056,"context_line":"                    \u0027, \u0027.join(missing_traits))"},{"line_number":1057,"context_line":"                ex \u003d exception.NoValidHost("},{"line_number":1058,"context_line":"                    reason\u003d\"Image traits cannot be \""},{"line_number":1059,"context_line":"                           \"satisfied by the current resource providers.\""},{"line_number":1060,"context_line":"                           \"Please relaunch the instance.\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_128634bc","line":1057,"range":{"start_line":1057,"start_character":16,"end_line":1057,"end_character":18},"updated":"2018-06-04 18:42:55.000000000","message":"nit: not really a need for this.","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":942,"context_line":"                    # is not forced to be the original host"},{"line_number":943,"context_line":"                    request_spec.reset_forced_destinations()"},{"line_number":944,"context_line":"                try:"},{"line_number":945,"context_line":"                    if request_spec and not recreate:"},{"line_number":946,"context_line":"                        self._validate_image_traits_for_rebuild(context,"},{"line_number":947,"context_line":"                                                                instance,"},{"line_number":948,"context_line":"                                                                image_ref)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_0ae8eb79","line":945,"range":{"start_line":945,"start_character":20,"end_line":945,"end_character":53},"updated":"2018-06-19 21:43:52.000000000","message":"This still doesn\u0027t intuitively translate to \"same host, new image\".  Please at least add a comment explaining the correlation.","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"a86973f0e4089cdb9741737fd2e34da971902981","unresolved":false,"context_lines":[{"line_number":942,"context_line":"                    # is not forced to be the original host"},{"line_number":943,"context_line":"                    request_spec.reset_forced_destinations()"},{"line_number":944,"context_line":"                try:"},{"line_number":945,"context_line":"                    if request_spec and not recreate:"},{"line_number":946,"context_line":"                        self._validate_image_traits_for_rebuild(context,"},{"line_number":947,"context_line":"                                                                instance,"},{"line_number":948,"context_line":"                                                                image_ref)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_1f92e19f","line":945,"range":{"start_line":945,"start_character":20,"end_line":945,"end_character":53},"in_reply_to":"5f7c97a3_0ae8eb79","updated":"2018-06-27 00:10:53.000000000","message":"Done","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":953,"context_line":"                    host_list \u003d host_lists[0]"},{"line_number":954,"context_line":"                    selection \u003d host_list[0]"},{"line_number":955,"context_line":"                    host, node, limits \u003d (selection.service_host,"},{"line_number":956,"context_line":"                                          selection.nodename, selection.limits)"},{"line_number":957,"context_line":"                except (exception.NoValidHost,"},{"line_number":958,"context_line":"                        exception.UnsupportedPolicyException) as ex:"},{"line_number":959,"context_line":"                    if migration:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_aa48d7b2","line":956,"updated":"2018-06-19 21:43:52.000000000","message":"unrelated","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"a86973f0e4089cdb9741737fd2e34da971902981","unresolved":false,"context_lines":[{"line_number":953,"context_line":"                    host_list \u003d host_lists[0]"},{"line_number":954,"context_line":"                    selection \u003d host_list[0]"},{"line_number":955,"context_line":"                    host, node, limits \u003d (selection.service_host,"},{"line_number":956,"context_line":"                                          selection.nodename, selection.limits)"},{"line_number":957,"context_line":"                except (exception.NoValidHost,"},{"line_number":958,"context_line":"                        exception.UnsupportedPolicyException) as ex:"},{"line_number":959,"context_line":"                    if migration:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_bf8c0d80","line":956,"in_reply_to":"5f7c97a3_aa48d7b2","updated":"2018-06-27 00:10:53.000000000","message":"Done","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":966,"context_line":"                        instance.save()"},{"line_number":967,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":968,"context_line":"                        self._set_vm_state_and_notify(context, instance.uuid,"},{"line_number":969,"context_line":"                                                      \u0027rebuild_server\u0027,"},{"line_number":970,"context_line":"                                                      {"},{"line_number":971,"context_line":"                                                          \u0027vm_state\u0027:"},{"line_number":972,"context_line":"                                                              vm_states.ERROR,"},{"line_number":973,"context_line":"                                                          \u0027task_state\u0027: None},"},{"line_number":974,"context_line":"                                                      ex,"},{"line_number":975,"context_line":"                                                      request_spec)"},{"line_number":976,"context_line":"                        LOG.warning(\u0027Rebuild failed: %s\u0027,"},{"line_number":977,"context_line":"                                    six.text_type(ex), instance\u003dinstance)"},{"line_number":978,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_6ac87f20","line":975,"range":{"start_line":969,"start_character":0,"end_line":975,"end_character":67},"updated":"2018-06-19 21:43:52.000000000","message":"unrelated (and kind of icky)","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"a86973f0e4089cdb9741737fd2e34da971902981","unresolved":false,"context_lines":[{"line_number":966,"context_line":"                        instance.save()"},{"line_number":967,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":968,"context_line":"                        self._set_vm_state_and_notify(context, instance.uuid,"},{"line_number":969,"context_line":"                                                      \u0027rebuild_server\u0027,"},{"line_number":970,"context_line":"                                                      {"},{"line_number":971,"context_line":"                                                          \u0027vm_state\u0027:"},{"line_number":972,"context_line":"                                                              vm_states.ERROR,"},{"line_number":973,"context_line":"                                                          \u0027task_state\u0027: None},"},{"line_number":974,"context_line":"                                                      ex,"},{"line_number":975,"context_line":"                                                      request_spec)"},{"line_number":976,"context_line":"                        LOG.warning(\u0027Rebuild failed: %s\u0027,"},{"line_number":977,"context_line":"                                    six.text_type(ex), instance\u003dinstance)"},{"line_number":978,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_7fe8b514","line":975,"range":{"start_line":969,"start_character":0,"end_line":975,"end_character":67},"in_reply_to":"5f7c97a3_6ac87f20","updated":"2018-06-27 00:10:53.000000000","message":"Done","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":1000,"context_line":""},{"line_number":1001,"context_line":"    def _validate_image_traits_for_rebuild(self, context, instance, image_ref):"},{"line_number":1002,"context_line":"        \"\"\"Validates that the traits specified in the image can be satisfied"},{"line_number":1003,"context_line":"        by the current allocations for the instance during rebuild/evacuation"},{"line_number":1004,"context_line":"        of the instance. If the traits cannot be satisfied, fails the action"},{"line_number":1005,"context_line":"        by raising a NoValidHost exception."},{"line_number":1006,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_2aeb6778","line":1003,"range":{"start_line":1003,"start_character":11,"end_line":1003,"end_character":34},"updated":"2018-06-19 21:43:52.000000000","message":"the providers of the current allocations","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"a86973f0e4089cdb9741737fd2e34da971902981","unresolved":false,"context_lines":[{"line_number":1000,"context_line":""},{"line_number":1001,"context_line":"    def _validate_image_traits_for_rebuild(self, context, instance, image_ref):"},{"line_number":1002,"context_line":"        \"\"\"Validates that the traits specified in the image can be satisfied"},{"line_number":1003,"context_line":"        by the current allocations for the instance during rebuild/evacuation"},{"line_number":1004,"context_line":"        of the instance. If the traits cannot be satisfied, fails the action"},{"line_number":1005,"context_line":"        by raising a NoValidHost exception."},{"line_number":1006,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_9feb5110","line":1003,"range":{"start_line":1003,"start_character":11,"end_line":1003,"end_character":34},"in_reply_to":"5f7c97a3_2aeb6778","updated":"2018-06-27 00:10:53.000000000","message":"Done","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":1011,"context_line":"        image_meta \u003d objects.ImageMeta.from_image_ref("},{"line_number":1012,"context_line":"            context, self.image_api, image_ref)"},{"line_number":1013,"context_line":"        if (\u0027properties\u0027 not in image_meta or"},{"line_number":1014,"context_line":"                \u0027traits_required\u0027 not in image_meta.properties):"},{"line_number":1015,"context_line":"            return"},{"line_number":1016,"context_line":""},{"line_number":1017,"context_line":"        image_traits.update("}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_0a6b0bf1","line":1014,"updated":"2018-06-19 21:43:52.000000000","message":"add\n\n or not image_meta.properties.traits_required\n\ni.e. short out if traits_required is present but empty.","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"a86973f0e4089cdb9741737fd2e34da971902981","unresolved":false,"context_lines":[{"line_number":1011,"context_line":"        image_meta \u003d objects.ImageMeta.from_image_ref("},{"line_number":1012,"context_line":"            context, self.image_api, image_ref)"},{"line_number":1013,"context_line":"        if (\u0027properties\u0027 not in image_meta or"},{"line_number":1014,"context_line":"                \u0027traits_required\u0027 not in image_meta.properties):"},{"line_number":1015,"context_line":"            return"},{"line_number":1016,"context_line":""},{"line_number":1017,"context_line":"        image_traits.update("}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_3feebd20","line":1014,"in_reply_to":"5f7c97a3_0a6b0bf1","updated":"2018-06-27 00:10:53.000000000","message":"Done","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":1014,"context_line":"                \u0027traits_required\u0027 not in image_meta.properties):"},{"line_number":1015,"context_line":"            return"},{"line_number":1016,"context_line":""},{"line_number":1017,"context_line":"        image_traits.update("},{"line_number":1018,"context_line":"            image_meta.properties.traits_required)"},{"line_number":1019,"context_line":""},{"line_number":1020,"context_line":"        # If image traits are present, then validate against allocations."},{"line_number":1021,"context_line":"        allocations \u003d self.report_client.get_allocations_for_consumer("}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_0ab6ab8b","line":1018,"range":{"start_line":1017,"start_character":8,"end_line":1018,"end_character":50},"updated":"2018-06-19 21:43:52.000000000","message":"nit: nix L1010 and just set up image_traits here:\n\n image_traits \u003d set(image_meta.properties.traits_required)","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"a86973f0e4089cdb9741737fd2e34da971902981","unresolved":false,"context_lines":[{"line_number":1014,"context_line":"                \u0027traits_required\u0027 not in image_meta.properties):"},{"line_number":1015,"context_line":"            return"},{"line_number":1016,"context_line":""},{"line_number":1017,"context_line":"        image_traits.update("},{"line_number":1018,"context_line":"            image_meta.properties.traits_required)"},{"line_number":1019,"context_line":""},{"line_number":1020,"context_line":"        # If image traits are present, then validate against allocations."},{"line_number":1021,"context_line":"        allocations \u003d self.report_client.get_allocations_for_consumer("}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_5ff139ff","line":1018,"range":{"start_line":1017,"start_character":8,"end_line":1018,"end_character":50},"in_reply_to":"5f7c97a3_0ab6ab8b","updated":"2018-06-27 00:10:53.000000000","message":"Done","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":1022,"context_line":"            context, instance.uuid)"},{"line_number":1023,"context_line":"        instance_rp_uuids \u003d list(allocations)"},{"line_number":1024,"context_line":""},{"line_number":1025,"context_line":"        # Get provider tree for the instance. Any RP id of the instance"},{"line_number":1026,"context_line":"        # can be provided and the full tree is returned."},{"line_number":1027,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_6a32bf11","line":1026,"range":{"start_line":1025,"start_character":46,"end_line":1026,"end_character":56},"updated":"2018-06-19 21:43:52.000000000","message":"Not quite.  If instance_rp_uuids[0] happens to point to a sharing provider, this whole thing is busted.  See below.","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"753fc5f26c001ba8f5e0bce9a7fc691ef5b0d7c0","unresolved":false,"context_lines":[{"line_number":1022,"context_line":"            context, instance.uuid)"},{"line_number":1023,"context_line":"        instance_rp_uuids \u003d list(allocations)"},{"line_number":1024,"context_line":""},{"line_number":1025,"context_line":"        # Get provider tree for the instance. Any RP id of the instance"},{"line_number":1026,"context_line":"        # can be provided and the full tree is returned."},{"line_number":1027,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_0dfffc35","line":1026,"range":{"start_line":1025,"start_character":46,"end_line":1026,"end_character":56},"in_reply_to":"5f7c97a3_6a32bf11","updated":"2018-06-28 21:32:01.000000000","message":"\u003e Not quite.  If instance_rp_uuids[0] happens to point to a sharing\n \u003e provider, this whole thing is busted.  See below.\n\nremoving this part of the comment w.r.t L1029 modifications.","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"        # Get provider tree for the instance. Any RP id of the instance"},{"line_number":1026,"context_line":"        # can be provided and the full tree is returned."},{"line_number":1027,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        traits_in_instance_rp \u003d set()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_d53938d8","line":1028,"range":{"start_line":1028,"start_character":31,"end_line":1028,"end_character":64},"updated":"2018-06-19 21:43:52.000000000","message":"Please add a TODO to use a read-only version of this silly method when one is available.  \"_ensure_root\" is scary to read here, because of the implication that it\u0027s going to go off and create something.  It won\u0027t in this case - because that thing will already exist - but it would be nice not to have to question it every time we see it.","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d9f242943c2a1c4b657683e448a9c76cd24935a8","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"        # Get provider tree for the instance. Any RP id of the instance"},{"line_number":1026,"context_line":"        # can be provided and the full tree is returned."},{"line_number":1027,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        traits_in_instance_rp \u003d set()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_e52434c5","line":1028,"range":{"start_line":1028,"start_character":31,"end_line":1028,"end_character":64},"in_reply_to":"5f7c97a3_7fd19556","updated":"2018-06-27 03:21:05.000000000","message":"Yeah, close enough","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"a86973f0e4089cdb9741737fd2e34da971902981","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"        # Get provider tree for the instance. Any RP id of the instance"},{"line_number":1026,"context_line":"        # can be provided and the full tree is returned."},{"line_number":1027,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        traits_in_instance_rp \u003d set()"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_7fd19556","line":1028,"range":{"start_line":1028,"start_character":31,"end_line":1028,"end_character":64},"in_reply_to":"5f7c97a3_d53938d8","updated":"2018-06-27 00:10:53.000000000","message":"Did I get this right?. let me know.","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"        # can be provided and the full tree is returned."},{"line_number":1027,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        traits_in_instance_rp \u003d set()"},{"line_number":1032,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_75294487","line":1029,"range":{"start_line":1029,"start_character":25,"end_line":1029,"end_character":45},"updated":"2018-06-19 21:43:52.000000000","message":"This needs to be invoked with a provider that\u0027s guaranteed to be part of the compute node\u0027s tree.  Can you rely on instance.node being set (and set correctly) here?  If so, that\u0027s what you should use.  (Because we\u0027re already assured we\u0027re on the same host when we get here, yes?)","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"753fc5f26c001ba8f5e0bce9a7fc691ef5b0d7c0","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"        # can be provided and the full tree is returned."},{"line_number":1027,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        traits_in_instance_rp \u003d set()"},{"line_number":1032,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_4dcc1434","line":1029,"range":{"start_line":1029,"start_character":25,"end_line":1029,"end_character":45},"in_reply_to":"5f7c97a3_251f8c70","updated":"2018-06-28 21:32:01.000000000","message":"\u003e not done\n\nMissed it, added instance.node as suggested","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"a86973f0e4089cdb9741737fd2e34da971902981","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"        # can be provided and the full tree is returned."},{"line_number":1027,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        traits_in_instance_rp \u003d set()"},{"line_number":1032,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_9fd4b148","line":1029,"range":{"start_line":1029,"start_character":25,"end_line":1029,"end_character":45},"in_reply_to":"5f7c97a3_75294487","updated":"2018-06-27 00:10:53.000000000","message":"Done","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d9f242943c2a1c4b657683e448a9c76cd24935a8","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"        # can be provided and the full tree is returned."},{"line_number":1027,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        traits_in_instance_rp \u003d set()"},{"line_number":1032,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_251f8c70","line":1029,"range":{"start_line":1029,"start_character":25,"end_line":1029,"end_character":45},"in_reply_to":"5f7c97a3_9fd4b148","updated":"2018-06-27 03:21:05.000000000","message":"not done","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        traits_in_instance_rp \u003d set()"},{"line_number":1032,"context_line":""},{"line_number":1033,"context_line":"        for rp_uuid in instance_rp_uuids:"},{"line_number":1034,"context_line":"            traits_in_instance_rp.update("}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_b5435c3f","line":1031,"range":{"start_line":1031,"start_character":27,"end_line":1031,"end_character":29},"updated":"2018-06-19 21:43:52.000000000","message":"technically rps","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"a86973f0e4089cdb9741737fd2e34da971902981","unresolved":false,"context_lines":[{"line_number":1028,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1029,"context_line":"                context, instance_rp_uuids[0])"},{"line_number":1030,"context_line":""},{"line_number":1031,"context_line":"        traits_in_instance_rp \u003d set()"},{"line_number":1032,"context_line":""},{"line_number":1033,"context_line":"        for rp_uuid in instance_rp_uuids:"},{"line_number":1034,"context_line":"            traits_in_instance_rp.update("}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_3fc79d9a","line":1031,"range":{"start_line":1031,"start_character":27,"end_line":1031,"end_character":29},"in_reply_to":"5f7c97a3_b5435c3f","updated":"2018-06-27 00:10:53.000000000","message":"Done","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d9f242943c2a1c4b657683e448a9c76cd24935a8","unresolved":false,"context_lines":[{"line_number":1006,"context_line":"        :raises: NoValidHost exception in case the allocated resources for the"},{"line_number":1007,"context_line":"                 instance do not match the required traits on the image."},{"line_number":1008,"context_line":"        \"\"\""},{"line_number":1009,"context_line":"        image_traits \u003d set()"},{"line_number":1010,"context_line":"        image_meta \u003d objects.ImageMeta.from_image_ref("},{"line_number":1011,"context_line":"            context, self.image_api, image_ref)"},{"line_number":1012,"context_line":"        if (\u0027properties\u0027 not in image_meta or"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_e57674d5","line":1009,"range":{"start_line":1009,"start_character":8,"end_line":1009,"end_character":28},"updated":"2018-06-27 03:21:05.000000000","message":"This is no longer needed","commit_id":"389a67f1071dd4d34aa5767d4817587f68395621"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"bf104e16e823f13c75b71dc75fca2d03db3b42bc","unresolved":false,"context_lines":[{"line_number":1021,"context_line":"        instance_rp_uuids \u003d list(allocations)"},{"line_number":1022,"context_line":""},{"line_number":1023,"context_line":"        # Get provider tree for the instance. We use the uuid of the host"},{"line_number":1024,"context_line":"        # that instance is rebuilding to get the provider tree."},{"line_number":1025,"context_line":"        compute_node \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":1026,"context_line":"            context, instance.host, instance.node)"},{"line_number":1027,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_f806e485","line":1024,"range":{"start_line":1024,"start_character":10,"end_line":1024,"end_character":14},"updated":"2018-06-28 21:37:50.000000000","message":"on which the","commit_id":"b9b356a796c29251bc98c73e25d6f3ec8970c121"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"c68b92c6539550f3bf72e09ec0fc6c6275c7f84f","unresolved":false,"context_lines":[{"line_number":1021,"context_line":"        instance_rp_uuids \u003d list(allocations)"},{"line_number":1022,"context_line":""},{"line_number":1023,"context_line":"        # Get provider tree for the instance. We use the uuid of the host"},{"line_number":1024,"context_line":"        # that instance is rebuilding to get the provider tree."},{"line_number":1025,"context_line":"        compute_node \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":1026,"context_line":"            context, instance.host, instance.node)"},{"line_number":1027,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_493dacba","line":1024,"range":{"start_line":1024,"start_character":10,"end_line":1024,"end_character":14},"in_reply_to":"5f7c97a3_f806e485","updated":"2018-06-30 02:11:51.000000000","message":"Done","commit_id":"b9b356a796c29251bc98c73e25d6f3ec8970c121"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"bf104e16e823f13c75b71dc75fca2d03db3b42bc","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"            context, instance.host, instance.node)"},{"line_number":1027,"context_line":""},{"line_number":1028,"context_line":"        # TODO(karimull): Call with a read-only version , when available."},{"line_number":1029,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1030,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1031,"context_line":"                context, compute_node.uuid)"},{"line_number":1032,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_b8006c68","line":1029,"range":{"start_line":1029,"start_character":27,"end_line":1029,"end_character":28},"updated":"2018-06-28 21:37:50.000000000","message":"nit: prefer parens to backslash","commit_id":"b9b356a796c29251bc98c73e25d6f3ec8970c121"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"c68b92c6539550f3bf72e09ec0fc6c6275c7f84f","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"            context, instance.host, instance.node)"},{"line_number":1027,"context_line":""},{"line_number":1028,"context_line":"        # TODO(karimull): Call with a read-only version , when available."},{"line_number":1029,"context_line":"        instance_rp_tree \u003d \\"},{"line_number":1030,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1031,"context_line":"                context, compute_node.uuid)"},{"line_number":1032,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_6938a8ca","line":1029,"range":{"start_line":1029,"start_character":27,"end_line":1029,"end_character":28},"in_reply_to":"5f7c97a3_b8006c68","updated":"2018-06-30 02:11:51.000000000","message":"Done","commit_id":"b9b356a796c29251bc98c73e25d6f3ec8970c121"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f7b20a6c2f41a794bbd370562743ab128770ebbb","unresolved":false,"context_lines":[{"line_number":943,"context_line":"                    # is not forced to be the original host"},{"line_number":944,"context_line":"                    request_spec.reset_forced_destinations()"},{"line_number":945,"context_line":"                try:"},{"line_number":946,"context_line":"                    # if this ia rebuild of instance on the same host with"},{"line_number":947,"context_line":"                    # new image."},{"line_number":948,"context_line":"                    if not recreate and orig_image_ref !\u003d image_ref:"},{"line_number":949,"context_line":"                        self._validate_image_traits_for_rebuild(context,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_0f81cf4d","line":946,"range":{"start_line":946,"start_character":30,"end_line":946,"end_character":32},"updated":"2018-07-04 13:39:26.000000000","message":"support nit s/ia/is/","commit_id":"15ed758c25c97b564e39dadb4897e6a0af8b9fa0"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"e08bc2a91054c8be84abf10b3463cbe526e3b5eb","unresolved":false,"context_lines":[{"line_number":943,"context_line":"                    # is not forced to be the original host"},{"line_number":944,"context_line":"                    request_spec.reset_forced_destinations()"},{"line_number":945,"context_line":"                try:"},{"line_number":946,"context_line":"                    # if this ia rebuild of instance on the same host with"},{"line_number":947,"context_line":"                    # new image."},{"line_number":948,"context_line":"                    if not recreate and orig_image_ref !\u003d image_ref:"},{"line_number":949,"context_line":"                        self._validate_image_traits_for_rebuild(context,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_50206449","line":946,"range":{"start_line":946,"start_character":30,"end_line":946,"end_character":32},"in_reply_to":"5f7c97a3_0f81cf4d","updated":"2018-07-09 12:11:24.000000000","message":"Done","commit_id":"15ed758c25c97b564e39dadb4897e6a0af8b9fa0"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f7b20a6c2f41a794bbd370562743ab128770ebbb","unresolved":false,"context_lines":[{"line_number":1009,"context_line":"        image_meta \u003d objects.ImageMeta.from_image_ref("},{"line_number":1010,"context_line":"            context, self.image_api, image_ref)"},{"line_number":1011,"context_line":"        if (\u0027properties\u0027 not in image_meta or"},{"line_number":1012,"context_line":"                \u0027traits_required\u0027 not in image_meta.properties or not"},{"line_number":1013,"context_line":"                image_meta.properties.traits_required):"},{"line_number":1014,"context_line":"            return"},{"line_number":1015,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_93864eba","line":1012,"range":{"start_line":1012,"start_character":17,"end_line":1012,"end_character":32},"updated":"2018-07-04 13:39:26.000000000","message":"We should check the case the image required trait is the flavor forbidden trait.","commit_id":"15ed758c25c97b564e39dadb4897e6a0af8b9fa0"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"e08bc2a91054c8be84abf10b3463cbe526e3b5eb","unresolved":false,"context_lines":[{"line_number":1009,"context_line":"        image_meta \u003d objects.ImageMeta.from_image_ref("},{"line_number":1010,"context_line":"            context, self.image_api, image_ref)"},{"line_number":1011,"context_line":"        if (\u0027properties\u0027 not in image_meta or"},{"line_number":1012,"context_line":"                \u0027traits_required\u0027 not in image_meta.properties or not"},{"line_number":1013,"context_line":"                image_meta.properties.traits_required):"},{"line_number":1014,"context_line":"            return"},{"line_number":1015,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_f0d41021","line":1012,"range":{"start_line":1012,"start_character":17,"end_line":1012,"end_character":32},"in_reply_to":"5f7c97a3_93864eba","updated":"2018-07-09 12:11:24.000000000","message":"Done\n\nI did check the case and raised an exception in the provided scenario, please suggest otherwise.","commit_id":"15ed758c25c97b564e39dadb4897e6a0af8b9fa0"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b32e40a7bdae474d38f91cbd1db9b12fab5f10b5","unresolved":false,"context_lines":[{"line_number":1020,"context_line":"            context, instance.uuid)"},{"line_number":1021,"context_line":"        instance_rp_uuids \u003d list(allocations)"},{"line_number":1022,"context_line":""},{"line_number":1023,"context_line":"        # Get provider tree for the instance. We use the uuid of the host"},{"line_number":1024,"context_line":"        # on which the instance is rebuilding to get the provider tree."},{"line_number":1025,"context_line":"        compute_node \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":1026,"context_line":"            context, instance.host, instance.node)"},{"line_number":1027,"context_line":""},{"line_number":1028,"context_line":"        # TODO(karimull): Call with a read-only version , when available."},{"line_number":1029,"context_line":"        instance_rp_tree \u003d ("},{"line_number":1030,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1031,"context_line":"                context, compute_node.uuid))"},{"line_number":1032,"context_line":""},{"line_number":1033,"context_line":"        traits_in_instance_rps \u003d set()"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"        for rp_uuid in instance_rp_uuids:"},{"line_number":1036,"context_line":"            traits_in_instance_rps.update("},{"line_number":1037,"context_line":"                instance_rp_tree.data(rp_uuid).traits)"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        missing_traits \u003d image_traits - traits_in_instance_rps"},{"line_number":1040,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_96ff46aa","line":1037,"range":{"start_line":1023,"start_character":0,"end_line":1037,"end_character":54},"updated":"2018-07-02 21:43:29.000000000","message":"I\u0027m still concerned that we have no test coverage that involves actual trees.  This chunk went through a few iterations because potential bugs were identified by inspection.  What I\u0027m looking for is something like:\n\n       CN_RP: T1 ------ SSP_RP: T5\n      /     \\\n  GPU_RP1  GPU_RP2\n  T2, T3   T2, T4\n\nFunctionally:\n- If your original allocations are against CN_RP+GPU_RP1+SSP_RP, you\u0027d better have traits T1, T2, T3, T5 when you land.\n- Toggling off any of T1, T2, or T5 should make it impossible to rebuild.\n- Making the destination have T1, T2, T4, T5 should make you land on CN_RP+GPU_RP*2*+SSP_RP.  That kind of thing.\n- If you \"forbid\" T4 in your flavor, you should land on GPU_RP1 not GPU_RP2.\n\nA couple of the things we\u0027d be looking for, including things we iterated on in this chunk of code:\n\n- If the first allocation you got back happened to be SSP_RP, you would have gone and gathered all the traits on *his* tree, which would just be T5, and you would have failed to land, even if you otherwise should have.\n- Your traits are coming from different providers in the tree, and you have to make sure you\u0027re collecting them from all and *only* the ones involved in the allocation.","commit_id":"15ed758c25c97b564e39dadb4897e6a0af8b9fa0"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"e08bc2a91054c8be84abf10b3463cbe526e3b5eb","unresolved":false,"context_lines":[{"line_number":1020,"context_line":"            context, instance.uuid)"},{"line_number":1021,"context_line":"        instance_rp_uuids \u003d list(allocations)"},{"line_number":1022,"context_line":""},{"line_number":1023,"context_line":"        # Get provider tree for the instance. We use the uuid of the host"},{"line_number":1024,"context_line":"        # on which the instance is rebuilding to get the provider tree."},{"line_number":1025,"context_line":"        compute_node \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":1026,"context_line":"            context, instance.host, instance.node)"},{"line_number":1027,"context_line":""},{"line_number":1028,"context_line":"        # TODO(karimull): Call with a read-only version , when available."},{"line_number":1029,"context_line":"        instance_rp_tree \u003d ("},{"line_number":1030,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1031,"context_line":"                context, compute_node.uuid))"},{"line_number":1032,"context_line":""},{"line_number":1033,"context_line":"        traits_in_instance_rps \u003d set()"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"        for rp_uuid in instance_rp_uuids:"},{"line_number":1036,"context_line":"            traits_in_instance_rps.update("},{"line_number":1037,"context_line":"                instance_rp_tree.data(rp_uuid).traits)"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        missing_traits \u003d image_traits - traits_in_instance_rps"},{"line_number":1040,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_b025385d","line":1037,"range":{"start_line":1023,"start_character":0,"end_line":1037,"end_character":54},"in_reply_to":"5f7c97a3_96ff46aa","updated":"2018-07-09 12:11:24.000000000","message":"I did add couple of functional test with shared resource provider setup. Will work on the nested resource provider scenario test cases and if I could you fake libvirt mocking should be able to achieve the able sort of scenario. Thanks for the detail explanation.","commit_id":"15ed758c25c97b564e39dadb4897e6a0af8b9fa0"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"e164001e636067f9294b8d570cb469180e943858","unresolved":false,"context_lines":[{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"        image_traits \u003d set(image_meta.properties.traits_required)"},{"line_number":1015,"context_line":""},{"line_number":1016,"context_line":"        # check any of the image traits are forbidden in flavor traits."},{"line_number":1017,"context_line":"        # if so raise an exception"},{"line_number":1018,"context_line":"        extra_specs \u003d instance.get_flavor().get(\u0027extra_specs\u0027)"},{"line_number":1019,"context_line":"        forbidden_flavor_traits \u003d set()"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_37fd796c","line":1016,"updated":"2018-07-10 18:56:01.000000000","message":"not really sure if this should matter. Assuming the flavor had forbidden traits as part of the original request, the resource providers will be chosen appropriately.(No RP will have the forbidden traits)\n\nIf rebuild is requested and the image has any of the flavor forbidden traits as required, the request would fail anyway with \"Image traits cannot be satisfied by the current resource providers\" anyway.\n\nIs there a specific reason for this special case? Is is just to provide a more context around why the request failed?","commit_id":"d578ba39266c5d5187768a61e1732f237f84505d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"27eb7249c39a03a5e73320b5855db35d4bf53610","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\")"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        # If image traits are present, then validate against allocations."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_65a832d8","line":1036,"range":{"start_line":1034,"start_character":16,"end_line":1036,"end_character":54},"updated":"2018-07-09 21:33:32.000000000","message":"Need to translate this.","commit_id":"d578ba39266c5d5187768a61e1732f237f84505d"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"be644ba0415219780edfa741625d0f129eb6b3c2","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\")"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        # If image traits are present, then validate against allocations."}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_e9e09429","line":1036,"range":{"start_line":1034,"start_character":16,"end_line":1036,"end_character":54},"in_reply_to":"5f7c97a3_65a832d8","updated":"2018-07-10 07:36:06.000000000","message":"Done","commit_id":"d578ba39266c5d5187768a61e1732f237f84505d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"27eb7249c39a03a5e73320b5855db35d4bf53610","unresolved":false,"context_lines":[{"line_number":1065,"context_line":"                \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1066,"context_line":"                \u0027, \u0027.join(missing_traits))"},{"line_number":1067,"context_line":"            raise exception.NoValidHost("},{"line_number":1068,"context_line":"                reason\u003d\"Image traits cannot be \""},{"line_number":1069,"context_line":"                       \"satisfied by the current resource providers.\""},{"line_number":1070,"context_line":"                       \"Please relaunch the instance.\")"},{"line_number":1071,"context_line":""},{"line_number":1072,"context_line":"    # TODO(avolkov): move method to bdm"},{"line_number":1073,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_05b37e4f","line":1070,"range":{"start_line":1068,"start_character":23,"end_line":1070,"end_character":54},"updated":"2018-07-09 21:33:32.000000000","message":"ditto","commit_id":"d578ba39266c5d5187768a61e1732f237f84505d"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"be644ba0415219780edfa741625d0f129eb6b3c2","unresolved":false,"context_lines":[{"line_number":1065,"context_line":"                \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1066,"context_line":"                \u0027, \u0027.join(missing_traits))"},{"line_number":1067,"context_line":"            raise exception.NoValidHost("},{"line_number":1068,"context_line":"                reason\u003d\"Image traits cannot be \""},{"line_number":1069,"context_line":"                       \"satisfied by the current resource providers.\""},{"line_number":1070,"context_line":"                       \"Please relaunch the instance.\")"},{"line_number":1071,"context_line":""},{"line_number":1072,"context_line":"    # TODO(avolkov): move method to bdm"},{"line_number":1073,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f7c97a3_a9d05c54","line":1070,"range":{"start_line":1068,"start_character":23,"end_line":1070,"end_character":54},"in_reply_to":"5f7c97a3_05b37e4f","updated":"2018-07-10 07:36:06.000000000","message":"Done","commit_id":"d578ba39266c5d5187768a61e1732f237f84505d"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"23738c96a21c524f1fd6715abc3e94b2c55dc13c","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            if flavor.id \u003d\u003d instance.instance_type_id:"},{"line_number":328,"context_line":"                msg \u003d _(\"No valid host found for cold migrate\")"},{"line_number":329,"context_line":"            else:"},{"line_number":330,"context_line":"                msg \u003d _(\"No valid host found for resize\")"},{"line_number":331,"context_line":"            raise exception.NoValidHost(reason\u003dmsg)"},{"line_number":332,"context_line":"        except exception.UnsupportedPolicyException as ex:"},{"line_number":333,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_88b6b5db","line":330,"range":{"start_line":330,"start_character":0,"end_line":330,"end_character":57},"updated":"2018-07-10 11:56:01.000000000","message":"Like this.  See below.","commit_id":"45ba3de38d2872d6e4a1ba8df3e7230ee4c83d99"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"4e74a774a32c77274439dc3c5587b548bbfdb143","unresolved":false,"context_lines":[{"line_number":327,"context_line":"            if flavor.id \u003d\u003d instance.instance_type_id:"},{"line_number":328,"context_line":"                msg \u003d _(\"No valid host found for cold migrate\")"},{"line_number":329,"context_line":"            else:"},{"line_number":330,"context_line":"                msg \u003d _(\"No valid host found for resize\")"},{"line_number":331,"context_line":"            raise exception.NoValidHost(reason\u003dmsg)"},{"line_number":332,"context_line":"        except exception.UnsupportedPolicyException as ex:"},{"line_number":333,"context_line":"            with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_dec30289","line":330,"range":{"start_line":330,"start_character":0,"end_line":330,"end_character":57},"in_reply_to":"5f7c97a3_88b6b5db","updated":"2018-07-10 16:08:09.000000000","message":"Done","commit_id":"45ba3de38d2872d6e4a1ba8df3e7230ee4c83d99"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"23738c96a21c524f1fd6715abc3e94b2c55dc13c","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d\"Image traits cannot match flavor traits that are \""},{"line_number":1035,"context_line":"                       \"forbidden\")"},{"line_number":1036,"context_line":"            return"},{"line_number":1037,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_4893bd4e","line":1034,"updated":"2018-07-10 11:56:01.000000000","message":"Sorry, the message was fine as it was before; what I meant was that you need to surround the string with the translation macro, _(), like we do for other exceptions.  See above.","commit_id":"45ba3de38d2872d6e4a1ba8df3e7230ee4c83d99"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"4e74a774a32c77274439dc3c5587b548bbfdb143","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d\"Image traits cannot match flavor traits that are \""},{"line_number":1035,"context_line":"                       \"forbidden\")"},{"line_number":1036,"context_line":"            return"},{"line_number":1037,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_1eedfa22","line":1034,"in_reply_to":"5f7c97a3_4893bd4e","updated":"2018-07-10 16:08:09.000000000","message":"Done\nThanks for the clarification","commit_id":"45ba3de38d2872d6e4a1ba8df3e7230ee4c83d99"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"23738c96a21c524f1fd6715abc3e94b2c55dc13c","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"                \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1065,"context_line":"                \u0027, \u0027.join(missing_traits))"},{"line_number":1066,"context_line":"            raise exception.NoValidHost("},{"line_number":1067,"context_line":"                reason\u003d\"No valid host found for requested image traits\")"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"    # TODO(avolkov): move method to bdm"},{"line_number":1070,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_08caa54d","line":1067,"updated":"2018-07-10 11:56:01.000000000","message":"ditto","commit_id":"45ba3de38d2872d6e4a1ba8df3e7230ee4c83d99"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"4e74a774a32c77274439dc3c5587b548bbfdb143","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"                \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1065,"context_line":"                \u0027, \u0027.join(missing_traits))"},{"line_number":1066,"context_line":"            raise exception.NoValidHost("},{"line_number":1067,"context_line":"                reason\u003d\"No valid host found for requested image traits\")"},{"line_number":1068,"context_line":""},{"line_number":1069,"context_line":"    # TODO(avolkov): move method to bdm"},{"line_number":1070,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_1ec65a9d","line":1067,"in_reply_to":"5f7c97a3_08caa54d","updated":"2018-07-10 16:08:09.000000000","message":"Done","commit_id":"45ba3de38d2872d6e4a1ba8df3e7230ee4c83d99"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53aa68d7d3507db1382fbea6b5aa570ccde4d3ba","unresolved":false,"context_lines":[{"line_number":943,"context_line":"                try:"},{"line_number":944,"context_line":"                    # if this is a rebuild of instance on the same host with"},{"line_number":945,"context_line":"                    # new image."},{"line_number":946,"context_line":"                    if not recreate and orig_image_ref !\u003d image_ref:"},{"line_number":947,"context_line":"                        self._validate_image_traits_for_rebuild(context,"},{"line_number":948,"context_line":"                                                                instance,"},{"line_number":949,"context_line":"                                                                image_ref)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_92b244e8","line":946,"updated":"2018-07-11 15:19:26.000000000","message":"I kind of wish this was just a else above but I realize it\u0027s in the try/except to get the NoValidHost handling for free.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":943,"context_line":"                try:"},{"line_number":944,"context_line":"                    # if this is a rebuild of instance on the same host with"},{"line_number":945,"context_line":"                    # new image."},{"line_number":946,"context_line":"                    if not recreate and orig_image_ref !\u003d image_ref:"},{"line_number":947,"context_line":"                        self._validate_image_traits_for_rebuild(context,"},{"line_number":948,"context_line":"                                                                instance,"},{"line_number":949,"context_line":"                                                                image_ref)"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_b63b9d99","line":946,"in_reply_to":"5f7c97a3_92b244e8","updated":"2018-07-12 11:20:42.000000000","message":"Initially It was like that but from one of the comments efried: made I have to move it from else condition to try.\nplease see the comment below\n\nso what I\u0027m saying is, IMO this `else` is hard to reason about.  It\u0027s especially difficult to see how `else` translates to \"same host, new image\".  It would be easier to understand (and the code flow would be prettier, exception-wise) if the `try` on L957 below contained:\n\n try:\n     if \u003csame host\u003e and \u003cnew image\u003e:\n         self._validate_image_traits_for_rebuild(...)\n     # below is unchanged...\n     request_spec.ensure_project_and_user_id(instance)\n     host_lists \u003d self._schedule_instances...","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b31ac874491b4665c45e78778c95c2bb7f695dda","unresolved":false,"context_lines":[{"line_number":998,"context_line":"    def _validate_image_traits_for_rebuild(self, context, instance, image_ref):"},{"line_number":999,"context_line":"        \"\"\"Validates that the traits specified in the image can be satisfied"},{"line_number":1000,"context_line":"        by the providers of the current allocations for the instance during"},{"line_number":1001,"context_line":"        rebuild/evacuation of the instance. If the traits cannot be"},{"line_number":1002,"context_line":"        satisfied, fails the action by raising a NoValidHost exception."},{"line_number":1003,"context_line":""},{"line_number":1004,"context_line":"        :raises: NoValidHost exception in case the allocated resources for the"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_12a95ddd","line":1001,"range":{"start_line":1001,"start_character":16,"end_line":1001,"end_character":26},"updated":"2018-07-11 08:57:05.000000000","message":"nit, we only validate for the rebuild","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":998,"context_line":"    def _validate_image_traits_for_rebuild(self, context, instance, image_ref):"},{"line_number":999,"context_line":"        \"\"\"Validates that the traits specified in the image can be satisfied"},{"line_number":1000,"context_line":"        by the providers of the current allocations for the instance during"},{"line_number":1001,"context_line":"        rebuild/evacuation of the instance. If the traits cannot be"},{"line_number":1002,"context_line":"        satisfied, fails the action by raising a NoValidHost exception."},{"line_number":1003,"context_line":""},{"line_number":1004,"context_line":"        :raises: NoValidHost exception in case the allocated resources for the"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_dbe3e239","line":1001,"range":{"start_line":1001,"start_character":16,"end_line":1001,"end_character":26},"in_reply_to":"5f7c97a3_12a95ddd","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53aa68d7d3507db1382fbea6b5aa570ccde4d3ba","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"        rebuild/evacuation of the instance. If the traits cannot be"},{"line_number":1002,"context_line":"        satisfied, fails the action by raising a NoValidHost exception."},{"line_number":1003,"context_line":""},{"line_number":1004,"context_line":"        :raises: NoValidHost exception in case the allocated resources for the"},{"line_number":1005,"context_line":"                 instance do not match the required traits on the image."},{"line_number":1006,"context_line":"        \"\"\""},{"line_number":1007,"context_line":"        image_meta \u003d objects.ImageMeta.from_image_ref("}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_72e688ea","line":1004,"range":{"start_line":1004,"start_character":39,"end_line":1004,"end_character":70},"updated":"2018-07-11 15:19:26.000000000","message":"in case the traits on the providers of the allocated resources?","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"        rebuild/evacuation of the instance. If the traits cannot be"},{"line_number":1002,"context_line":"        satisfied, fails the action by raising a NoValidHost exception."},{"line_number":1003,"context_line":""},{"line_number":1004,"context_line":"        :raises: NoValidHost exception in case the allocated resources for the"},{"line_number":1005,"context_line":"                 instance do not match the required traits on the image."},{"line_number":1006,"context_line":"        \"\"\""},{"line_number":1007,"context_line":"        image_meta \u003d objects.ImageMeta.from_image_ref("}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_db31a2bd","line":1004,"range":{"start_line":1004,"start_character":39,"end_line":1004,"end_character":70},"in_reply_to":"5f7c97a3_72e688ea","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53aa68d7d3507db1382fbea6b5aa570ccde4d3ba","unresolved":false,"context_lines":[{"line_number":1015,"context_line":""},{"line_number":1016,"context_line":"        # check any of the image traits are forbidden in flavor traits."},{"line_number":1017,"context_line":"        # if so raise an exception"},{"line_number":1018,"context_line":"        extra_specs \u003d instance.get_flavor().get(\u0027extra_specs\u0027)"},{"line_number":1019,"context_line":"        forbidden_flavor_traits \u003d set()"},{"line_number":1020,"context_line":"        for key, val in extra_specs.items():"},{"line_number":1021,"context_line":"            if key.startswith(\u0027trait\u0027):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_7d21799e","line":1018,"range":{"start_line":1018,"start_character":22,"end_line":1018,"end_character":43},"updated":"2018-07-11 15:19:26.000000000","message":"This can just be instance.flavor.extra_specs.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":1015,"context_line":""},{"line_number":1016,"context_line":"        # check any of the image traits are forbidden in flavor traits."},{"line_number":1017,"context_line":"        # if so raise an exception"},{"line_number":1018,"context_line":"        extra_specs \u003d instance.get_flavor().get(\u0027extra_specs\u0027)"},{"line_number":1019,"context_line":"        forbidden_flavor_traits \u003d set()"},{"line_number":1020,"context_line":"        for key, val in extra_specs.items():"},{"line_number":1021,"context_line":"            if key.startswith(\u0027trait\u0027):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_fb5fbee1","line":1018,"range":{"start_line":1018,"start_character":22,"end_line":1018,"end_character":43},"in_reply_to":"5f7c97a3_7d21799e","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b31ac874491b4665c45e78778c95c2bb7f695dda","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"        forbidden_traits \u003d image_traits \u0026 forbidden_flavor_traits"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"        if forbidden_traits:"},{"line_number":1030,"context_line":"            LOG.error("},{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_d2d445ed","line":1030,"range":{"start_line":1030,"start_character":12,"end_line":1030,"end_character":22},"updated":"2018-07-11 08:57:05.000000000","message":"We needn\u0027t this log, or we just need a debug log. Since this isn\u0027t system error case, it is just a wrong user input.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"        forbidden_traits \u003d image_traits \u0026 forbidden_flavor_traits"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"        if forbidden_traits:"},{"line_number":1030,"context_line":"            LOG.error("},{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_25baf50a","line":1030,"range":{"start_line":1030,"start_character":12,"end_line":1030,"end_character":22},"in_reply_to":"5f7c97a3_1d6405e6","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53aa68d7d3507db1382fbea6b5aa570ccde4d3ba","unresolved":false,"context_lines":[{"line_number":1027,"context_line":"        forbidden_traits \u003d image_traits \u0026 forbidden_flavor_traits"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"        if forbidden_traits:"},{"line_number":1030,"context_line":"            LOG.error("},{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_1d6405e6","line":1030,"range":{"start_line":1030,"start_character":12,"end_line":1030,"end_character":22},"in_reply_to":"5f7c97a3_d2d445ed","updated":"2018-07-11 15:19:26.000000000","message":"Agree, remove or at most DEBUG, plus you\u0027d want to put the instance\u003dinstance kwarg in the LOG.debug call for context.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba5e31eac601d6cdc0aae582237bed746aab7947","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image.\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1037,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_72568808","line":1034,"updated":"2018-07-11 14:46:03.000000000","message":"You should assert that a non-admin user can retrieve this fault message from the server in ERROR state in a functional test that hits this.\n\nhttps://developer.openstack.org/api-guide/compute/faults.html#instance-faults","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba5e31eac601d6cdc0aae582237bed746aab7947","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image.\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_922244a6","line":1035,"range":{"start_line":1035,"start_character":66,"end_line":1035,"end_character":68},"updated":"2018-07-11 14:46:03.000000000","message":"Need a space between sentences. Also, please align the strings.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image.\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_e5cddd92","line":1035,"range":{"start_line":1035,"start_character":66,"end_line":1035,"end_character":68},"in_reply_to":"5f7c97a3_922244a6","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b31ac874491b4665c45e78778c95c2bb7f695dda","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"            LOG.error("},{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image.\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        # If image traits are present, then validate against allocations."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_b2a0a9a6","line":1036,"range":{"start_line":1033,"start_character":12,"end_line":1036,"end_character":56},"updated":"2018-07-11 08:57:05.000000000","message":"This will lead the instance to error status at line 969. This is too heavy punish for the user just chose a wrong image then the user got an un-recoverable error instance.\n\nI think we can raise another exception, and we set the migration obj to the error, and log the error, but we set the instance back to the active status.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3b12fe644aec2daab34ed12fc2d7d54f05ff1dac","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"            LOG.error("},{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image.\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        # If image traits are present, then validate against allocations."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_ac5a85f2","line":1036,"range":{"start_line":1033,"start_character":12,"end_line":1036,"end_character":56},"in_reply_to":"5f7c97a3_2c6435e6","updated":"2018-07-11 13:51:04.000000000","message":"Furthermore, setting the instance to ERROR during rebuild if scheduling failed is a relatively new change:\n\nhttps://review.openstack.org/#/c/536268/\n\nThe reason we set the instance to ERROR is that rebuild changes fields on the instance *in nova-api* before casting to conductor, so if we just reverted the instance to ACTIVE it\u0027s a lie - because we\u0027ve actually changed fields on the instance so it needs to be in some other state, and ERROR is most appropriate. You can rebuild from ERROR state so the user can get out of this state themselves by providing a proper image. It\u0027s admittedly not a great workflow, but unless we re-architect how rebuild interaction works between api and conductor, it\u0027s what we have for now (see the discussion in that change).","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53aa68d7d3507db1382fbea6b5aa570ccde4d3ba","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"            LOG.error("},{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image.\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        # If image traits are present, then validate against allocations."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_9d957597","line":1036,"range":{"start_line":1033,"start_character":12,"end_line":1036,"end_character":56},"in_reply_to":"5f7c97a3_4cf091db","updated":"2018-07-11 15:19:26.000000000","message":"Summary is it\u0027s OK to raise NoValidHost here and let the instance go to ERROR state and is consistent with scheduling failures during rebuild if the image changes; the user can see the error from the recorded instance fault (which shows up in the API when the instance is in ERROR status).","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"02ed90887ce0a3ec354183e2eff2b06452d164f9","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"            LOG.error("},{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image.\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        # If image traits are present, then validate against allocations."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_2c6435e6","line":1036,"range":{"start_line":1033,"start_character":12,"end_line":1036,"end_character":56},"in_reply_to":"5f7c97a3_86452a72","updated":"2018-07-11 13:45:01.000000000","message":"(8:43:59 AM) mriedem: if we hit the scheduler during rebuild today because the image changes, and we get NoValidHost, we put the instance into ERROR state\n(8:44:25 AM) mriedem: so i\u0027d expect we do the same if the new image traits are invalid for the instance.host - which is essentially the same thing as a NoValidHost we\u0027d get from the scheduler","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"            LOG.error("},{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image.\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        # If image traits are present, then validate against allocations."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_052ed941","line":1036,"range":{"start_line":1033,"start_character":12,"end_line":1036,"end_character":56},"in_reply_to":"5f7c97a3_9d957597","updated":"2018-07-12 11:20:42.000000000","message":"Done\nAs suggested","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"deba7937412b33937eaf4133812080bb3105174f","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"            LOG.error("},{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image.\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        # If image traits are present, then validate against allocations."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_4cf091db","line":1036,"range":{"start_line":1033,"start_character":12,"end_line":1036,"end_character":56},"in_reply_to":"5f7c97a3_ac5a85f2","updated":"2018-07-11 13:53:54.000000000","message":"yea, talk with Matt in IRC, this problem is out of the scope in this patch.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9e361d3a69f841a2e610fa9df40a6582862059fc","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"            LOG.error("},{"line_number":1031,"context_line":"                \"The following traits are forbidden in flavor traits(\""},{"line_number":1032,"context_line":"                \"extra_specs): %s\", \u0027, \u0027.join(forbidden_traits))"},{"line_number":1033,"context_line":"            raise exception.NoValidHost("},{"line_number":1034,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1035,"context_line":"                       \"traits in flavor associated with the Image.\""},{"line_number":1036,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1037,"context_line":"            return"},{"line_number":1038,"context_line":""},{"line_number":1039,"context_line":"        # If image traits are present, then validate against allocations."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_86452a72","line":1036,"range":{"start_line":1033,"start_character":12,"end_line":1036,"end_character":56},"in_reply_to":"5f7c97a3_b2a0a9a6","updated":"2018-07-11 13:09:14.000000000","message":"I checked the spec [1] and it just says \"fail the rebuild\". Perhaps it should be updated to be more specific, according to whatever we decide here.\n\n[1] http://specs.openstack.org/openstack/nova-specs/specs/rocky/approved/glance-image-traits.html#proposed-change","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"e164001e636067f9294b8d570cb469180e943858","unresolved":false,"context_lines":[{"line_number":1046,"context_line":"        compute_node \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":1047,"context_line":"            context, instance.host, instance.node)"},{"line_number":1048,"context_line":""},{"line_number":1049,"context_line":"        # TODO(karimull): Call with a read-only version , when available."},{"line_number":1050,"context_line":"        instance_rp_tree \u003d ("},{"line_number":1051,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1052,"context_line":"                context, compute_node.uuid))"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_f72061fa","line":1049,"updated":"2018-07-10 18:56:01.000000000","message":"nit: extra space for comma","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":1046,"context_line":"        compute_node \u003d objects.ComputeNode.get_by_host_and_nodename("},{"line_number":1047,"context_line":"            context, instance.host, instance.node)"},{"line_number":1048,"context_line":""},{"line_number":1049,"context_line":"        # TODO(karimull): Call with a read-only version , when available."},{"line_number":1050,"context_line":"        instance_rp_tree \u003d ("},{"line_number":1051,"context_line":"            self.report_client.get_provider_tree_and_ensure_root("},{"line_number":1052,"context_line":"                context, compute_node.uuid))"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_c5dc6147","line":1049,"in_reply_to":"5f7c97a3_f72061fa","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b31ac874491b4665c45e78778c95c2bb7f695dda","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"        missing_traits \u003d image_traits - traits_in_instance_rps"},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":"        if missing_traits:"},{"line_number":1063,"context_line":"            LOG.error("},{"line_number":1064,"context_line":"                \"The following traits were in the image but not \""},{"line_number":1065,"context_line":"                \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1066,"context_line":"                \u0027, \u0027.join(missing_traits))"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_f2d141fa","line":1063,"range":{"start_line":1063,"start_character":12,"end_line":1063,"end_character":22},"updated":"2018-07-11 08:57:05.000000000","message":"ditto, I don\u0027t think we should use error.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"        missing_traits \u003d image_traits - traits_in_instance_rps"},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":"        if missing_traits:"},{"line_number":1063,"context_line":"            LOG.error("},{"line_number":1064,"context_line":"                \"The following traits were in the image but not \""},{"line_number":1065,"context_line":"                \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1066,"context_line":"                \u0027, \u0027.join(missing_traits))"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_25c43560","line":1063,"range":{"start_line":1063,"start_character":12,"end_line":1063,"end_character":22},"in_reply_to":"5f7c97a3_1dc0857d","updated":"2018-07-12 11:20:42.000000000","message":"Done\nremoved","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53aa68d7d3507db1382fbea6b5aa570ccde4d3ba","unresolved":false,"context_lines":[{"line_number":1060,"context_line":"        missing_traits \u003d image_traits - traits_in_instance_rps"},{"line_number":1061,"context_line":""},{"line_number":1062,"context_line":"        if missing_traits:"},{"line_number":1063,"context_line":"            LOG.error("},{"line_number":1064,"context_line":"                \"The following traits were in the image but not \""},{"line_number":1065,"context_line":"                \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1066,"context_line":"                \u0027, \u0027.join(missing_traits))"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_1dc0857d","line":1063,"range":{"start_line":1063,"start_character":12,"end_line":1063,"end_character":22},"in_reply_to":"5f7c97a3_f2d141fa","updated":"2018-07-11 15:19:26.000000000","message":"same as above, either remove or log at debug and pass instance\u003dinstance for logging context","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b31ac874491b4665c45e78778c95c2bb7f695dda","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"                \"The following traits were in the image but not \""},{"line_number":1065,"context_line":"                \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1066,"context_line":"                \u0027, \u0027.join(missing_traits))"},{"line_number":1067,"context_line":"            raise exception.NoValidHost("},{"line_number":1068,"context_line":"                reason\u003d_(\"Image traits cannot be \""},{"line_number":1069,"context_line":"                       \"satisfied by the current resource providers.\""},{"line_number":1070,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1071,"context_line":""},{"line_number":1072,"context_line":"    # TODO(avolkov): move method to bdm"},{"line_number":1073,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_52a595b3","line":1070,"range":{"start_line":1067,"start_character":11,"end_line":1070,"end_character":56},"updated":"2018-07-11 08:57:05.000000000","message":"Ditto, this will lead the user get an error instance also.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"                \"The following traits were in the image but not \""},{"line_number":1065,"context_line":"                \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1066,"context_line":"                \u0027, \u0027.join(missing_traits))"},{"line_number":1067,"context_line":"            raise exception.NoValidHost("},{"line_number":1068,"context_line":"                reason\u003d_(\"Image traits cannot be \""},{"line_number":1069,"context_line":"                       \"satisfied by the current resource providers.\""},{"line_number":1070,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1071,"context_line":""},{"line_number":1072,"context_line":"    # TODO(avolkov): move method to bdm"},{"line_number":1073,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_45c1314e","line":1070,"range":{"start_line":1067,"start_character":11,"end_line":1070,"end_character":56},"in_reply_to":"5f7c97a3_3dbd4103","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53aa68d7d3507db1382fbea6b5aa570ccde4d3ba","unresolved":false,"context_lines":[{"line_number":1064,"context_line":"                \"The following traits were in the image but not \""},{"line_number":1065,"context_line":"                \"in the instance\u0027s allocated Resource Providers: %s\","},{"line_number":1066,"context_line":"                \u0027, \u0027.join(missing_traits))"},{"line_number":1067,"context_line":"            raise exception.NoValidHost("},{"line_number":1068,"context_line":"                reason\u003d_(\"Image traits cannot be \""},{"line_number":1069,"context_line":"                       \"satisfied by the current resource providers.\""},{"line_number":1070,"context_line":"                       \"Please relaunch the instance.\"))"},{"line_number":1071,"context_line":""},{"line_number":1072,"context_line":"    # TODO(avolkov): move method to bdm"},{"line_number":1073,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_3dbd4103","line":1070,"range":{"start_line":1067,"start_character":11,"end_line":1070,"end_character":56},"in_reply_to":"5f7c97a3_52a595b3","updated":"2018-07-11 15:19:26.000000000","message":"Yes, which is what we want (per above). And as above, I\u0027d like to see a functional test assert the fault message from the server has this information for the user.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf93e4d4844a9772def2d3bb2de4503aba0927bd","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"        if forbidden_traits:"},{"line_number":1031,"context_line":"            raise exception.NoValidHost("},{"line_number":1032,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1033,"context_line":"                         \"traits in flavor associated with the Image. \""},{"line_number":1034,"context_line":"                         \"Please relaunch the instance.\"))"},{"line_number":1035,"context_line":"            return"},{"line_number":1036,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_bb1cdd14","line":1033,"range":{"start_line":1033,"start_character":63,"end_line":1033,"end_character":68},"updated":"2018-07-12 15:41:58.000000000","message":"server? The flavor is tied to the server, not the image.","commit_id":"012ea7439bad72d34bb851c18d9390826752ff05"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf93e4d4844a9772def2d3bb2de4503aba0927bd","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"            raise exception.NoValidHost("},{"line_number":1032,"context_line":"                reason\u003d_(\"Image traits are part of forbidden \""},{"line_number":1033,"context_line":"                         \"traits in flavor associated with the Image. \""},{"line_number":1034,"context_line":"                         \"Please relaunch the instance.\"))"},{"line_number":1035,"context_line":"            return"},{"line_number":1036,"context_line":""},{"line_number":1037,"context_line":"        # If image traits are present, then validate against allocations."}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_dbde793b","line":1034,"range":{"start_line":1034,"start_character":26,"end_line":1034,"end_character":55},"updated":"2018-07-12 15:41:58.000000000","message":"This is a bit weird to me; are we saying, if you want to use the specified image, you\u0027ll need to create a new server with that image and a flavor that supports the same traits? Maybe we should just say that since \"relaunching the instance\" with the specified image and same flavor would still fail, right?","commit_id":"012ea7439bad72d34bb851c18d9390826752ff05"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf93e4d4844a9772def2d3bb2de4503aba0927bd","unresolved":false,"context_lines":[{"line_number":1061,"context_line":"            raise exception.NoValidHost("},{"line_number":1062,"context_line":"                reason\u003d_(\"Image traits cannot be \""},{"line_number":1063,"context_line":"                         \"satisfied by the current resource providers. \""},{"line_number":1064,"context_line":"                         \"Please relaunch the instance.\"))"},{"line_number":1065,"context_line":""},{"line_number":1066,"context_line":"    # TODO(avolkov): move method to bdm"},{"line_number":1067,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_7b996578","line":1064,"range":{"start_line":1064,"start_character":26,"end_line":1064,"end_character":54},"updated":"2018-07-12 15:41:58.000000000","message":"same - we should qualify this; we hit an error during rebuild because the specified image is incompatible with the host that the server is currently on - so you can either specify a different image or delete and create a server with the new image.","commit_id":"012ea7439bad72d34bb851c18d9390826752ff05"}],"nova/tests/fixtures.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5f7c97a3_92600410","updated":"2018-06-04 18:42:55.000000000","message":"Oh, yeah, it looks like the changes in this file are purely followons from https://review.openstack.org/#/c/560596/ -- they should definitely be in a separate patch.","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"df31e0b40c2f60abbd455cf0901bb17dc1e43c29","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5f7c97a3_2691b654","in_reply_to":"5f7c97a3_92600410","updated":"2018-06-15 08:16:52.000000000","message":"Moving it to a separate patch","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"}],"nova/tests/functional/libvirt/test_shared_resource_provider.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"38f20629ed16d1551bc08e4aaf4f5f0047e53d71","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SharedStorageProviderUsageTestCase("},{"line_number":29,"context_line":"        integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":30,"context_line":"    compute_driver \u003d \u0027libvirt.LibvirtDriver\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(SharedStorageProviderUsageTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_52226c56","line":30,"updated":"2018-07-11 14:49:17.000000000","message":"This seems like a weird location for rebuild tests based on what you\u0027re changing (virt-agnostic validation for rebuild in conductor), but I guess it\u0027s this way because the libvirt driver is the only one that provides shared resources? Still, seems we could have done this in a non-libvirt specific test class, but that could be decoupled later.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class SharedStorageProviderUsageTestCase("},{"line_number":29,"context_line":"        integrated_helpers.ProviderUsageBaseTestCase):"},{"line_number":30,"context_line":"    compute_driver \u003d \u0027libvirt.LibvirtDriver\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def setUp(self):"},{"line_number":33,"context_line":"        super(SharedStorageProviderUsageTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_b69f1db2","line":30,"in_reply_to":"5f7c97a3_52226c56","updated":"2018-07-12 11:20:42.000000000","message":"Yes , since I can only use libvirtdriver for shared resource based test on rebuild I stubbed it here, as I can use the existing setup and no duplicating the code.","commit_id":"b2459cb71782827b745814fc9db771285d890915"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5f7c97a3_526a6ced","updated":"2018-06-04 18:42:55.000000000","message":"ditto","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"df31e0b40c2f60abbd455cf0901bb17dc1e43c29","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"5f7c97a3_468e3233","in_reply_to":"5f7c97a3_526a6ced","updated":"2018-06-15 08:16:52.000000000","message":"Done","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"b32e40a7bdae474d38f91cbd1db9b12fab5f10b5","unresolved":false,"context_lines":[{"line_number":3827,"context_line":"        self.assertEqual({\u0027VCPU\u0027: 0, \u0027MEMORY_MB\u0027: 0, \u0027DISK_GB\u0027: 0},"},{"line_number":3828,"context_line":"                         rp_usages)"},{"line_number":3829,"context_line":""},{"line_number":3830,"context_line":"        # create a server without traits in both image and flavour"},{"line_number":3831,"context_line":"        server \u003d self._create_server_with_traits("},{"line_number":3832,"context_line":"            self.flavor_with_trait[\u0027id\u0027], self.image_id_with_trait)"},{"line_number":3833,"context_line":"        server \u003d self._wait_for_state_change(self.admin_api, server,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_165496fd","line":3830,"range":{"start_line":3830,"start_character":26,"end_line":3830,"end_character":33},"updated":"2018-07-02 21:43:29.000000000","message":"with?","commit_id":"15ed758c25c97b564e39dadb4897e6a0af8b9fa0"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"e08bc2a91054c8be84abf10b3463cbe526e3b5eb","unresolved":false,"context_lines":[{"line_number":3827,"context_line":"        self.assertEqual({\u0027VCPU\u0027: 0, \u0027MEMORY_MB\u0027: 0, \u0027DISK_GB\u0027: 0},"},{"line_number":3828,"context_line":"                         rp_usages)"},{"line_number":3829,"context_line":""},{"line_number":3830,"context_line":"        # create a server without traits in both image and flavour"},{"line_number":3831,"context_line":"        server \u003d self._create_server_with_traits("},{"line_number":3832,"context_line":"            self.flavor_with_trait[\u0027id\u0027], self.image_id_with_trait)"},{"line_number":3833,"context_line":"        server \u003d self._wait_for_state_change(self.admin_api, server,"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_1068ac85","line":3830,"range":{"start_line":3830,"start_character":26,"end_line":3830,"end_character":33},"in_reply_to":"5f7c97a3_165496fd","updated":"2018-07-09 12:11:24.000000000","message":"Done","commit_id":"15ed758c25c97b564e39dadb4897e6a0af8b9fa0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53aa68d7d3507db1382fbea6b5aa570ccde4d3ba","unresolved":false,"context_lines":[{"line_number":3775,"context_line":"        # the required trait."},{"line_number":3776,"context_line":"        self.assertEqual(self.compute2.host, server[\u0027OS-EXT-SRV-ATTR:host\u0027])"},{"line_number":3777,"context_line":""},{"line_number":3778,"context_line":"    def test_rebuild_instance_with_image_traits_no_host(self):"},{"line_number":3779,"context_line":"        \"\"\"Rebuilding a server with a  different image which has required"},{"line_number":3780,"context_line":"        traits on the image fails to valid the host that this server is"},{"line_number":3781,"context_line":"        currently running, cause the compute host resource provider is not"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_3d42210f","line":3778,"range":{"start_line":3778,"start_character":8,"end_line":3778,"end_character":55},"updated":"2018-07-11 15:19:26.000000000","message":"We should have a similar test for the forbidden trait case to assert the fault message that gets recorded with the instance.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":3775,"context_line":"        # the required trait."},{"line_number":3776,"context_line":"        self.assertEqual(self.compute2.host, server[\u0027OS-EXT-SRV-ATTR:host\u0027])"},{"line_number":3777,"context_line":""},{"line_number":3778,"context_line":"    def test_rebuild_instance_with_image_traits_no_host(self):"},{"line_number":3779,"context_line":"        \"\"\"Rebuilding a server with a  different image which has required"},{"line_number":3780,"context_line":"        traits on the image fails to valid the host that this server is"},{"line_number":3781,"context_line":"        currently running, cause the compute host resource provider is not"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_966b0185","line":3778,"range":{"start_line":3778,"start_character":8,"end_line":3778,"end_character":55},"in_reply_to":"5f7c97a3_3d42210f","updated":"2018-07-12 11:20:42.000000000","message":"Done\n\nAdded a functional test case and removed the unit test case for forbidden traits scenario","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba5e31eac601d6cdc0aae582237bed746aab7947","unresolved":false,"context_lines":[{"line_number":3776,"context_line":"        self.assertEqual(self.compute2.host, server[\u0027OS-EXT-SRV-ATTR:host\u0027])"},{"line_number":3777,"context_line":""},{"line_number":3778,"context_line":"    def test_rebuild_instance_with_image_traits_no_host(self):"},{"line_number":3779,"context_line":"        \"\"\"Rebuilding a server with a  different image which has required"},{"line_number":3780,"context_line":"        traits on the image fails to valid the host that this server is"},{"line_number":3781,"context_line":"        currently running, cause the compute host resource provider is not"},{"line_number":3782,"context_line":"        associated with similar trait."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_92956497","line":3779,"range":{"start_line":3779,"start_character":37,"end_line":3779,"end_character":39},"updated":"2018-07-11 14:46:03.000000000","message":"nit: too many spaces","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":3776,"context_line":"        self.assertEqual(self.compute2.host, server[\u0027OS-EXT-SRV-ATTR:host\u0027])"},{"line_number":3777,"context_line":""},{"line_number":3778,"context_line":"    def test_rebuild_instance_with_image_traits_no_host(self):"},{"line_number":3779,"context_line":"        \"\"\"Rebuilding a server with a  different image which has required"},{"line_number":3780,"context_line":"        traits on the image fails to valid the host that this server is"},{"line_number":3781,"context_line":"        currently running, cause the compute host resource provider is not"},{"line_number":3782,"context_line":"        associated with similar trait."}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_e5895d1e","line":3779,"range":{"start_line":3779,"start_character":37,"end_line":3779,"end_character":39},"in_reply_to":"5f7c97a3_92956497","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba5e31eac601d6cdc0aae582237bed746aab7947","unresolved":false,"context_lines":[{"line_number":3812,"context_line":""},{"line_number":3813,"context_line":"        # The server should be in ERROR state"},{"line_number":3814,"context_line":"        self.assertEqual(\u0027ERROR\u0027, server[\u0027status\u0027])"},{"line_number":3815,"context_line":"        self.assertIn(\u0027No valid host\u0027, server[\u0027fault\u0027][\u0027message\u0027])"},{"line_number":3816,"context_line":""},{"line_number":3817,"context_line":"    def test_rebuild_instance_with_image_traits_no_image_change(self):"},{"line_number":3818,"context_line":"        \"\"\"Rebuilds a server with a same image which has traits"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_927ec46b","line":3815,"range":{"start_line":3815,"start_character":8,"end_line":3815,"end_character":66},"updated":"2018-07-11 14:46:03.000000000","message":"Make sure the actual more detailed error from the NoValidHost is in here - the thing about image traits and forbidden traits.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":3812,"context_line":""},{"line_number":3813,"context_line":"        # The server should be in ERROR state"},{"line_number":3814,"context_line":"        self.assertEqual(\u0027ERROR\u0027, server[\u0027status\u0027])"},{"line_number":3815,"context_line":"        self.assertIn(\u0027No valid host\u0027, server[\u0027fault\u0027][\u0027message\u0027])"},{"line_number":3816,"context_line":""},{"line_number":3817,"context_line":"    def test_rebuild_instance_with_image_traits_no_image_change(self):"},{"line_number":3818,"context_line":"        \"\"\"Rebuilds a server with a same image which has traits"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_1bb39a50","line":3815,"range":{"start_line":3815,"start_character":8,"end_line":3815,"end_character":66},"in_reply_to":"5f7c97a3_927ec46b","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2520b9e995fb5ce42c6e7f8d082eb118a35fb85d","unresolved":false,"context_lines":[{"line_number":3835,"context_line":"        server \u003d self._wait_for_state_change(self.admin_api, server,"},{"line_number":3836,"context_line":"                                             \u0027ACTIVE\u0027)"},{"line_number":3837,"context_line":""},{"line_number":3838,"context_line":"        # make the compute node full and ensure rebuild still succeed"},{"line_number":3839,"context_line":"        inv \u003d {\"resource_class\": \"VCPU\","},{"line_number":3840,"context_line":"               \"total\": 1}"},{"line_number":3841,"context_line":"        self._set_inventory(rp_uuid, inv)"},{"line_number":3842,"context_line":""},{"line_number":3843,"context_line":"        # Now rebuild the server with a different image with traits"},{"line_number":3844,"context_line":"        rebuild_req_body \u003d {"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_725bf185","line":3841,"range":{"start_line":3838,"start_character":0,"end_line":3841,"end_character":41},"updated":"2018-07-11 09:19:28.000000000","message":"This sounds useless, it isn\u0027t really care about the case we test","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":3835,"context_line":"        server \u003d self._wait_for_state_change(self.admin_api, server,"},{"line_number":3836,"context_line":"                                             \u0027ACTIVE\u0027)"},{"line_number":3837,"context_line":""},{"line_number":3838,"context_line":"        # make the compute node full and ensure rebuild still succeed"},{"line_number":3839,"context_line":"        inv \u003d {\"resource_class\": \"VCPU\","},{"line_number":3840,"context_line":"               \"total\": 1}"},{"line_number":3841,"context_line":"        self._set_inventory(rp_uuid, inv)"},{"line_number":3842,"context_line":""},{"line_number":3843,"context_line":"        # Now rebuild the server with a different image with traits"},{"line_number":3844,"context_line":"        rebuild_req_body \u003d {"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_621f8371","line":3841,"range":{"start_line":3838,"start_character":0,"end_line":3841,"end_character":41},"in_reply_to":"5f7c97a3_725bf185","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"cf93e4d4844a9772def2d3bb2de4503aba0927bd","unresolved":false,"context_lines":[{"line_number":3865,"context_line":"                                                                        self):"},{"line_number":3866,"context_line":"        \"\"\"Rebuilding a server with a different image which has required"},{"line_number":3867,"context_line":"        traits on the image fails to validate image traits because flavor"},{"line_number":3868,"context_line":"        associated with the current instance has the similar triat that is"},{"line_number":3869,"context_line":"        forbidden"},{"line_number":3870,"context_line":"        \"\"\""},{"line_number":3871,"context_line":"        # Decorate compute2 resource provider with traits on flavor"}],"source_content_type":"text/x-python","patch_set":13,"id":"5f7c97a3_1b84f10a","line":3868,"range":{"start_line":3868,"start_character":61,"end_line":3868,"end_character":66},"updated":"2018-07-12 15:41:58.000000000","message":"trait","commit_id":"012ea7439bad72d34bb851c18d9390826752ff05"}],"nova/tests/unit/conductor/test_conductor.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"        inst_obj.host \u003d \u0027thebesthost\u0027"},{"line_number":1482,"context_line":"        expected_host \u003d inst_obj.host"},{"line_number":1483,"context_line":"        expected_node \u003d \u0027thebestnode\u0027"},{"line_number":1484,"context_line":"        host_rp_uuid \u003d \u0027356dee41-a91a-4f29-8bf5-ac41faf31c81\u0027"},{"line_number":1485,"context_line":""},{"line_number":1486,"context_line":"        fake_selection \u003d objects.Selection(service_host\u003dexpected_host,"},{"line_number":1487,"context_line":"                                           nodename\u003dexpected_node, limits\u003dNone)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_9249e48f","line":1484,"range":{"start_line":1484,"start_character":24,"end_line":1484,"end_character":60},"updated":"2018-06-04 18:42:55.000000000","message":"use a uuidsentinel.\n\n host_rp_uuid \u003d uuids.host\n\nor whatever\n\n(throughout)","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"df31e0b40c2f60abbd455cf0901bb17dc1e43c29","unresolved":false,"context_lines":[{"line_number":1481,"context_line":"        inst_obj.host \u003d \u0027thebesthost\u0027"},{"line_number":1482,"context_line":"        expected_host \u003d inst_obj.host"},{"line_number":1483,"context_line":"        expected_node \u003d \u0027thebestnode\u0027"},{"line_number":1484,"context_line":"        host_rp_uuid \u003d \u0027356dee41-a91a-4f29-8bf5-ac41faf31c81\u0027"},{"line_number":1485,"context_line":""},{"line_number":1486,"context_line":"        fake_selection \u003d objects.Selection(service_host\u003dexpected_host,"},{"line_number":1487,"context_line":"                                           nodename\u003dexpected_node, limits\u003dNone)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_e69ade6d","line":1484,"range":{"start_line":1484,"start_character":24,"end_line":1484,"end_character":60},"in_reply_to":"5f7c97a3_9249e48f","updated":"2018-06-15 08:16:52.000000000","message":"Done","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[{"line_number":1513,"context_line":"        fake_rp_tree.new_root(inst_obj.host, host_rp_uuid)"},{"line_number":1514,"context_line":"        fake_rp_tree.update_traits(host_rp_uuid, [\u0027CUSTOM_TRUSTED\u0027])"},{"line_number":1515,"context_line":""},{"line_number":1516,"context_line":"        with test.nested("},{"line_number":1517,"context_line":"            mock.patch.object(self.conductor_manager.compute_rpcapi,"},{"line_number":1518,"context_line":"                              \u0027rebuild_instance\u0027),"},{"line_number":1519,"context_line":"            mock.patch.object(objects.ImageMeta,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_52434c6d","line":1516,"range":{"start_line":1516,"start_character":13,"end_line":1516,"end_character":24},"updated":"2018-06-04 18:42:55.000000000","message":"test.nested is not necessary since py27\n\nhttps://stackoverflow.com/questions/893333/multiple-variables-in-python-with-statement\n\n(throughout)","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"df31e0b40c2f60abbd455cf0901bb17dc1e43c29","unresolved":false,"context_lines":[{"line_number":1513,"context_line":"        fake_rp_tree.new_root(inst_obj.host, host_rp_uuid)"},{"line_number":1514,"context_line":"        fake_rp_tree.update_traits(host_rp_uuid, [\u0027CUSTOM_TRUSTED\u0027])"},{"line_number":1515,"context_line":""},{"line_number":1516,"context_line":"        with test.nested("},{"line_number":1517,"context_line":"            mock.patch.object(self.conductor_manager.compute_rpcapi,"},{"line_number":1518,"context_line":"                              \u0027rebuild_instance\u0027),"},{"line_number":1519,"context_line":"            mock.patch.object(objects.ImageMeta,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_06983a73","line":1516,"range":{"start_line":1516,"start_character":13,"end_line":1516,"end_character":24},"in_reply_to":"5f7c97a3_52434c6d","updated":"2018-06-15 08:16:52.000000000","message":"Done","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"fe63023442cf4cf8a42112963a6e5d93d8058d14","unresolved":false,"context_lines":[{"line_number":1654,"context_line":""},{"line_number":1655,"context_line":"            self.assertFalse(rebuild_mock.called)"},{"line_number":1656,"context_line":""},{"line_number":1657,"context_line":""},{"line_number":1658,"context_line":"class ConductorTaskTestCase(_BaseTaskTestCase, test_compute.BaseTestCase):"},{"line_number":1659,"context_line":"    \"\"\"ComputeTaskManager Tests.\"\"\""},{"line_number":1660,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_52382ced","line":1657,"updated":"2018-06-04 18:42:55.000000000","message":"I think we need to have some functional tests for this as well, going end to end - without mocking things like the placement calls.","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"df31e0b40c2f60abbd455cf0901bb17dc1e43c29","unresolved":false,"context_lines":[{"line_number":1654,"context_line":""},{"line_number":1655,"context_line":"            self.assertFalse(rebuild_mock.called)"},{"line_number":1656,"context_line":""},{"line_number":1657,"context_line":""},{"line_number":1658,"context_line":"class ConductorTaskTestCase(_BaseTaskTestCase, test_compute.BaseTestCase):"},{"line_number":1659,"context_line":"    \"\"\"ComputeTaskManager Tests.\"\"\""},{"line_number":1660,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5f7c97a3_66800ef9","line":1657,"in_reply_to":"5f7c97a3_52382ced","updated":"2018-06-15 08:16:52.000000000","message":"Will be adding function tests soon..","commit_id":"16934aa5c009ece04648308fd7e76fe6df6f1d15"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"53164dc276ab89489878b7ff87ec06086bad96db","unresolved":false,"context_lines":[{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"            self.assertFalse(rebuild_mock.called)"},{"line_number":1651,"context_line":""},{"line_number":1652,"context_line":""},{"line_number":1653,"context_line":"class ConductorTaskTestCase(_BaseTaskTestCase, test_compute.BaseTestCase):"},{"line_number":1654,"context_line":"    \"\"\"ComputeTaskManager Tests.\"\"\""},{"line_number":1655,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_d5da9877","line":1652,"updated":"2018-06-19 21:43:52.000000000","message":"Need tests that exercise a real tree, preferably including sharing providers.  (Later: I see Arvind agrees with me :)\n\nShould also add unit tests that specifically invoke _validate_image_traits_for_rebuild and exercise its various branches.","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"753fc5f26c001ba8f5e0bce9a7fc691ef5b0d7c0","unresolved":false,"context_lines":[{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"            self.assertFalse(rebuild_mock.called)"},{"line_number":1651,"context_line":""},{"line_number":1652,"context_line":""},{"line_number":1653,"context_line":"class ConductorTaskTestCase(_BaseTaskTestCase, test_compute.BaseTestCase):"},{"line_number":1654,"context_line":"    \"\"\"ComputeTaskManager Tests.\"\"\""},{"line_number":1655,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_ed4720a3","line":1652,"in_reply_to":"5f7c97a3_c502580c","updated":"2018-06-28 21:32:01.000000000","message":"\u003e not done\n\nStill working on this unit test.","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d9f242943c2a1c4b657683e448a9c76cd24935a8","unresolved":false,"context_lines":[{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"            self.assertFalse(rebuild_mock.called)"},{"line_number":1651,"context_line":""},{"line_number":1652,"context_line":""},{"line_number":1653,"context_line":"class ConductorTaskTestCase(_BaseTaskTestCase, test_compute.BaseTestCase):"},{"line_number":1654,"context_line":"    \"\"\"ComputeTaskManager Tests.\"\"\""},{"line_number":1655,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_c502580c","line":1652,"in_reply_to":"5f7c97a3_d5da9877","updated":"2018-06-27 03:21:05.000000000","message":"not done","commit_id":"1b3637c441c996443c14b043dddef36a5dbeb98a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ba5e31eac601d6cdc0aae582237bed746aab7947","unresolved":false,"context_lines":[{"line_number":1455,"context_line":"        self.assertEqual(\u0027compute.instance.rebuild.scheduled\u0027,"},{"line_number":1456,"context_line":"                         fake_notifier.NOTIFICATIONS[0].event_type)"},{"line_number":1457,"context_line":""},{"line_number":1458,"context_line":"    @mock.patch.object(objects.ComputeNode, \u0027get_by_host_and_nodename\u0027,"},{"line_number":1459,"context_line":"                       return_value\u003dobjects.ComputeNode(uuid\u003d"},{"line_number":1460,"context_line":"                                        uuids.allocation_resource_provider))"},{"line_number":1461,"context_line":"    def test_rebuild_instance_with_image_traits(self, get_compute_node):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_b2e8a015","line":1458,"updated":"2018-07-11 14:46:03.000000000","message":"Why do we need all of these unit tests which look to be completely redundant with the functional tests already added? If the functional tests are covering the same code, we don\u0027t need the unit tests.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":1455,"context_line":"        self.assertEqual(\u0027compute.instance.rebuild.scheduled\u0027,"},{"line_number":1456,"context_line":"                         fake_notifier.NOTIFICATIONS[0].event_type)"},{"line_number":1457,"context_line":""},{"line_number":1458,"context_line":"    @mock.patch.object(objects.ComputeNode, \u0027get_by_host_and_nodename\u0027,"},{"line_number":1459,"context_line":"                       return_value\u003dobjects.ComputeNode(uuid\u003d"},{"line_number":1460,"context_line":"                                        uuids.allocation_resource_provider))"},{"line_number":1461,"context_line":"    def test_rebuild_instance_with_image_traits(self, get_compute_node):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_763bc5c8","line":1458,"in_reply_to":"5f7c97a3_b2e8a015","updated":"2018-07-12 11:20:42.000000000","message":"Done\n\nRemoved as suggested","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"53aa68d7d3507db1382fbea6b5aa570ccde4d3ba","unresolved":false,"context_lines":[{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"            self.assertFalse(rebuild_mock.called)"},{"line_number":1641,"context_line":""},{"line_number":1642,"context_line":"    def test_rebuild_instance_with_image_traits_and_forbidden_flavor_traits("},{"line_number":1643,"context_line":"                                                               self):"},{"line_number":1644,"context_line":"        inst_obj \u003d self._create_fake_instance_obj()"},{"line_number":1645,"context_line":"        inst_obj.host \u003d \u0027thebesthost\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_9dffb5b0","line":1642,"range":{"start_line":1642,"start_character":8,"end_line":1642,"end_character":75},"updated":"2018-07-11 15:19:26.000000000","message":"Write this as a functional test and then we can assert the server API response shows the fault with the error message specific to the forbidden traits. Then the functional tests give us all the coverage we need and we can drop these redundant unit tests.","commit_id":"b2459cb71782827b745814fc9db771285d890915"},{"author":{"_account_id":28171,"name":"karim","email":"karimullah.mohammed@intel.com","username":"karimull"},"change_message_id":"58b5e8efd85dedce74d442462c1895608fd01aec","unresolved":false,"context_lines":[{"line_number":1639,"context_line":""},{"line_number":1640,"context_line":"            self.assertFalse(rebuild_mock.called)"},{"line_number":1641,"context_line":""},{"line_number":1642,"context_line":"    def test_rebuild_instance_with_image_traits_and_forbidden_flavor_traits("},{"line_number":1643,"context_line":"                                                               self):"},{"line_number":1644,"context_line":"        inst_obj \u003d self._create_fake_instance_obj()"},{"line_number":1645,"context_line":"        inst_obj.host \u003d \u0027thebesthost\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_d6565906","line":1642,"range":{"start_line":1642,"start_character":8,"end_line":1642,"end_character":75},"in_reply_to":"5f7c97a3_9dffb5b0","updated":"2018-07-12 11:20:42.000000000","message":"Done","commit_id":"b2459cb71782827b745814fc9db771285d890915"}]}
