Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1156223

Summary: Kickstart templates can't be rendered when safemode_render = true
Product: Red Hat OpenStack Reporter: Dan Sneddon <dsneddon>
Component: rubygem-staypuftAssignee: Brad P. Crochet <brad>
Status: CLOSED EOL QA Contact: Omri Hochman <ohochman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: Foreman (RHEL 6)CC: dsneddon, mburns, morazi, srevivo
Target Milestone: ---Keywords: Reopened, ZStream
Target Release: Installer   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-29 13:38:48 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 from Foreman server none

Description Dan Sneddon 2014-10-23 21:38:58 UTC
Created attachment 950073 [details]
production.log from Foreman server

Description of problem:
Kickstart templates cannot be rendered, the following error is thrown:
"There was an error rendering the Kickstart RHEL default template: undefined method '!' for Safemode::Jail (TrueClass)"
This happens both in the GUI (Host => Templates => Provisioning Template => Review), or in the Kickstart fetch that happens at provisioning time.

Version-Release number of selected component (if applicable):
rubygem-staypuft 0.4.6 (2014-10-17.1)

How reproducible:


Steps to Reproduce:
1. Install RHEL-OSP-Installer from http://download.lab.bos.redhat.com/rel-eng/OpenStack/Foreman/2014-10-17.1/RHEL-6-Server-OS-Foreman.repo
2. Configure deployment
3. Discover Hosts
4. View host=>Templates=>Provisioning Template=>Review OR attempt to deploy

Actual results:
Kickstart does not render, instead the error is given "There was an error rendering the Kickstart RHEL default template: undefined method '!' for Safemode::Jail (TrueClass)"

Expected results:
The Kickstart file should render even when safemode_render is on

Additional info:
This may be a manifestation of a previously fixed bug 1116951 (https://bugzilla.redhat.com/show_bug.cgi?id=1116951).

Setting the safemode_render to false results in the Kickstart being rendered. The Kickstart didn't work, however, I got the error in parse-kickstart "Unknown command: rpm" and the deployment fails. This may be a separate bug.

Comment 3 Dan Sneddon 2014-10-24 00:44:54 UTC
I tried this again with the latest Poodle published today and found the same behavior. The Poodle used for installing rhel-osp-server was http://ayanami.boston.devel.redhat.com/poodles/rhos-devel-ci/foreman.el6/2014-10-23.2/Foreman-RHEL-6.repo

Comment 4 Dan Sneddon 2014-10-24 02:28:01 UTC
Something that both of the tests I ran had in common was that I edited the Kickstart RHEL default provisioning template. I didn't test beforehand to see if the bug only comes up if you edit and update the Kickstart file.

Comment 5 Mike Burns 2014-10-28 12:19:44 UTC
Hi Dan,

I tried this with a stock, ootb kickstart and it works correctly.  I would guess it's something in the changes you've made.

Comment 6 Mike Burns 2014-10-28 12:45:17 UTC
OK, I reproduced this.

Seems to happen when either bonding or vlans are involved (not sure which since I have both).

Comment 8 Brad P. Crochet 2014-10-29 11:37:30 UTC
Dan, 

What edits did you make to the kickstart?

Were you using bonds and vlans together?

Because of Safemode, you can't add just anything to the kickstart. I am unable to reproduce any form of this particular error, so my guess is that it is something in the kickstart edits that you made. 

Please try again without making the edits. If you can reproduce it, I will need more info about the networking settings that you are using.

Comment 9 Dan Sneddon 2014-10-29 16:05:53 UTC
I made the following changes to the kickstart:

1) Added, right above the "update local time":

#install rhos-release
rpm -ihv http://team.virt.bos.redhat.com/repos/rhos-release/rhos-release-latest.noarch.rpm
rhos-release 5

2) changed selinux --enforcing to selinux --permissive

I ran into these problems after only these changes, before configuring any bonding or vlans.

Comment 11 Jaromir Coufal 2016-09-29 13:38:48 UTC
Closing list of bugs for RHEL OSP Installer since its support cycle has already ended [0]. If there is some bug closed by mistake, feel free to re-open.

For new deployments, please, use RHOSP director (starting with version 7).

-- Jaromir Coufal
-- Sr. Product Manager
-- Red Hat OpenStack Platform

[0] https://access.redhat.com/support/policy/updates/openstack/platform