Bug 1952075 - Failed to migrate vm when migration encryption is enabled - upgrade-flow
Summary: Failed to migrate vm when migration encryption is enabled - upgrade-flow
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: 4.4.6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.4.6
: ---
Assignee: Milan Zamazal
QA Contact: Qin Yuan
URL:
Whiteboard:
Depends On:
Blocks: 1952078
TreeView+ depends on / blocked
 
Reported: 2021-04-21 13:01 UTC by Arik
Modified: 2021-05-14 07:29 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.4.6.6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1952078 (view as bug list)
Environment:
Last Closed: 2021-05-14 07:29:12 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.4+
ahadas: blocker?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 114482 0 master MERGED ansible: Add a role for adding client migration certificate links 2021-04-27 12:08:16 UTC
oVirt gerrit 114496 0 master MERGED core: set certs on host maintenance 2021-04-27 14:35:52 UTC
oVirt gerrit 114508 0 master MERGED ansible: Add upgrade check for migration client certificate presence 2021-04-28 05:57:05 UTC

Description Arik 2021-04-21 13:01:56 UTC
This bug was initially created as a copy of Bug #1948376 - but tailored to migrations from 8.3 hosts (that are not set with client certificate) to 8.4 hosts

Comment 1 Milan Zamazal 2021-04-22 08:11:31 UTC
https://gerrit.ovirt.org/c/ovirt-engine/+/114315 ensures VMs from the host can migrate after upgrading the host using "Upgrade" button in Webadmin or after enrolling certificates for the host in Webadmin. This bug is about solving the other cases, most importantly hosts not yet upgraded and running VMs. Since they don't have the client certificate links they may not be able to migrate their VMs elsewhere and they cannot be switched to maintenance and get the problem fixed while running VMs.

It has been proposed to make a playbook that would simply add the links to all the running hosts, without bringing them to maintenance. Such a playbook would resolve the problem above in case it occurs during the upgrade. The whole process is going to be documented, see BZ 1952078.

I don't know about a good way to get the whole process automated but if anybody can find one then we can consider it. Let's summarize what's needed to make encrypted migration working with RHEL/AV 8.4:

- Adding the links in certificate enrollment -- already done in BZ 1948376.
- Making sure the links are present on upgraded hosts -- also handled by BZ 1948376, it should be checked whether anything more is needed.
- Having a way to add the client certificate links to old hosts running VMs if needed. At worst, users can be instructed to add them manually, but a less manual way would be preferable.

Comment 2 Milan Zamazal 2021-04-22 14:14:30 UTC
Dana, what do you think about it?

Comment 3 Arik 2021-04-26 07:55:20 UTC
yeah, I think it would be nice to automate it but we need to see to what degree:
1. to provide an Ansible playbook as part of another package (Ansible collections?)
2. to provide an Ansible playbook as part of ovirt-engine that can be triggered manually
3. to provide an Ansible playbook as part of ovirt-engine that can be triggered from the webadmin

as this is only needed for encrypted migrations and only for upgrades from cluster-level < 4.6 to cluster-level 4.6 I would like to avoid too intrusive changes for this.
Martin/Data, what do you think?
IIUC, we currently don't provide playbook that should be executed manually as part of ovirt-engine, right? do we have such in Ansible-collection or other repo?

Comment 4 Arik 2021-04-26 07:55:57 UTC
Data -> Dana (sorry)

Comment 5 Dana 2021-04-27 11:33:08 UTC
the approach lgtm, 
continuing in reply to Liran's mail

Comment 6 Qin Yuan 2021-05-06 13:13:44 UTC
Verified with:
Before upgrade:
ovirt-engine-4.4.5.11-0.1.el8ev.noarch
vdsm-4.40.50.10-1.el8ev.x86_64
libvirt-6.6.0-13.2.module+el8.3.1+10483+85317cf0
host: kernel-4.18.0-240.22.1.el8_3.x86_64

After upgrade:
ovirt-engine-4.4.6.6-0.10.el8ev.noarch
vdsm-4.40.60.6-1.el8ev
libvirt-7.0.0-13.module+el8.4.0+10604+5608c2b4
host: kernel-4.18.0-305.el8.x86_64

Steps:
1. Prepare 4.4.5 engine, 2 rhel8.3 hosts.
2. Create a Data Center with compatiblity version 4.5 on engine.
3. Add a Cluster, enable migration encryption.
4. Add the 2 rhel8.3 hosts to the Cluster, set their names to host1, host2 respectively.
5. Create VM vm1, run it on host1.
6. Create VM vm2, run it on host2.
7. Upgrade engine to 4.4.6
8. Prepare 8.4 repos on host1, upgrade host1 on engine.
9. Prepare 8.4 repos on host2, upgrade host2 on engine.

Results:
1. Upgrade host1 from rhel8.3 to rhel8.4:
   - vm1 is successfully migrated from host1 to host2 which is rhel8.3
   - client certificate links are added on host1
   - upgrading host1 succeeds
2. Upgrade host2 from rhel8.3 to rhel8.4:
   - vm1 and vm2 are successfully migrated from host2 to host1 which is rhel8.4
   - client certificate links are added on host2
   - upgrading host2 succeeds


Note You need to log in before you can comment on or make changes to this bug.