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

feat(xo-server/vm.migrate): call VM.assert_can_migrate before #6245

Merged
merged 4 commits into from
May 30, 2022

Conversation

ByScripts
Copy link
Contributor

Fixes #5301

Check list

Check if done, if not relevant leave unchecked.

  • PR reference the relevant issue (e.g. Fixes #007 or See xoa-support#42)
  • if UI changes, a screenshot has been added to the PR
  • documentation updated
  • CHANGELOG.unreleased.md:
    • enhancement/bug fix entry added
    • list of packages to release updated (${name} v${new version})
  • I have tested added/updated features (and impacted code)

Process

  1. create a PR as soon as possible
  2. mark it as WiP: (Work in Progress) if not ready to be merged
  3. when you want a review, add a reviewer (and only one)
  4. if necessary, update your PR, and re- add a reviewer

From the Four Agreements:

  1. Be impeccable with your word.
  2. Don't take anything personally.
  3. Don't make assumptions.
  4. Always do your best.

CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
@ByScripts ByScripts requested a review from julien-f May 24, 2022 06:46
Copy link
Member

@julien-f julien-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, remove draft status and I'll merge.

@ByScripts ByScripts marked this pull request as ready for review May 24, 2022 09:08
@ByScripts ByScripts requested a review from julien-f May 24, 2022 09:08
@olivierlambert
Copy link
Member

It's not clear to me functionally speaking. Are we displaying the result of assert can migrate in the UI with a modal and allowing us to force anyway?

@julien-f julien-f changed the title WiP: feat(xo-server): Use VM.assert_can_migrate before migrating a VM feat(xo-server/vm.migrate): call VM.assert_can_migrate before May 24, 2022
@julien-f
Copy link
Member

@olivierlambert The result of the asset will be displayed as a migrate error.

No, this will not display a modal and allow bypassing, it was not part of the spec.

In what case bypassing the assert is relevant? When can it be wrong? From the doc, it appears to be only checking the lisence.

@olivierlambert
Copy link
Member

The spec wasn't complete enough, I agree (it wasn't really a spec TBH). But this might have huge consequences if we push this without anyway to bypass it if needed, without knowing anything about it. Or at least, we can't merge something without more understanding on what it means (for the user functional perspective).

We should at least get someone to test this on the lab in various cases (not necessarily from XO team BTW).

@julien-f
Copy link
Member

Ok, I propose adding this change in the server with a flag to bypass it and adding a way to bypass it in the UI in an other PR.
If the UI part is not ready for the release, we'll do a patch at the first reported issue.

Is it good for you?

@olivierlambert
Copy link
Member

Okay let's do this. Note that "assert can migrate" will check a lot of things on XAPI's side, that's why I'm a bit concerned about the consequences (especially if we do not get the reason directly in the UI, that will raise confusion amongst our users)

@ByScripts ByScripts requested a review from julien-f May 30, 2022 09:14
@ByScripts ByScripts requested a review from julien-f May 30, 2022 12:59
@julien-f julien-f merged commit d7d8143 into master May 30, 2022
@julien-f julien-f deleted the feat_assert_can_migrate branch May 30, 2022 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use VM.assert_can_migrate before migrating a VM
3 participants