)]}'
{"nova/compute/resource_tracker.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"0ec61021720e3c9754c41d2f6d7b802dbd5ed999","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        # the source and resume the instance there. As such, the migration"},{"line_number":576,"context_line":"        # isn\u0027t really really reverted yet, but this status is what we use to"},{"line_number":577,"context_line":"        # indicate that we no longer needs to account for usage on this host"},{"line_number":578,"context_line":"        migration.status \u003d \u0027reverted\u0027"},{"line_number":579,"context_line":"        migration.save()"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        self._drop_move_claim("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_c5a4c209","line":578,"range":{"start_line":578,"start_character":28,"end_line":578,"end_character":36},"updated":"2020-09-11 11:35:02.000000000","message":"Always assumed these were enums, as this is just a string what\u0027s stopping us from using `reverting` here and updating to `reverted` on the source once things are actually complete?","commit_id":"dc9c7a5ebf11253f86127238d33dff7401465155"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"79f53f0699f863148460636587172990e347c3f3","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        # the source and resume the instance there. As such, the migration"},{"line_number":576,"context_line":"        # isn\u0027t really really reverted yet, but this status is what we use to"},{"line_number":577,"context_line":"        # indicate that we no longer needs to account for usage on this host"},{"line_number":578,"context_line":"        migration.status \u003d \u0027reverted\u0027"},{"line_number":579,"context_line":"        migration.save()"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        self._drop_move_claim("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_65ffb6aa","line":578,"range":{"start_line":578,"start_character":28,"end_line":578,"end_character":36},"in_reply_to":"9f560f44_65bcd605","updated":"2020-09-11 11:45:49.000000000","message":"\u003e The status is already \u0027reverting\u0027 at this point. \n\nhttps://github.com/openstack/nova/blob/adbc94f8cdb/nova/compute/api.py#L3774-L3775","commit_id":"dc9c7a5ebf11253f86127238d33dff7401465155"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"ba9e20ab26ef66d31ab97308aac0bf7b322617df","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        # the source and resume the instance there. As such, the migration"},{"line_number":576,"context_line":"        # isn\u0027t really really reverted yet, but this status is what we use to"},{"line_number":577,"context_line":"        # indicate that we no longer needs to account for usage on this host"},{"line_number":578,"context_line":"        migration.status \u003d \u0027reverted\u0027"},{"line_number":579,"context_line":"        migration.save()"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        self._drop_move_claim("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_f473757e","line":578,"range":{"start_line":578,"start_character":28,"end_line":578,"end_character":36},"in_reply_to":"9f560f44_65ffb6aa","updated":"2020-09-11 13:24:27.000000000","message":"ACK and we can\u0027t add reverting to the list in [2] because we need to wait until we actually drop the claim on the dest here right?","commit_id":"dc9c7a5ebf11253f86127238d33dff7401465155"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"816568ac619a80453afe7ef86f3e6c81d5cb2906","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        # the source and resume the instance there. As such, the migration"},{"line_number":576,"context_line":"        # isn\u0027t really really reverted yet, but this status is what we use to"},{"line_number":577,"context_line":"        # indicate that we no longer needs to account for usage on this host"},{"line_number":578,"context_line":"        migration.status \u003d \u0027reverted\u0027"},{"line_number":579,"context_line":"        migration.save()"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        self._drop_move_claim("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_77280785","line":578,"range":{"start_line":578,"start_character":28,"end_line":578,"end_character":36},"in_reply_to":"9f560f44_741ac57c","updated":"2020-09-11 13:56:00.000000000","message":"ACK thanks","commit_id":"dc9c7a5ebf11253f86127238d33dff7401465155"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"4ce756e1ed834610b48476027fdf735a56065aee","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        # the source and resume the instance there. As such, the migration"},{"line_number":576,"context_line":"        # isn\u0027t really really reverted yet, but this status is what we use to"},{"line_number":577,"context_line":"        # indicate that we no longer needs to account for usage on this host"},{"line_number":578,"context_line":"        migration.status \u003d \u0027reverted\u0027"},{"line_number":579,"context_line":"        migration.save()"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        self._drop_move_claim("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_65bcd605","line":578,"range":{"start_line":578,"start_character":28,"end_line":578,"end_character":36},"in_reply_to":"9f560f44_c5a4c209","updated":"2020-09-11 11:43:51.000000000","message":"The status is already \u0027reverting\u0027 at this point. Even if it weren\u0027t, setting it here would perpetuate the race. This task would drop the usage but the periodic task, running between this and the source setting the status to \u0027reverted\u0027, would simply re-add it. The only migration\u0027s we don\u0027t track are those whose status is one of: confirmed, reverted, failed, completed, cancelled, and done. [1][2] I\u0027ll acknowledge that this isn\u0027t the greatest UX in the world, but it\u0027s good enough and fixes the race.\n\n[1] https://github.com/openstack/nova/blob/adbc94f8cdb/nova/compute/resource_tracker.py#L923\n[2] https://github.com/openstack/nova/blob/adbc94f8cdb/nova/db/sqlalchemy/api.py#L3280","commit_id":"dc9c7a5ebf11253f86127238d33dff7401465155"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"0a2895995afeb1c4b3ae6b1d46511e24a7fde264","unresolved":false,"context_lines":[{"line_number":575,"context_line":"        # the source and resume the instance there. As such, the migration"},{"line_number":576,"context_line":"        # isn\u0027t really really reverted yet, but this status is what we use to"},{"line_number":577,"context_line":"        # indicate that we no longer needs to account for usage on this host"},{"line_number":578,"context_line":"        migration.status \u003d \u0027reverted\u0027"},{"line_number":579,"context_line":"        migration.save()"},{"line_number":580,"context_line":""},{"line_number":581,"context_line":"        self._drop_move_claim("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_741ac57c","line":578,"range":{"start_line":578,"start_character":28,"end_line":578,"end_character":36},"in_reply_to":"9f560f44_f473757e","updated":"2020-09-11 13:52:15.000000000","message":"Correct. If we added that to the list, we\u0027d introduce a new race whereby running the periodic task between setting the status and calling \u0027drop_move_claim()\u0027 would result in the resource usage for that claim being \"dropped\" twice (it wouldn\u0027t be accounted for after the periodic task run, and we\u0027d still blindly try to decrement usage afterwards)","commit_id":"dc9c7a5ebf11253f86127238d33dff7401465155"}]}
