Bug 1793988

Summary: [REST API] copyhostnetwork operation failure detail message is not formatted with values
Product: [oVirt] ovirt-engine Reporter: msheena
Component: BLL.NetworkAssignee: eraviv
Status: CLOSED CURRENTRELEASE QA Contact: msheena
Severity: low Docs Contact:
Priority: low    
Version: 4.4.0CC: bugs, dholler, mburman
Target Milestone: ovirt-4.4.0Flags: pm-rhel: ovirt-4.4+
Target Release: 4.4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:03:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description msheena 2020-01-22 13:03:46 UTC
Description of problem
======================
Given I have two hosts
When I perform a copyhostnetwork operation from one to the other
And the operation is illegal - e.g: hosts that are not in the same cluster, or copying from a source host to a destination host that does not have enough free NICs to accommodate attachments
Then the operation fails as expected, but in the response, there appears an unformatted detail message.

Version-Release number of selected component (if applicable)
============================================================
ovirt-engine-4.4.0-0.14.master.el7.noarch

How reproducible
================
100%

Steps to Reproduce
==================
1. perform an illegal copyhostnetworks operation, such as those described above.

Actual results
==============
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action>
    <fault>
        <detail>[Cannot ${action} ${type}. Hosts are not in the same cluster.]</detail>
        <reason>Operation Failed</reason>
    </fault>
    <source_host id="fc97377a-11ea-4df9-8e13-8f0b400cbcf3"/>
    <status>failed</status>
</action>

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<action>
    <fault>
        <detail>[Cannot ${action} ${type}. Interface count of destination host has to be at least as high as that of the source host.]</detail>
        <reason>Operation Failed</reason>
    </fault>
    <source_host id="fc97377a-11ea-4df9-8e13-8f0b400cbcf3"/>
    <status>failed</status>
</action>

Expected results
================
The <detail> section should contain a formatted message and not a template String.

Comment 1 msheena 2020-05-12 10:57:54 UTC
Verified on
===========
ovirt-engine-4.4.0-0.37.master.el8ev.noarch

Comment 2 Sandro Bonazzola 2020-05-20 20:03:25 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.