Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-23671 host_enc macro fails to process data when using image based provisioning
  3. SAT-27996

[QE] host_enc macro fails to process data when using image based provisioning

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • Provisioning Templates
    • To Do

      Description of problem:

      When creating a host that uses image based provisioning, if one of the needed templates uses the macro "host_enc" it fails with following error:

      2024-02-29T15:00:55 [E|app|1c4c3394] Failed to save: Render user data template for louie-lessen.example.com task failed with the following error: undefined method `content_view' for nil:NilClass

      Version-Release number of selected component (if applicable):

      Satellite 6.14

      How reproducible:

      Steps to Reproduce:
      1. Create an image associated with a compute resource. Select the "user data" checkbox.

      2. Associate the template "Kickstart default user data" to the operating system used by the image

      3. Try creating a host using the image above

      Actual results:

      Error to render the user data template.

      Expected results:

      Template to render successfully

      Additional info:
      The block that breaks the template in this specific example is this:

      <% if host_enc['parameters']['realm'] && @host.realm && (@host.realm.realm_type == 'FreeIPA' || @host.realm.realm_type == 'Red Hat Identity Management') -%>
      <%= snippet 'freeipa_register' %>
      <% end -%>

      I ran tests and it happens anytime host_enc is called. Removing that reference from the template allow it to render, but that's not a solution (however, works fine as a workaround)

      QE Tracker for https://issues.redhat.com/browse/SAT-23671
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2267118

              rhn-support-sganar Shubham Ganar
              satellite-jira-automation@redhat.com Satellite Jira-Automation
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: