Verified Commit 32fe2858 authored by anarcat's avatar anarcat
Browse files

ganeti reboots: fix migrate back

The functionality was completely broken by: b6503339 (handle plain
instances more gracefully (team#41263), 2023-07-19) when the
migrated_instances list was simply always empty, so it was never
migrating back anything.

I *think* this is just an oversight on my part, assuming the variable
was already prepopulated, so I'm hoping this works, but it might have
unintended consequences. This code has become quite messy.
parent 97708a0b
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -349,12 +349,13 @@ def shutdown_and_wait(
                )

                if affected_instances:
                    migrated_instances = affected_instances
                    kgb_relay_message(
                        "migrating %d instances from %s: %s"
                        % (
                            len(affected_instances),
                            len(migrated_instances),
                            con.host,
                            " ".join(affected_instances),
                            " ".join(migrated_instances),
                        )
                    )
                    # TODO: optimize this: ideally we'd do the migrate in