Skip to content

Commit

Permalink
Fixes #36393 - Do not rebuild managed hosts in registration
Browse files Browse the repository at this point in the history
  • Loading branch information
stejskalleos committed Jun 22, 2023
1 parent cb88310 commit 62f0ea9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/controllers/api/v2/registration_controller.rb
Expand Up @@ -92,7 +92,9 @@ def host
return
end

@host.setBuild
# Do not rebuild managed hosts
# https://bugzilla.redhat.com/show_bug.cgi?id=2212630
@host.setBuild unless @host.managed?
safe_render(@template)
end

Expand Down
Expand Up @@ -123,8 +123,9 @@ echo "#"
register_katello_host(){
UUID=$(subscription-manager identity | head -1 | awk '{print $3}')
curl --silent --show-error --cacert $KATELLO_SERVER_CA_CERT --request POST "<%= @registration_url %>" \
--data "uuid=$UUID" \
<%= headers.join(' ') %> \
--data "uuid=$UUID" \
--data "host[build]=false" \
<%= " --data 'host[organization_id]=#{@organization.id}' \\\n" if @organization -%>
<%= " --data 'host[location_id]=#{@location.id}' \\\n" if @location -%>
<%= " --data 'host[hostgroup_id]=#{@hostgroup.id}' \\\n" if @hostgroup -%>
Expand Down

0 comments on commit 62f0ea9

Please sign in to comment.