Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework server-side instance move #727

Merged
merged 5 commits into from
Apr 3, 2024
Merged

Rework server-side instance move #727

merged 5 commits into from
Apr 3, 2024

Conversation

stgraber
Copy link
Member

@stgraber stgraber commented Apr 3, 2024

This very seriously reworks the server-side instance move logic.
It had been slowly grown over the years meaning that each addition didn't necessarily fit well with the previous ones.

The new logic is basically split into two main stage:

  • Request validation (access control, target selection, ...) and non-migration process (simple renames)
  • Instance migration

The instance migration part then got a major overhaul too and now will basically do:

  • Handle basic instance rename first
  • Handle project and storage pool changes
  • Handle cluster server re-location

This should basically allow handling requests that can change one or more of:

  • Name
  • Location
  • Project
  • Storage pool

As well as supporting the additional properties controlling live migration, whether to retain snapshots and whether to override some specific parts of the instance configuration.

Closes #589
Closes #695
Closes #590
Closes #566

@stgraber
Copy link
Member Author

stgraber commented Apr 3, 2024

Given how extensive the rework is, I'd be pretty shocked if things didn't blow up through the testsuite but I figured I'd push what I have now and then handle any breakage tomorrow as well as do more manual testing of this whole thing.

I also need to verify that the new logic fixes all our current issues: #566, #589 and #590

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
@stgraber stgraber marked this pull request as ready for review April 3, 2024 19:06
@stgraber
Copy link
Member Author

stgraber commented Apr 3, 2024

And I think that's all my manual and automated tests happy with this now, so let's wait for Github to agree and this should be ready to merge.

That was a bit tricky to get everything behaving due to there being so much historical logic all over that code, some of which makes sense, some not so much. Anyway, we now have something that's API compatible to the previous implementation but then also can work with a much simpler client and will allow for more server-side logic in the future without getting ourselves back into the same corner.

@tych0 tych0 merged commit 4348087 into lxc:main Apr 3, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants