Bug 1644613

Summary: Instance evacuation error
Product: Red Hat CloudForms Management Engine Reporter: Danylo Kholodov <dkholodo>
Component: ProvidersAssignee: Alexander Demicev <ademicev>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Ovadia <iovadia>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.9.5CC: dmetzger, gblomqui, gdubreui, hkataria, iovadia, jfrey, jhardy, jprause, lavenel, maufart, mpovolny, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.11.0Flags: dkholodo: automate_bug-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1658480 1673199 (view as bug list) Environment:
OSP 14
Last Closed: 2019-12-13 14:55:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1658480, 1673199    
Attachments:
Description Flags
error
none
evm.log
none
production.log
none
evacuating_error
none
evm_5_10_0_32.log none

Description Danylo Kholodov 2018-10-31 09:11:07 UTC
Created attachment 1499269 [details]
error

Description of problem:
Instance evacuation error

Version-Release number of selected component (if applicable):
CFME 5.9.5.3

How reproducible:
Always

Pre-condition:
Setup with 2*compute nodes, external Ceph.
Instance should be already provisioned.
The source node (where the instance is assigned) must be down

[root@sealusa12 ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 7     undercloud-0                   running
 24    compute-0                      running
 25    controller-1                   running
 26    controller-0                   running
 27    controller-2                   running
 31    ceph-1                         running
 32    ceph-2                         running
 33    cfme_5.9.5.3                   running
 34    ceph-0                         running
 -     compute-1                      shut off


Steps to Reproduce:
1. Go to Compute -> Clouds -> Instances
2. Select an instance 
3. Lifecycle -> Evacuate selected Instances
4. "Auto-select Host?" and "On Shared Storage" checkbox are enabled
5. Click Submit

Actual results:
"Evacuating Instance test2instance failed: Invalid input for field/attribute evacuate. Value: {u'onSharedStorage': True}. Additional properties are not allowed (u'onSharedStorage' was unexpected)"

Expected results:
Instance evacuated successfully 

Additional info:
Screenshot and log are in attachment

Comment 2 Danylo Kholodov 2018-10-31 09:11:45 UTC
Created attachment 1499270 [details]
evm.log

Comment 3 Danylo Kholodov 2018-10-31 09:12:15 UTC
Created attachment 1499272 [details]
production.log

Comment 5 Sam Lucidi 2018-10-31 19:54:35 UTC
It looks like this is due to onSharedStorage being removed as a parameter in the 2.14 release of the Nova API, and Nova having doing strict validation of the parameters: https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/evacuate.py

Gilles, I'm not quite sure how Fog deals with microversions. Is this something we can detect and change behavior based on?

Comment 7 Ido Ovadia 2018-11-04 11:04:31 UTC
Reproduced on 5.10:
=================== 
CFME 5.10.0.21

Comment 8 Gilles Dubreuil 2018-11-05 03:46:40 UTC
Responding to Sam comment#5

Microversions is supported on per service basis.

For Compute/Nova up to microversion 2.15 [1] is currently supported by fog-openstack v1.0.5 as well as v0.3.x and v 0.1.28.

In the current way fog-openstack handles microversions, when a given request is interface changed than the related method must handle the various microversion cases, up to the latest supported on.

So for evacuate we could filter like this:
https://github.com/fog/fog-openstack/pull/463


[1]https://github.com/fog/fog-openstack/blob/master/lib/fog/openstack/compute/compute.rb#L5

Comment 9 Gilles Dubreuil 2018-11-07 00:22:31 UTC
Fog-openstack release v0.1.29 contain the microversion patch.

The following PR bumps manageiq-providers-openstack: https://github.com/ManageIQ/manageiq-providers-openstack/pull/391

Comment 11 Danylo Kholodov 2018-11-26 15:25:27 UTC
Verified on CFME 5.10.0.24

Comment 21 Danylo Kholodov 2019-01-17 12:39:41 UTC
Failed_QA at CFME 5.10.0.32

Screenshot and logs are in attachment

Comment 22 Danylo Kholodov 2019-01-17 12:41:13 UTC
Created attachment 1521265 [details]
evacuating_error

Comment 23 Danylo Kholodov 2019-01-17 12:41:56 UTC
Created attachment 1521266 [details]
evm_5_10_0_32.log

Comment 27 Ido Ovadia 2019-08-19 14:11:00 UTC
Verified
========
5.11.0.19