Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1658179

Summary: Upgrade host: VM migration failed on no hosts to migrate to, while manual migration succeeded.
Product: [oVirt] ovirt-engine Reporter: Ilanit Stein <istein>
Component: GeneralAssignee: Nobody <nobody>
Status: CLOSED WORKSFORME QA Contact: meital avital <mavital>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.8CC: bugs, istein, michal.skrivanek, mperina, ratamir, Rhev-m-bugs
Target Milestone: ---Flags: rule-engine: devel_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-03 14:05:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine.log
none
vdsm.log
none
upgrade.log none

Description Ilanit Stein 2018-12-11 13:06:12 UTC
Description of problem:
On RHV-4.2.8-1, with 4.2 cluster and 2 hosts:
1. UP to date host
2. Host with older vdsm (of RHV-4.2.7-9)
   with a running VM.
   The VM is assigned to this 2nd host, and has manual & Automatic migration 
   allowed.

Upgrade Host, run on the 2nd host:
VM migration failed in the engine log on: 
2018-12-11 13:04:49,605+02 WARN  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-commandCoordinator-Thread-2) [82ce56d4-bf1e-48ea-9739-39c200941ea2] EVENT_ID: VM_MIGRATION_NO_VDS_TO_MIGRATE_TO(166), No available host was found to migrate VM golden_env_mixed_virtio_1 to.

As there was no clear reason to this migration failure,
I tried to run VM migrate from RHV UI - and that succeeded.

Right after the VM migration ended, the Upgrade host procedure continued, and the host was updated.

Version-Release number of selected component (if applicable):
RHV-4.2.8-1

How reproducible:
I didn't try to reproduce

Expected results:
a. The automatic VM migration should have succeeded.
b. Upgrade host was suppose to fail, right after the automatic VM migration failed.

Comment 1 Ilanit Stein 2018-12-11 13:06:54 UTC
Created attachment 1513369 [details]
engine.log

Comment 2 Ilanit Stein 2018-12-11 13:11:50 UTC
Created attachment 1513371 [details]
vdsm.log

Comment 3 Ilanit Stein 2018-12-11 13:12:13 UTC
Created attachment 1513372 [details]
upgrade.log

Comment 5 Michal Skrivanek 2018-12-12 07:02:13 UTC
Migration of manually migratable vms has been added only in 4.3. Any reason you’re testing it with 4.2.z? In 4.2 this is expected behavior

Comment 6 Ilanit Stein 2018-12-12 08:04:33 UTC
The bug refer actually to 2 issues:

1. A running VM that should have been migrated (automatically), further to Upgrade host, but failed to migrate.
2. Upgrade host process continues, due the VM automatic migration failed.

Regarding the first one:
The VM was defined to a specific host, 
and with 'Migration mode': "Allow manual and automatic migration."
My understand is (and please correct me if I am wrong) that 
in such case automatic VM migration should have succeeded.
However, it failed, with the error mentioned in the bug description.

Under this understanding, I simply pressed in the RHV UI on VM->Migrate, and this migration worked successfully.  
Such VM migration operation is supported of course for all RHV versions.

Comment 7 Michal Skrivanek 2018-12-12 08:19:26 UTC
sorry, commented on a wrong bug.
Yes, the VM should migrate when set to Automatic migration. It's ok if it fails though, it just should be retriggered few times. Only after that if there is really no other host which can accommodate the VM  should eventually fail/time out. It could be this waiting is not implemented for the upgrade host task. Normally the PreparingToMaintenance state is indefinite. Moving to infra for considering that.

What do you mean by "upgrade host process continues"? I see:
2018-12-11 13:04:49,796+02 ERROR [org.ovirt.engine.core.bll.hostdeploy.HostUpgradeCallback] (EE-ManagedThreadFactory-engineScheduled-Thread-59) [82ce56d4-bf1e-48ea-9739-39c200941ea2] Host 'host_mixed_2' failed to move to maintenance mode. Upgrade process is terminated.

Comment 9 Ilanit Stein 2018-12-17 10:56:15 UTC
Michal, thanks for your reply.

Regarding the migration failure:
In this RHV there are only 2 hosts, so no trials to further destination hosts is expected.
It puzzles that the VM failed to migrate automatically, while manually it worked fine.
That is, I would expect the manual migration to fail the same. 
I just reproduced this issue on my RHV, in case you are interested in investigating why the automatic migration fail? 

Regarding the Upgrade cluster process - I can't reproduce it - I suggest to consider this issue as closed.

Comment 10 Martin Perina 2019-01-03 14:05:28 UTC
Feel free to reopen if reproduced again

Comment 11 Red Hat Bugzilla 2023-09-14 04:43:38 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days