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

Refactor virt.migrate #57947

Merged
merged 35 commits into from Aug 24, 2020
Merged

Refactor virt.migrate #57947

merged 35 commits into from Aug 24, 2020

Conversation

rst0git
Copy link
Contributor

@rst0git rst0git commented Jul 15, 2020

This PR is rebased on #57736, which provides integration tests for live migration.

What does this PR do?

This PR modifies the existing virt.migrate functionality to use the Python bindings of libvirt instead of the virsh command-line tool. This approach allows to make of the libvirt migration options available to users via a generic interface that doesn't require an increased number functions. Although backwards comparability is preserved, the ssh parameter of virt.migrate, virt.migrate_non_shared and virt.migrate_non_shared_inc have been marked as deprecated.

Previous Behavior

salt src virt.migrate guest dst True
salt src virt.migrate_non_shared guest dst True
salt src virt.migrate_non_shared_inc guest-vm dst True

New Behavior

salt src virt.migrate guest dst True
salt src virt.migrate_non_shared guest dst True
salt src virt.migrate_non_shared_inc guest-vm dst True

salt src virt.migrate guest qemu+ssh://dst/system
salt src virt.migrate guest qemu+tcp://dst/system
salt src virt.migrate guest qemu+tls://dst/system
salt src virt.migrate guest qemu+tls://dst/system copy_storage=all
salt src virt.migrate guest qemu+tls://dst/system copy_storage=incremental

Merge requirements satisfied?

@rst0git rst0git requested a review from a team as a code owner July 15, 2020 09:21
@ghost ghost requested review from cmcmarrow and removed request for a team July 15, 2020 09:21
@rst0git
Copy link
Contributor Author

rst0git commented Jul 15, 2020

cc: @cbosdo

@cmcmarrow
Copy link
Contributor

@rst0git thanks for the PR and tests! Once I look over the PR and give it the green light this should be merge ready and will probably make it into Magnesium.

cmcmarrow
cmcmarrow previously approved these changes Jul 15, 2020
rst0git added a commit to rst0git/salt that referenced this pull request Jul 16, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
@rst0git
Copy link
Contributor Author

rst0git commented Jul 16, 2020

@cmcmarrow Thank you for the review! I rebased the PR on master and added two commits with changelog information.

@rst0git rst0git requested a review from cmcmarrow July 16, 2020 07:09
rst0git added a commit to rst0git/salt that referenced this pull request Jul 16, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/salt that referenced this pull request Jul 16, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
cmcmarrow
cmcmarrow previously approved these changes Jul 16, 2020
rst0git added a commit to rst0git/salt that referenced this pull request Jul 22, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/salt that referenced this pull request Jul 23, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/salt that referenced this pull request Jul 24, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/salt that referenced this pull request Jul 25, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
@s0undt3ch
Copy link
Member

Please do not merge this PR, it's blocked on external changes happening first.
Please read #57897 (comment) for context.

I will reply once the issues have been resolved to unblock this PR.

rst0git added a commit to rst0git/salt that referenced this pull request Jul 29, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
rst0git added a commit to rst0git/salt that referenced this pull request Aug 19, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
@rst0git rst0git force-pushed the virt-live-migration branch 2 times, most recently from a69df7b to 5ff8d12 Compare August 19, 2020 08:20
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
libvirt allows the use of compression with live migration. There are
two compression methods currently supported: "mt" and "xbzrle".

This patch allows extends the virt.migrate function with additional set
of options that allow to enable and configure the compression
functionality of libvirt.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
Without this change generating the docs fails with:
	Block quote ends without a blank line; unexpected unindent.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
@s0undt3ch
Copy link
Member

This PR is no longer blocked by the PyTest migration.

Copy link
Member

@s0undt3ch s0undt3ch left a comment

Choose a reason for hiding this comment

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

Forgot to revert the fixtures. Could you please remove them?

tests/support/pytest/fixtures.py Outdated Show resolved Hide resolved
tests/support/pytest/fixtures.py Outdated Show resolved Hide resolved
tests/support/pytest/fixtures.py Outdated Show resolved Hide resolved
tests/support/pytest/fixtures.py Outdated Show resolved Hide resolved
tests/support/pytest/fixtures.py Outdated Show resolved Hide resolved
Copy link
Member

@s0undt3ch s0undt3ch left a comment

Choose a reason for hiding this comment

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

Sorry, left some more debug code around....

tests/pytests/integration/modules/test_virt.py Outdated Show resolved Hide resolved
tests/pytests/integration/modules/test_virt.py Outdated Show resolved Hide resolved
@rst0git rst0git force-pushed the virt-live-migration branch 3 times, most recently from 3ce4c97 to 66b4196 Compare August 21, 2020 20:02
@rst0git rst0git requested a review from s0undt3ch August 21, 2020 20:14
s0undt3ch
s0undt3ch previously approved these changes Aug 21, 2020
dwoz
dwoz approved these changes Aug 24, 2020
@dwoz dwoz merged commit 7580b45 into saltstack:master Aug 24, 2020
27 checks passed
dwoz pushed a commit that referenced this pull request Aug 24, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
gqlo pushed a commit to gqlo/salt that referenced this pull request Sep 1, 2020
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
@sagetherage sagetherage added the Magnesium Mg release after Na prior to Al label Sep 14, 2020
@rst0git rst0git mentioned this pull request Nov 4, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Magnesium Mg release after Na prior to Al
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants