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

Expose libvirt on_reboot in virt states #58591

Merged
merged 9 commits into from Dec 14, 2020
Merged

Conversation

cbosdo
Copy link
Contributor

@cbosdo cbosdo commented Sep 30, 2020

What does this PR do?

This PR allows the user to force the VM to shutdown instead of rebooting. It also allows applying virt.defined changes only on the definition of a running instance rather than trying to apply the changes live.

What issues does this PR fix or reference?

Fixes: #58589

Merge requirements satisfied?

Commits signed with GPG?

Yes

@cbosdo cbosdo requested a review from a team as a code owner September 30, 2020 14:46
@cbosdo cbosdo requested review from DmitryKuzmenko and removed request for a team September 30, 2020 14:46
@ghost ghost requested a review from Ch3LL September 30, 2020 14:47
@@ -254,3 +254,66 @@ def test_get_disk_convert_volumes(make_mock_vm, make_mock_storage_pool):
"virtual size": 214748364800,
},
} == virt.get_disks("srv01")


def test_update_stop_on_reboot_reset(make_mock_vm):
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get some docstrings added to these tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added :)

Ch3LL
Ch3LL previously approved these changes Oct 1, 2020
Copy link
Contributor

@Ch3LL Ch3LL left a comment

Choose a reason for hiding this comment

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

thanks!

s0undt3ch
s0undt3ch previously approved these changes Oct 3, 2020
@cbosdo
Copy link
Contributor Author

cbosdo commented Oct 15, 2020

re-run m2crypto

@sagetherage sagetherage removed the request for review from DmitryKuzmenko November 18, 2020 18:38
@cbosdo cbosdo force-pushed the on_reboot branch 2 times, most recently from 1db03d3 to beb170e Compare November 30, 2020 22:12
@cbosdo
Copy link
Contributor Author

cbosdo commented Nov 30, 2020

Just rebased on master after the recent virt PR merge.

@cbosdo
Copy link
Contributor Author

cbosdo commented Nov 30, 2020

@Ch3LL could you have a look at it now that your comment has been addressed and the PR is rebased?

@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 1, 2020

re-run pr-freebsd122-py3-pytest

@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 2, 2020

re-run pr-ubuntu2004-py3-pytest

s0undt3ch
s0undt3ch previously approved these changes Dec 2, 2020
@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 2, 2020

@dwoz can you merge this one now that it's rebased, green and ACKed?

@sagetherage sagetherage added the Aluminium Release Post Mg and Pre Si label Dec 2, 2020
Akm0d
Akm0d previously approved these changes Dec 2, 2020
@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 3, 2020

re-run pr-centos7-py3

@cbosdo cbosdo mentioned this pull request Dec 3, 2020
3 tasks
It can be needed to force a VM to stop instead of rebooting. A typical
example of this is when creating a VM using a install CDROM ISO or when
using an autoinstallation profile. Forcing a shutdown allows libvirt to
pick up another XML definition for the new start to remove the
firstboot-only options.
Allow updating the definition of a VM without touching the live
instance. This can be helpful since live update may change the device
names in the guest.
While all virt.update properties default values should not be used when
updating the XML definition, the stop_on_reboot default value (False)
needs to be passed still or the user will never be able to update with
this value.
@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 4, 2020

re-run pr-windows2016-py3-pytest

@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 4, 2020

re-run pr-windows2019-py3-pytest

@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 4, 2020

@Akm0d @s0undt3ch could you review it again now that it's been rebased on master after solving the conflicts with another virt-related PR? Should be the last time for that PR though ;)

@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 8, 2020

@dwoz could you merge this PR? it's now rebased, ACKed and green

@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 10, 2020

re-run pr-macosxcatalina-py3-pytest

@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 10, 2020

re-run pr-ubuntu1604-py3-tcp-pytest

@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 14, 2020

re-run pr-freebsd122-py3-pytest

@cbosdo
Copy link
Contributor Author

cbosdo commented Dec 14, 2020

re-run pr-centos8-py3-pytest

@dwoz dwoz merged commit 9433cb9 into saltstack:master Dec 14, 2020
@cbosdo cbosdo deleted the on_reboot branch December 15, 2020 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aluminium Release Post Mg and Pre Si
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow handling special first boot definition on VM
6 participants