PTable Snippets are not found anymore after upggrade

Problem:
I upgraded our Foreman dev instance from 1.16/Katello 3.5 to 1.20/3.9. Since then out ptables do not render anymore. The Templates use snippets, but I get the error that “The specified snippet ‘<ptable_snippet_name>’ does not exist, or is not a snippet.” I doublecked that all Information is correct and that the correct org/loc are assigned but cannot find any errors. Creating a new ptable with a new snippet works just fine though.

Expected outcome:
Our preexisting ptables render and the snippets are found.

Foreman and Proxy versions:
Foreman 1.20.1
Proxy: 1.20.1

Foreman and Proxy plugin versions:
tfm-rubygem-hammer_cli_foreman_tasks-0.0.13-1.fm1_20.el7.noarch
foreman-postgresql-1.20.1-1.el7.noarch
foreman-installer-katello-3.9.1-1.el7.noarch
foreman-cli-1.20.1-1.el7.noarch
foreman-installer-1.20.1-1.el7.noarch
tfm-rubygem-foreman_bootdisk-14.0.0-1.fm1_20.el7.noarch
foreman-selinux-1.20.1-1.el7.noarch
foreman-vmware-1.20.1-1.el7.noarch
foreman-debug-1.20.1-1.el7.noarch
tfm-rubygem-foreman-tasks-0.14.3-1.fm1_20.el7.noarch
rubygem-foreman_maintain-0.3.0-1.el7.noarch
tfm-rubygem-foreman_hooks-0.3.15-1.fm1_20.el7.noarch
foreman-release-scl-7-2.el7.noarch
tfm-rubygem-foreman-tasks-core-0.2.5-2.fm1_20.el7.noarch
foreman-1.20.1-1.el7.noarch
tfm-rubygem-foreman_discovery-14.0.0-1.fm1_20.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.4-4.el7.noarch
tfm-rubygem-foreman_docker-4.1.0-2.fm1_20.el7.noarch
tfm-rubygem-foreman_remote_execution-1.6.7-1.fm1_20.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.15.1-1.el7.noarch
foreman-compute-1.20.1-1.el7.noarch
foreman-proxy-1.20.1-1.el7.noarch
tfm-rubygem-foreman_scc_manager-1.4.0-3.fm1_20.el7.noarch
tfm-rubygem-foreman_remote_execution_core-1.1.4-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-7.el7.noarch
tfm-rubygem-foreman_templates-6.0.3-2.fm1_20.el7.noarch
foreman-release-1.20.1-1.el7.noarch
tfm-rubygem-foreman_snapshot_management-1.5.0-3.fm1_20.el7.noarch

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)
Stacktrace production.log:

[W|app|c3d06] There was an error rendering the <kickstart template name> template: 
RuntimeError: The specified snippet '<ptable_snippet_name>' does not exist, or is not a snippet.
/usr/share/foreman/lib/foreman/renderer/scope/macros/snippet_rendering.rb:18:in `snippet'
<ptable name>:4:in `get_binding'
/opt/rh/rh-ruby25/root/usr/share/ruby/erb.rb:885:in `eval'
/opt/rh/rh-ruby25/root/usr/share/ruby/erb.rb:885:in `result'
/usr/share/foreman/lib/foreman/renderer/unsafe_mode_renderer.rb:7:in `render'
/usr/share/foreman/lib/foreman/renderer/base_renderer.rb:16:in `render'
/usr/share/foreman/lib/foreman/renderer.rb:47:in `render'
/usr/share/foreman/app/models/host/managed.rb:357:in `diskLayout'
<kickstart template name>:87:in `get_binding'
/opt/rh/rh-ruby25/root/usr/share/ruby/erb.rb:885:in `eval'
/opt/rh/rh-ruby25/root/usr/share/ruby/erb.rb:885:in `result'
/usr/share/foreman/lib/foreman/renderer/unsafe_mode_renderer.rb:7:in `render'
/usr/share/foreman/lib/foreman/renderer/base_renderer.rb:16:in `render'
/usr/share/foreman/lib/foreman/renderer.rb:47:in `render'
/usr/share/foreman/app/models/template.rb:173:in `render'
/usr/share/foreman/app/controllers/unattended_controller.rb:193:in `safe_render'
/usr/share/foreman/app/controllers/unattended_controller.rb:114:in `render_template'
/usr/share/foreman/app/controllers/unattended_controller.rb:65:in `host_template'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:194:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.7.1/lib/audited/sweeper.rb:14:in `around'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.7.1/lib/audited/sweeper.rb:14:in `around'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:136:in `run_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `block in instrument'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `instrument'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:134:in `process'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/rendering.rb:32:in `process'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal.rb:191:in `dispatch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal.rb:252:in `dispatch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `serve'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:840:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.14/lib/apipie/static_dispatcher.rb:65:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.14/lib/apipie/extractor/recorder.rb:137:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/usr/share/foreman/lib/middleware/telemetry.rb:9:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.14/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:8:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/tempfile_reaper.rb:15:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/etag.rb:25:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/conditional_get.rb:25:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/head.rb:12:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/usr/share/foreman/lib/middleware/logging_context.rb:23:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:232:in `context'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:226:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/rack/logger.rb:38:in `call_app'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/rack/logger.rb:28:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/lib/katello/prevent_json_parsing.rb:12:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/method_override.rb:22:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/runtime.rb:22:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/secure_headers-6.0.0/lib/secure_headers/middleware.rb:13:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/engine.rb:524:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `public_send'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `method_missing'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/urlmap.rb:68:in `block in call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `call'
/usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
/usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
/usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
/usr/share/passenger/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

ptable template:

<%#
WARNING: Template wird in git verwaltet, Änderungen werden in foreman überschrieben
kind: ptable
name: <name>
oses:
- CentOS 5
- CentOS 6
- CentOS 7
- Fedora 16
- Fedora 17
- Fedora 18
- Fedora 19
- Fedora 20
- RedHat 5
- RedHat 6
- RedHat 7
%>
#Dynamic - this line tells Foreman this is a script rather then a static layout

<%= snippet '<ptable_snippet_name' %>

ptable snippet:

<%#
WARNUNG: Template wird in git verwaltet, Änderungen werden in foreman überschrieben
kind: ptable
snippet: true
name: <ptable_snippet_name>
%>
<%
  noexec_string = host_param_true?('tmp-exec') ? '' : 'noexec,'
  nosuid_string = host_param_true?('tmp-suid') ? '' : 'nosuid,'
%>

if [ -e /dev/sdb ]; then
  lsblk /dev/sdb | egrep 'lvm|part'
  if [ $? -ne 0 ] ; then
    PARTSDB=1
    PARTDRIVES="sda,sdb"
  else
    PARTSDB=0
    PARTDRIVES="sda"
  fi
else
  PARTDRIVES="sda"
fi

if [ -e /dev/sdc ]; then
  DISKS=`lsblk -d|grep disk|grep -v fd0|awk '{print $1}'|sort|tail -n+3`
  DISKLINE=`for disk in ${DISKS} ; do echo -n "${disk}," ; done | sed 's/,$//'`
  echo "ignoredisk --drives=${DISKLINE}" > /tmp/diskpart.cfg
fi
cat <<EOF >> /tmp/diskpart.cfg
zerombr
clearpart --drives=${PARTDRIVES} --all --initlabel

part /boot --fstype=ext4 --size=750 --ondrive=sda

part pv.01 --size=1000 --grow --ondrive=sda
volgroup system pv.01

logvol /var --vgname=system --name=var --size=9728 --fstype=ext4
logvol /var/log/audit --vgname=system --name=var_log_audit --size=500 --fstype=ext4
logvol /tmp --vgname=system --name=tmp --size=<%= host_param('size_tmp') || '1024' %> --fsoptions=<%= noexec_string %><%= nosuid_string %>nodev --fstype=ext4
logvol swap --vgname=system --name=swap --size=2048
logvol / --vgname=system --name=root --size=1024 --grow --fstype=ext4
EOF

if [ -n "${PARTSDB}" ] ; then
  if [ $PARTSDB -eq 1 ] ; then
  cat <<EOF >> /tmp/diskpart.cfg

part pv.02 --ondrive=sdb --size=1000 --grow
volgroup data pv.02

logvol /var/log --vgname=data --name=var_log --size=1024 --fstype=ext4
logvol /var/crash --vgname=data --name=var_crash --size=4096 --fstype=ext4
logvol /home --vgname=data --name=home --size=1024 --fstype=ext4
logvol /opt/lhm --vgname=data --name=app --size=10 --fstype=ext4

EOF
  else
  cat <<EOF >> /tmp/diskpart.cfg

logvol /var/log --vgname=data --name=var_log --noformat
logvol /var/crash --vgname=data --name=var_crash --noformat
logvol /home --vgname=data --name=home --noformat
logvol /opt/lhm --vgname=data --name=app --noformat

EOF
  fi
fi

I anonymized our template/snippet names, otherwise everything is unchanged.

Any help on where to look would be appreciated.

Check taxonomy, they must be associated with the correct organization as host/hostgroup/template.

I checked again and the snippets/templates seem to be assigned to the correct organization/location.
In UI the correct ones are displayed an when I switch to those from any/any context, I do still see them.

Why you have the disallowed < character there? If you changed the pastes, just paste them unchanged. This must work.

Yes, I changed that line to anonymize our names. Here is what it actually looks like:

<%= snippet 'lhm_formating_default' %>

So, I tested a bit more and have figured out that also newly created templates don’t work with snippets.
As soon as the snippet function is called in a partition table template, I get the error mentioned in the first post. A syntax error I made when creating new templates led me to think it would work because the kickstart rendered, when actually it did not and just printed out some text because I forgot the <%= %> around that snippet function.
So basically, no partition tables that call the snippet function work, and I always get the error

There was an error rendering the Test Kickstart template: RuntimeError: The specified snippet 'test_snippet' does not exist, or is not a snippet.

Kickstart template is the name of the ks template and test_snippet is the name of the ptable snippet.

I know in one of the recent versions the altered/added to the metadata needed for snippets and provisioning templates to work. I had to rework/revamp tons of them on my end to get foreman to use them again. Look at the community templates repo for more examples - but a snippet needs:

<%#
kind: snippet
name: partition-dhcpd-vg01
model: ProvisioningTemplate
snippet: true
%>

and a Provisioning Template needs:
<%#
kind: provision
name: provision-rhel7_lab
model: ProvisioningTemplate
oses:

  • RedHat 7
    %>

“model” was/is net-new for stuff now. Try adding that correctly for all your various item(s) and see if it helps?

I tried updating my templates and reimported them, but this also did not fix my problems.

Here is what the used templates currently look like:

Ptable:

<%#
WARNING: Template wird in git verwaltet, Änderungen werden in foreman überschrieben
kind: ptable
name: LHM Partition App
model: Ptable
oses:
- CentOS 5
- CentOS 6
- CentOS 7
- Fedora 16
- Fedora 17
- Fedora 18
- Fedora 19
- Fedora 20
- RedHat 5
- RedHat 6
- RedHat 7
%>
#Dynamic - this line tells Foreman this is a script rather then a static layout

<%= snippet 'lhm_formating_default' %>

Snippet:

<%#
WARNUNG: Template wird in git verwaltet, Änderungen werden in foreman überschrieben
kind: snippet
snippet: true
model: Ptable
name: lhm_formating_default
description: this will configure your host networking, it configures your primary interface as well
    as other configures NICs. It supports physical, VLAN and Alias interfaces. It's intended to be
    called from %post in your kickstart template. Note that this snippet can be used with Foreman 1.7
    and later
%>
<%
  noexec_string = host_param_true?('tmp-exec') ? '' : 'noexec,'
  nosuid_string = host_param_true?('tmp-suid') ? '' : 'nosuid,'
%>

if [ -e /dev/sdb ]; then
  lsblk /dev/sdb | egrep 'lvm|part'
  if [ $? -ne 0 ] ; then
    PARTSDB=1
    PARTDRIVES="sda,sdb"
  else
    PARTSDB=0
    PARTDRIVES="sda"
  fi
else
  PARTDRIVES="sda"
fi

if [ -e /dev/sdc ]; then
  DISKS=`lsblk -d|grep disk|grep -v fd0|awk '{print $1}'|sort|tail -n+3`
  DISKLINE=`for disk in ${DISKS} ; do echo -n "${disk}," ; done | sed 's/,$//'`
  echo "ignoredisk --drives=${DISKLINE}" > /tmp/diskpart.cfg
fi
cat <<EOF >> /tmp/diskpart.cfg
zerombr
clearpart --drives=${PARTDRIVES} --all --initlabel

part /boot --fstype=ext4 --size=750 --ondrive=sda

part pv.01 --size=1000 --grow --ondrive=sda
volgroup system pv.01

logvol /var --vgname=system --name=var --size=9728 --fstype=ext4
logvol /var/log/audit --vgname=system --name=var_log_audit --size=500 --fstype=ext4
logvol /tmp --vgname=system --name=tmp --size=<%= host_param('size_tmp') || '1024' %> --fsoptions=<%= noexec_string %><%= nosuid_string %>nodev --fstype=ext4
logvol swap --vgname=system --name=swap --size=2048
logvol / --vgname=system --name=root --size=1024 --grow --maxsize=7168 --fstype=ext4
EOF

if [ -n "${PARTSDB}" ] ; then
  if [ $PARTSDB -eq 1 ] ; then
  cat <<EOF >> /tmp/diskpart.cfg

part pv.02 --ondrive=sdb --size=1000 --grow
volgroup data pv.02

logvol /var/log --vgname=data --name=var_log --size=1024 --fstype=ext4
logvol /var/crash --vgname=data --name=var_crash --size=4096 --fstype=ext4
logvol /home --vgname=data --name=home --size=1024 --fstype=ext4
logvol /opt/lhm --vgname=data --name=app --size=10 --fstype=ext4

EOF
  fi
fi

When trying to render the ks, I still get the error

There was an error rendering the LHM Kickstart RHEL template: The specified snippet 'lhm_formating_default' does not exist, or is not a snippet.

Run this:

foreman-rake console

s = ProvisioningTemplate.unscoped.find_by_name("lhm_formating_default")
s.organizations.pluck(:name)

t = ProvisioningTemplate.unscoped.find_by_name("LHM Partition App")
t.organizations.pluck(:name)

I tried that and it does not look correct to me…

foreman-rake console
/usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP
/usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/content_facet_host_extensions.rb:7: warning: already initialized constant Katello::Concerns::ContentFacetHostExtensions::ERRATA_STATUS_MAP
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/content_facet_host_extensions.rb:7: warning: previous definition of ERRATA_STATUS_MAP was here
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/content_facet_host_extensions.rb:14: warning: already initialized constant Katello::Concerns::ContentFacetHostExtensions::TRACE_STATUS_MAP
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/content_facet_host_extensions.rb:14: warning: previous definition of TRACE_STATUS_MAP was here
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:13: warning: already initialized constant Katello::Concerns::SubscriptionFacetHostExtensions::SUBSCRIPTION_STATUS_MAP
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:13: warning: previous definition of SUBSCRIPTION_STATUS_MAP was here
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:21: warning: already initialized constant Katello::Concerns::SubscriptionFacetHostExtensions::SLA_STATUS_MAP
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:21: warning: previous definition of SLA_STATUS_MAP was here
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:26: warning: already initialized constant Katello::Concerns::SubscriptionFacetHostExtensions::USAGE_STATUS_MAP
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:26: warning: previous definition of USAGE_STATUS_MAP was here
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:31: warning: already initialized constant Katello::Concerns::SubscriptionFacetHostExtensions::ROLE_STATUS_MAP
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:31: warning: previous definition of ROLE_STATUS_MAP was here
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:36: warning: already initialized constant Katello::Concerns::SubscriptionFacetHostExtensions::ADDONS_STATUS_MAP
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:36: warning: previous definition of ADDONS_STATUS_MAP was here
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:41: warning: already initialized constant Katello::Concerns::SubscriptionFacetHostExtensions::PURPOSE_STATUS_MAP
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/app/models/katello/concerns/subscription_facet_host_extensions.rb:41: warning: previous definition of PURPOSE_STATUS_MAP was here
Loading production environment (Rails 5.2.1)
Failed to load console gems, starting anyway
irb(main):001:0> s = ProvisioningTemplate.unscoped.find_by_name("lhm_formating_default")
=> nil
irb(main):002:0> s.organizations.pluck(:name)
Traceback (most recent call last):
        2: from lib/tasks/console.rake:5:in `block in <top (required)>'
        1: from (irb):2
NoMethodError (undefined method `organizations' for nil:NilClass)
irb(main):003:0>
irb(main):004:0> t = ProvisioningTemplate.unscoped.find_by_name("LHM Partition App")
=> nil
irb(main):005:0> t.organizations.pluck(:name)
Traceback (most recent call last):
        2: from lib/tasks/console.rake:5:in `block in <top (required)>'
        1: from (irb):5
NoMethodError (undefined method `organizations' for nil:NilClass)

Do you have any Provision Templates loaded in your database? This must find at least the (locked) default template:

 ProvisioningTemplate.unscoped.find_by_name("PXELinux global default")

Probably do:

 ProvisioningTemplate.unscoped.count

That works on my end:

irb(main):011:0> ProvisioningTemplate.unscoped.find_by_name("PXELinux global default")
=> #<ProvisioningTemplate id: 1, name: "PXELinux global default", template: "<%#\nkind: PXELinux\nname: PXELinux global default\nm...", snippet: false, template_kind_id: 1, created_at: "2016-06-22 16:00:31", updated_at: "2018-12-17 15:16:59", locked: true, default: true, vendor: "Foreman", type: "ProvisioningTemplate", os_family: nil, job_category: nil, provider_type: nil, description_format: nil, execution_timeout_interval: nil>
irb(main):012:0> ProvisioningTemplate.unscoped.count
=> 113

Should Partition Tables be listed unter Provisioning templates? That sounds a little odd to me since they are seperated everywhere else afaik.

This may be related to https://github.com/theforeman/foreman/pull/6430 testing of patch appreciated.

I tested the patch and am still seeing the same errors.

Also I could not spot any differences in the stacktrace, but to be sure, here is the one after applying the patch:

[W|app|53b7d] There was an error rendering the LHM Kickstart RHEL template: 
RuntimeError: The specified snippet 'lhm_formating_default' does not exist, or is not a snippet.
/usr/share/foreman/lib/foreman/renderer/scope/macros/snippet_rendering.rb:18:in `snippet'
LHM Partition App:4:in `get_binding'
/opt/rh/rh-ruby25/root/usr/share/ruby/erb.rb:885:in `eval'
/opt/rh/rh-ruby25/root/usr/share/ruby/erb.rb:885:in `result'
/usr/share/foreman/lib/foreman/renderer/unsafe_mode_renderer.rb:7:in `render'
/usr/share/foreman/lib/foreman/renderer/base_renderer.rb:16:in `render'
/usr/share/foreman/lib/foreman/renderer.rb:47:in `render'
/usr/share/foreman/app/models/host/managed.rb:360:in `diskLayout'
LHM Kickstart RHEL:88:in `get_binding'
/opt/rh/rh-ruby25/root/usr/share/ruby/erb.rb:885:in `eval'
/opt/rh/rh-ruby25/root/usr/share/ruby/erb.rb:885:in `result'
/usr/share/foreman/lib/foreman/renderer/unsafe_mode_renderer.rb:7:in `render'
/usr/share/foreman/lib/foreman/renderer/base_renderer.rb:16:in `render'
/usr/share/foreman/lib/foreman/renderer.rb:47:in `render'
/usr/share/foreman/app/models/template.rb:173:in `render'
/usr/share/foreman/app/controllers/unattended_controller.rb:193:in `safe_render'
/usr/share/foreman/app/controllers/unattended_controller.rb:114:in `render_template'
/usr/share/foreman/app/controllers/unattended_controller.rb:65:in `host_template'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:194:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/application_shared.rb:15:in `set_timezone'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.7.1/lib/audited/sweeper.rb:14:in `around'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.7.1/lib/audited/sweeper.rb:14:in `around'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:136:in `run_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `block in instrument'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `instrument'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:134:in `process'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionview-5.2.1/lib/action_view/rendering.rb:32:in `process'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal.rb:191:in `dispatch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_controller/metal.rb:252:in `dispatch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `serve'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:840:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.14/lib/apipie/static_dispatcher.rb:65:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.14/lib/apipie/extractor/recorder.rb:137:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/usr/share/foreman/lib/middleware/telemetry.rb:9:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.5.14/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:8:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/tempfile_reaper.rb:15:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/etag.rb:25:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/conditional_get.rb:25:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/head.rb:12:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/usr/share/foreman/lib/middleware/logging_context.rb:23:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:232:in `context'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/session/abstract/id.rb:226:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/rack/logger.rb:38:in `call_app'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/rack/logger.rb:28:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.1/lib/katello/prevent_json_parsing.rb:12:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/method_override.rb:22:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/runtime.rb:22:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/sendfile.rb:111:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/secure_headers-6.0.0/lib/secure_headers/middleware.rb:13:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/engine.rb:524:in `call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `public_send'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `method_missing'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/urlmap.rb:68:in `block in call'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `each'
/opt/theforeman/tfm-ror52/root/usr/share/gems/gems/rack-2.0.5/lib/rack/urlmap.rb:53:in `call'
/usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
/usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
/usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
/usr/share/passenger/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
/opt/theforeman/tfm/root/usr/share/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2019-01-23T14:51:41 [I|app|53b7d]   Rendering text template
2019-01-23T14:51:41 [I|app|53b7d]   Rendered text template (0.0ms)
2019-01-23T14:51:41 [I|app|53b7d] Completed 500 Internal Server Error in 248ms (Views: 0.6ms | ActiveRecord: 40.3ms)

Can you check if this ::Template.unscoped.where(name: 'lhm_formating_default', snippet: true).first returns your snippet?

Yes, that does find miy snippet:

irb(main):002:0> ::Template.unscoped.where(name: 'lhm_formating_default', snippet: true).first
=> #<Ptable id: 94, name: "lhm_formating_default", template: "<%#\nWARNUNG: Template wird in git verwaltet, Änder...", snippet: true, template_kind_id: nil, created_at: "2016-09-14 11:03:26", updated_at: "2019-01-21 09:53:57", locked: false, default: false, vendor: nil, type: "Ptable", os_family: nil, job_category: "Miscellaneous", provider_type: nil, description_format: nil, execution_timeout_interval: nil>

Can you show me what this returns? Host.find(<your_host_id>).disk_layout_source

Sure:

irb(main):006:0> Host.find(530).disk_layout_source
=> #<Foreman::Renderer::Source::String:0x000000000b6b2b40 @name="LHM Partition App", @content="<%#\nWARNING: Template wird in git verwaltet, Änderungen werden in foreman überschrieben\nkind: ptable\nname: LHM Partition App\nmodel: Ptable\noses:\n- CentOS 5\n- CentOS 6\n- CentOS 7\n- Fedora 16\n- Fedora 17\n- Fedora 18\n- Fedora 19\n- Fedora 20\n- RedHat 5\n- RedHat 6\n- RedHat 7\n%>\n#Dynamic - this line tells Foreman this is a script rather then a static layout\n\n<%= snippet 'lhm_formating_default' %>\n", @available_snippets=[]>

Are you sure you applied the patch (maybe only the first commit, I added a new one 3h ago)? :slight_smile: With my patch it should return Foreman::Renderer::Source::Database object.

1 Like

Perhaps would also be a good idea to remind that you need to restart the apache server for the new code to be loaded :wink:

1 Like