)]}'
{"nova/compute/api.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"04a08cd90c1664de45133aa4bb3b960d9ca7c888","unresolved":false,"context_lines":[{"line_number":2843,"context_line":"    def delete_instance_metadata(self, context, instance, key):"},{"line_number":2844,"context_line":"        \"\"\"Delete the given metadata item from an instance.\"\"\""},{"line_number":2845,"context_line":"        instance.delete_metadata_key(key)"},{"line_number":2846,"context_line":"        self.compute_rpcapi.change_instance_metadata(context,"},{"line_number":2847,"context_line":"                                                     instance\u003dinstance,"},{"line_number":2848,"context_line":"                                                     diff\u003d{key: [\u0027-\u0027]})"},{"line_number":2849,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BD3E%3D","line":2846,"updated":"2014-01-30 15:23:20.000000000","message":"We should get a dict version of the instance, clear its metadata, and pass it to this compute_rpcapi method for compatibility.","commit_id":"2990951c883b6c9a7860dff0fe8c5a96fd57f9ec"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"e02880e7c27e2dcd3f0ec940c5fc35917b7203bf","unresolved":false,"context_lines":[{"line_number":2843,"context_line":"    def delete_instance_metadata(self, context, instance, key):"},{"line_number":2844,"context_line":"        \"\"\"Delete the given metadata item from an instance.\"\"\""},{"line_number":2845,"context_line":"        instance.delete_metadata_key(key)"},{"line_number":2846,"context_line":"        self.compute_rpcapi.change_instance_metadata(context,"},{"line_number":2847,"context_line":"                                                     instance\u003dinstance,"},{"line_number":2848,"context_line":"                                                     diff\u003d{key: [\u0027-\u0027]})"},{"line_number":2849,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BCTw%3D","line":2846,"in_reply_to":"AAAAUH%2F%2BD3E%3D","updated":"2014-01-30 19:24:32.000000000","message":"Ah, I see.  I\u0027m not sure if the compute rpcapi method even looks at instance[\u0027metadata\u0027\u0027].  I thought the clearing was somehow for the notification.... (but is broken imo)","commit_id":"2990951c883b6c9a7860dff0fe8c5a96fd57f9ec"}],"nova/objects/instance.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"2bfcd439848444a1ac869d74c4b65f697f04e2c5","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        db.instance_metadata_delete(context, self.uuid, key)"},{"line_number":551,"context_line":"        del self.metadata[key]"},{"line_number":552,"context_line":"        instance_dict \u003d base.obj_to_primitive(self)"},{"line_number":553,"context_line":"        instance_dict[\u0027metadata\u0027] \u003d {}"},{"line_number":554,"context_line":"        notifications.send_update(context, instance_dict, instance_dict)"},{"line_number":555,"context_line":"        self.obj_reset_changes(\u0027metadata\u0027)"},{"line_number":556,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2F2U%3D","line":553,"updated":"2014-01-19 18:31:05.000000000","message":"I think we should add a note here because this doesn\u0027t seem right. :)   I remember we commented on this on IRC but I don\u0027t recall if we figured out why this is the way it is.  It seems like a bug... (which should be noted and potentially fixed separately)","commit_id":"2990951c883b6c9a7860dff0fe8c5a96fd57f9ec"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"04a08cd90c1664de45133aa4bb3b960d9ca7c888","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        db.instance_metadata_delete(context, self.uuid, key)"},{"line_number":551,"context_line":"        del self.metadata[key]"},{"line_number":552,"context_line":"        instance_dict \u003d base.obj_to_primitive(self)"},{"line_number":553,"context_line":"        instance_dict[\u0027metadata\u0027] \u003d {}"},{"line_number":554,"context_line":"        notifications.send_update(context, instance_dict, instance_dict)"},{"line_number":555,"context_line":"        self.obj_reset_changes(\u0027metadata\u0027)"},{"line_number":556,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BD4Y%3D","line":553,"in_reply_to":"AAAAUH%2F%2B%2F2U%3D","updated":"2014-01-30 15:23:20.000000000","message":"I think this is incorrect to have here, as I think the clearing of the metadata bit is something that needs to happen before the compute_rpcapi call. I propose we remove this from here and make compute/api pass a dict version of the instance (with the metadata cleared) to the compute_rpcapi call to maintain equivalent behavior. Changing the semantics of that call to be less stupid could come later.","commit_id":"2990951c883b6c9a7860dff0fe8c5a96fd57f9ec"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"e02880e7c27e2dcd3f0ec940c5fc35917b7203bf","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        db.instance_metadata_delete(context, self.uuid, key)"},{"line_number":551,"context_line":"        del self.metadata[key]"},{"line_number":552,"context_line":"        instance_dict \u003d base.obj_to_primitive(self)"},{"line_number":553,"context_line":"        instance_dict[\u0027metadata\u0027] \u003d {}"},{"line_number":554,"context_line":"        notifications.send_update(context, instance_dict, instance_dict)"},{"line_number":555,"context_line":"        self.obj_reset_changes(\u0027metadata\u0027)"},{"line_number":556,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BCUk%3D","line":553,"in_reply_to":"AAAAUH%2F%2BD4Y%3D","updated":"2014-01-30 19:24:32.000000000","message":"The compute rpcapi call?  Do you mean the notification below?  Move it back to compute/api?","commit_id":"2990951c883b6c9a7860dff0fe8c5a96fd57f9ec"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"2bfcd439848444a1ac869d74c4b65f697f04e2c5","unresolved":false,"context_lines":[{"line_number":552,"context_line":"        instance_dict \u003d base.obj_to_primitive(self)"},{"line_number":553,"context_line":"        instance_dict[\u0027metadata\u0027] \u003d {}"},{"line_number":554,"context_line":"        notifications.send_update(context, instance_dict, instance_dict)"},{"line_number":555,"context_line":"        self.obj_reset_changes(\u0027metadata\u0027)"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"def _make_instance_list(context, inst_list, db_inst_list, expected_attrs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2B%2F2g%3D","line":555,"updated":"2014-01-19 18:31:05.000000000","message":"I\u0027m not sure this should be here.  What if \u0027metadata\u0027 had other changes pending?","commit_id":"2990951c883b6c9a7860dff0fe8c5a96fd57f9ec"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"04a08cd90c1664de45133aa4bb3b960d9ca7c888","unresolved":false,"context_lines":[{"line_number":552,"context_line":"        instance_dict \u003d base.obj_to_primitive(self)"},{"line_number":553,"context_line":"        instance_dict[\u0027metadata\u0027] \u003d {}"},{"line_number":554,"context_line":"        notifications.send_update(context, instance_dict, instance_dict)"},{"line_number":555,"context_line":"        self.obj_reset_changes(\u0027metadata\u0027)"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"def _make_instance_list(context, inst_list, db_inst_list, expected_attrs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BD3w%3D","line":555,"in_reply_to":"AAAAUH%2F%2B%2F2g%3D","updated":"2014-01-30 15:23:20.000000000","message":"Agreed. I think that the algorithm should be:\n\n 1. Record metadata dirty state before doing anything\n 2. Remove the key from instance.metadata\n 3. If metadata was not dirty before, it should not be dirty after this, since the\n    changes have been synced. If it was, then it was not because of this and it\n    should remain dirty.\n\nThoughts?","commit_id":"2990951c883b6c9a7860dff0fe8c5a96fd57f9ec"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"e02880e7c27e2dcd3f0ec940c5fc35917b7203bf","unresolved":false,"context_lines":[{"line_number":552,"context_line":"        instance_dict \u003d base.obj_to_primitive(self)"},{"line_number":553,"context_line":"        instance_dict[\u0027metadata\u0027] \u003d {}"},{"line_number":554,"context_line":"        notifications.send_update(context, instance_dict, instance_dict)"},{"line_number":555,"context_line":"        self.obj_reset_changes(\u0027metadata\u0027)"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":""},{"line_number":558,"context_line":"def _make_instance_list(context, inst_list, db_inst_list, expected_attrs):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2BCVI%3D","line":555,"in_reply_to":"AAAAUH%2F%2BD3w%3D","updated":"2014-01-30 19:24:32.000000000","message":"Yep, that makes sense.","commit_id":"2990951c883b6c9a7860dff0fe8c5a96fd57f9ec"},{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"b95d74faf802cd1ef12b0d4cea90b8f0bd28b551","unresolved":false,"context_lines":[{"line_number":564,"context_line":"        instance_dict \u003d base.obj_to_primitive(self)"},{"line_number":565,"context_line":"        notifications.send_update(context, instance_dict, instance_dict)"},{"line_number":566,"context_line":"        if not md_was_changed:"},{"line_number":567,"context_line":"            self.obj_reset_changes(\u0027metadata\u0027)"},{"line_number":568,"context_line":""},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"def _make_instance_list(context, inst_list, db_inst_list, expected_attrs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F9nT8%3D","line":567,"updated":"2014-02-05 16:51:51.000000000","message":"Just thought of something else here. We should pop the key out of _orig_metadata no matter what, right?\n\n(And I think that I discovered while looking at this that we have an unrelated bug in obj_reset_changes() because it always resets metadata, even if you don\u0027t specify \u0027metadata\u0027 in the list of fields... heh.)","commit_id":"6ea14195b6f63cedbe19c8a69ee1103974ef7944"}]}
