Bug 1636052

Summary: "404 Not Found" when querying images without OS selected in Create Host dialogue
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: Compute Resources - RHEVAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.4CC: inecas, ktordeur, lhellebr, mshira, orabin
Target Milestone: 6.5.0Keywords: Triaged
Target Release: Unused   
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-05-14 12:38:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
production.log none

Description Lukáš Hellebrandt 2018-10-04 10:53:15 UTC
Created attachment 1490468 [details]
production.log

Description of problem:
When creating a host in RHEV, with architecture selected and OS not selected in VM tab, selecting Image Based provisioning causes traceback.

The request is "Parameters: {"template_id"=>"null", "id"=>"1-rhev3"}" and the null causes "Fog::Ovirt::Errors::OvirtEngineError: Ovirt client returned an error: 404 Not Found". Traceback attached.

This only happens when OS hasn't been selected on the page yet. Selecting and de-selecting the OS doesn't make it reproducible.

This doesn't cause any trouble creating the host. This is NOT a 6.4 regression.

Version-Release number of selected component (if applicable):
Reproduced in Sat 6.4 AND 6.3 (with a slightly different traceback - but it's 404 again).

How reproducible:
Deterministic

Steps to Reproduce:
1. Have a RHEV with Template and in Foreman, have a CR with Image based on this Template, and some OS kickstart synced.
2. Hosts -> Create Host
3. Fill the necessary info, including CR, select architecture, do NOT select OS, select Image Based while tailing production.log.

Actual results:
Traceback

Expected results:
No traceback (no request sent at all)

Comment 2 Shira Maximov 2018-11-06 11:01:14 UTC
From the logs you provieded it seems that the 404 error related to POST method that was preform earlier: 
 
2018-10-04T06:34:08 [I|app|] Started POST "/compute_resources/1-rhev3/template_selected" for 10.34.130.227 at 2018-10-04 06:34:08 -0400
2018-10-04T06:34:08 [I|app|8a35a] Processing by ComputeResourcesController#template_selected as */*
2018-10-04T06:34:08 [I|app|8a35a]   Parameters: {"template_id"=>"null", "id"=>"1-rhev3"}
2018-10-04T06:34:08 [I|app|8a35a] Current user: admin (administrator)
2018-10-04T06:34:09 [W|app|8a35a] Action failed
Fog::Ovirt::Errors::OvirtEngineError: Ovirt client returned an error: 404 Not Found

Also, I wasn't able to reproduce this BZ, Lukas please try to reproduce again and update he BZ.

Comment 3 Lukáš Hellebrandt 2018-11-07 10:12:28 UTC
I have just reproduced this on Sat 6.4. The traceback is in production.log and I am positive that it happens when clicking "Image based".

Comment 4 Shira Maximov 2018-11-12 10:13:55 UTC
Lukas, can you please try to reproduce it on 6.5 and let me know what are the results?

Comment 5 Lukáš Hellebrandt 2018-11-12 12:44:46 UTC
Unable to reproduce on Sat 6.5 snap 3.

Comment 6 Lukáš Hellebrandt 2018-11-12 13:05:15 UTC
Verified on Sat 6.5 snap 3. Used reproducer from OP with RHEV, both API v3 and v4. The image list was empty and got filled after selecting OS. No traceback.

Comment 9 errata-xmlrpc 2019-05-14 12:38:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2019:1222