Bug 1636067

Summary: APIv4 - "undefined method `href' for false:FalseClass" while importing a VM
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: Compute Resources - RHEVAssignee: orabin
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: egolov, inecas, lhellebr, mshira, orabin
Target Milestone: 6.6.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.21.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-22 19:48:12 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 11:56:42 UTC
Created attachment 1490486 [details]
production.log

Description of problem:
When importing a VM, I get the error message: "Failed to update a compute rhev4 (RHV) instance elena-claro.example.com: undefined method `href' for false:FalseClass".
This does NOT happen when creating a new host with the same values that import would pre-fill.

Version-Release number of selected component (if applicable):
Noticed this in snap 25. At some point before in 6.4, it worked.

How reproducible:
Deterministic

Steps to Reproduce:
1. Infra -> CR -> <cr> -> VMs -> <vm> -> Import
2. Fill in the rest of the form
3. Submit

Actual results:
Fail, error, traceback

Expected results:
Machine added to VM, no error, no traceback

Additional info:
Traceback attached

Comment 1 Lukáš Hellebrandt 2018-10-04 12:51:50 UTC
This only happened to me with CR using APIv4.

Comment 5 orabin 2018-10-28 06:22:14 UTC
This was fixed by the fix for: https://bugzilla.redhat.com/show_bug.cgi?id=1578021 which is now ON_QA so I'm moving this as well.

Comment 6 orabin 2018-10-28 13:35:44 UTC
I was able to reproduce this even with the fix with image based provisioning.

Comment 7 orabin 2018-10-28 13:43:22 UTC
Connecting redmine issue https://projects.theforeman.org/issues/25328 from this bug

Comment 8 Bryan Kearney 2019-03-12 10:00:33 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25328 has been resolved.

Comment 9 Lukáš Hellebrandt 2019-05-29 14:34:11 UTC
Ori, how is this BZ related to the issue you linked in comment 7? If it's caused by different issue, I suggest creating a separate BZ from it.

Comment 10 orabin 2019-05-30 13:09:25 UTC
I thought originally this was related only to: https://bugzilla.redhat.com/show_bug.cgi?id=1578021
but I found there was another value getting false and that was fixed.

There were 2 PRs fixing boolean values but version 1.1.5 of fog-ovirt contains both.

Comment 12 Lukáš Hellebrandt 2019-08-02 10:55:45 UTC
Verified with Sat 6.6 snap 13, using reproducer from OP (both Managed and Unmanaged host).

Comment 13 Bryan Kearney 2019-10-22 19:48:12 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:3172