Red Hat Bugzilla – Bug 1466417
Can't Provision Vm via V3 (using ovirt gem)
Last modified: 2017-07-30 09:22:02 EDT
Description of problem:
When trying to provision a Vm an error occurs.
MIQ(ManageIQ::Providers::Redhat::InfraManager::Provision#provision_error) [[Ovirt::UsageError]: ] encountered during phase [start_clone_task]
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Provision a Vm on rhv 4.0.7
Vm successfully provisioned.
The reason for the error (as found by Juan Hernandez) is that the oVirt gem sends the wrond header: "xml" instead of "application/xml" and the rhv Application server stopped accepting this header.
A workaround to make this work is to configure the RHV web server so that it fixes the incorrect headers sent by CFME. To do so go to the RHV engine machine and do the following:
# cat >> /etc/httpd/conf.d/fix-api-content-type.conf <<.
RequestHeader edit Content-Type ^xml$ application/xml
RequestHeader edit Accept ^xml$ application/xml
# systemctl restart httpd
The change in behaviour is caused by the replacement in CFME of the 'mime-types' gem with 'mini_mime':
Stub mini-mime in for mime-types
The difference is that 'mime_types' doesn't convert 'xml' to 'application/xml', which is expected by 'rest-client' and also by the 'ovirt' gem:
# Produces nil:
# Produces application/xml:
This has been merged only to the CFME master branch, and not backported, so it won't affect released versions of CFME. I am lowering the severity as it does not affect released versions. We will still need to modify the 'ovirt' gem to explicitly use 'application/xml', but only for the master branch of CFME.
I am also removing the cfme-5.7.z and cfme-5.8.z flag, as this only affects the CFME master, not any released version (assuming that the change to use 'mini_mime' won't be backported).
Jason, can you confirm that the change to 'mini_mime' won't be backported?
The proposed solution to this issue is the following pull request:
Use 'application/xml' explicitly
The following pull request updates the oVirt provider to use version 0.17.1 of the 'ovirt' gem that contains the fix:
Use 'ovirt' >= 0.17.1