)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":39509,"name":"Lucas HENRY","display_name":"Lucas HENRY","email":"lucas.henry@ovhcloud.com","username":"polyedre"},"change_message_id":"0baef70bd194a5267823cbdffcd4d880554c14fc","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"# Statuses of migrations that are not in progress anymore, as defined by"},{"line_number":109,"context_line":"# migration_get_in_progress_by_host_and_node()."},{"line_number":110,"context_line":"_FINISHED_MIGRATION_STATUSES \u003d ("},{"line_number":111,"context_line":"    \u0027confirmed\u0027, \u0027reverted\u0027, \u0027error\u0027, \u0027failed\u0027, \u0027completed\u0027, \u0027cancelled\u0027,"},{"line_number":112,"context_line":"    \u0027done\u0027)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"f8933541_b380ba87","line":110,"updated":"2026-10-26 09:38:42.000000000","message":"This copies the status list of migration_get_in_progress_by_host_and_node(), whose TODO already complains that the definition of \"in progress\" is scattered; a third copy will drift. It also costs one conductor round trip per pending instance, on every loop iteration.\n\nUse MigrationList.get_in_progress_by_host_and_node() for each node of this host (usually one query) and keep the pending instances that have no migration with dest_compute \u003d\u003d self.host in the result. That reuses the existing definition and drops this constant.","commit_id":"1aec438e6646dd7beb2f2daefb4ae9ec3e93b557"},{"author":{"_account_id":39509,"name":"Lucas HENRY","display_name":"Lucas HENRY","email":"lucas.henry@ovhcloud.com","username":"polyedre"},"change_message_id":"6a6de3ee029329b28abf0b00b7daef33e3421ae5","unresolved":false,"context_lines":[{"line_number":1792,"context_line":"                LOG.exception(\u0027Graceful shutdown: failed to get the \u0027"},{"line_number":1793,"context_line":"                              \u0027migrations of instance %s\u0027, instance_uuid)"},{"line_number":1794,"context_line":"                continue"},{"line_number":1795,"context_line":"            if not any(m.dest_compute \u003d\u003d self.host and"},{"line_number":1796,"context_line":"                       m.status not in _FINISHED_MIGRATION_STATUSES"},{"line_number":1797,"context_line":"                       for m in migrations):"},{"line_number":1798,"context_line":"                LOG.info(\u0027Graceful shutdown: ending the destination \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"6c7b0919_0fdc6da6","line":1795,"updated":"2026-10-26 09:40:17.000000000","message":"For live migrations a terminal status does not mean the dest has nothing left to receive. _rollback_live_migration() casts rollback_live_migration_at_destination (to the compute-alt topic, precisely so it gets processed during shutdown) and only then sets the migration to \u0027failed\u0027. If this check runs after that save but before the dest consumes the cast, it ends the pending task, _in_progress_tasks can drop to zero, the shutdown proceeds and stops the alt RPC server: the rollback is lost and disks/instance dir/volume connections leak on the dest.\n\nThe bug is about resize_instance failing on the source, which never calls back. Either limit this to _pending_dest_resizes, or for live migrations only end tasks whose migration has been terminal for longer than the rollback can take to arrive. A functional test with a live migration failing on the source while the dest shuts down would cover it.","commit_id":"1aec438e6646dd7beb2f2daefb4ae9ec3e93b557"}],"nova/manager.py":[{"author":{"_account_id":39509,"name":"Lucas HENRY","display_name":"Lucas HENRY","email":"lucas.henry@ovhcloud.com","username":"polyedre"},"change_message_id":"6050fe461a6fca224ce5f0b131e04f56c7367cbd","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"        while True:"},{"line_number":314,"context_line":"            # Not under the lock: it may make remote calls."},{"line_number":315,"context_line":"            self._end_stale_tasks()"},{"line_number":316,"context_line":"            with self._in_progress_task_cond:"},{"line_number":317,"context_line":"                if not self._in_progress_tasks:"},{"line_number":318,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":1,"id":"eb79f996_cbe373fa","line":315,"updated":"2026-10-26 09:41:24.000000000","message":"_end_stale_tasks() runs outside the deadline check and does one blocking conductor call per pending instance. With the conductor slow or unreachable during shutdown, each lookup can take rpc_response_timeout (60s by default), so this loop can overrun wait_timeout and eat the time reserved for cleanup_host(), or hit the service-level join timeout. Pass the remaining time in and stop iterating once it is spent, or do one query per call (see the comment on _FINISHED_MIGRATION_STATUSES).","commit_id":"1aec438e6646dd7beb2f2daefb4ae9ec3e93b557"}]}
