Activation in hostgroup causes error in Kickstart Default template

Hello, we’re using image based deployments and cannot use the ‘kt_activation’ host parameter. Declaring an activation gives us this error:

There was an error rendering the Kickstart default template: Safemode doesn’t allow to access ‘repository_url’ on #Safemode::ScopeObject

The problem lines in the ‘Kickstart Default’ templage related to this section:

<%
if host_param(‘kickstart_liveimg’)
img_name = host_param(‘kickstart_liveimg’)
liveimg_url = if host_param(‘kt_activation_keys’)
repository_url(img_name, ‘isos’)
else
if img_name.match(%r|^([\w-+]+)://|)
img_name
else
“#{medium_uri}/#{img_name}”
end
end
%>
liveimg --url=<%= liveimg_url %> <%= proxy_string %>

What Katello version are you running?

There is an issue for this which has already been patched: Bug #37268: Error undefined method `repository_url' when trying to use composed images for system deployments - Katello - Foreman

It should be in current (or pending) versions of Katello 4.11 and 4.12.

I’ve got Katello-4.11, and from the bug report you posted, looks like I have to wait for 4.13.

We’ve got a workaround for now… We don’t use any activations in the hostgroup, instead we’ve added extra parameters that perform the same function for the ‘redhat_register’ snippet.