Bug 1585092

Summary: RHEV host creation: undefined method '#params'
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: Provisioning TemplatesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Sanket Jagtap <sjagtap>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.4CC: cwelton, inecas, lhellebr, lpramuk, lzap, mhulan, mmccune, nkathole, orabin, pcreech, sjagtap, sshtein
Target Milestone: 6.4.0Keywords: Regression, Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-1.18.0.4-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-16 19:34:38 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:
Bug Depends On:    
Bug Blocks: 1572297    
Attachments:
Description Flags
v3_production.log none

Description Lukáš Hellebrandt 2018-06-01 09:44:30 UTC
Description of problem:
When creating a host on RHEV using API v3 (both through WUI and CLI), the traceback appears in production.log but the machine is created regardless.

Version-Release number of selected component (if applicable):
Sat 6.4 snap 5

How reproducible:
Deterministic

Steps to Reproduce:
# hammer host create --architecture x86_64 --compute-profile-id 1 --compute-resource-id 1 --content-source-id 1 --content-view-id 1 --domain-id 2 --environment-id 1 --interface compute_network=a1f9eb04-9b92-4940-b65f-1ba87adf9cb5,mac=00:1a:4a:16:01:a8,ip=192.168.1.111,managed=true,primary=true,provision=true --ip 192.168.1.111 --lifecycle-environment-id 1 --location-id 2 --mac 00:1a:4a:16:01:a8 --name host-hammer-image-based --operatingsystem-id 1 --organization-id 1 --partition-table-id 1 --product-id 13 --provision-method image --root-password toortoor --subnet-id 1

or do the same in the WebUI

Actual results:
'Could not create the host' in Hammer, traceback in production.log (attached), but the host is created.

Expected results:
No error message, no traceback

Additional info:
Similar but different (different traceback, host NOT actually created) issue exists for API v4, will link it once I report it.

Comment 1 Lukáš Hellebrandt 2018-06-01 09:54:34 UTC
Created attachment 1446630 [details]
v3_production.log

Comment 3 Lukáš Hellebrandt 2018-06-04 14:42:10 UTC
Also happens with API v4 if bug 1585132 doesn't happen first (i.e., if using WUI rather than CLI).

Comment 4 orabin 2018-06-12 10:53:33 UTC
It looks like the error might be related to the finish template used by the operating system that was selected for the host.

Does this happen with other compute resources? with a different template?

Comment 5 Lukáš Hellebrandt 2018-06-14 09:59:03 UTC
This just happened to me with network based provisioning.

Comment 6 Lukáš Hellebrandt 2018-06-14 10:05:42 UTC
Going to All Hosts -> <host> -> Templates -> View Finish Template leads to the white page with text:

"""
There was an error rendering the Satellite Kickstart Default Finish template: undefined method '#params' for Host::Managed::Jail (Host::Managed)
"""

... so this is not related to RHEV, it's a template issue.

Talking to lzap about this.

Comment 7 Marek Hulan 2018-06-15 19:36:19 UTC
This is caused by the fact, branding plugin templates still use all (removed) macros. BZ 1572980 will fix that. I'd recommend closing as duplicate, but if you want to keep it open to reverify image based provisioning, just please keep the status in sync with that BZ.

Comment 8 Lukas Pramuk 2018-06-26 10:14:42 UTC

*** This bug has been marked as a duplicate of bug 1572980 ***

Comment 15 Sanket Jagtap 2018-08-01 14:01:15 UTC
Build:Satellite 6.4.0 snap 14

hammer> compute-resource list
---|---------|---------
ID | NAME    | PROVIDER
---|---------|---------
1  | rhv     | RHV     
3  | rhvv4   | RHV     
2  | vmware1 | VMware  
---|---------|---------

hammer> host create --hostgroup "rhel7_hstgrp" --compute-resource-id 3 --compute-profile-id 2 --root-password dog8code --location "Default Location" --organization-id 1 --name test-me-rhvv4 --compute-attributes "start=1"
Host created.
hammer> host create --hostgroup "rhel7_hstgrp" --compute-resource-id 1 --compute-profile-id 2 --root-password dog8code --location "Default Location" --organization-id 1 --name test-me-rhvv3 --compute-attributes "start=1"
Host created.


I am able to view the templates and the RHV network provision on v3 is successful

https://sat-host/unattended/finish?hostname=test-me-rhvv3.domain

There is another issue blocking rhv v4 network provisioning https://bugzilla.redhat.com/show_bug.cgi?id=1603185

Comment 16 Bryan Kearney 2018-10-16 19:34:38 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-2018:2927