Skip to content

Fixes #39638 - Fix host re-registration - #11171

Open
trengri wants to merge 1 commit into
theforeman:developfrom
trengri:39638-fix-re-register
Open

Fixes #39638 - Fix host re-registration#11171
trengri wants to merge 1 commit into
theforeman:developfrom
trengri:39638-fix-re-register

Conversation

@trengri

@trengri trengri commented Aug 17, 2026

Copy link
Copy Markdown

Direct HostParameter queries bypass the host's association cache, causing stale data when re-registering already registered host. Use @host.host_parameters instead to keep the association in sync.

Use host_parameters association instead of direct HostParameter
queries to keep association in sync.

Signed-off-by: Grigory Trenin <gtrenin@gmail.com>
@vijaysawant

Copy link
Copy Markdown
Contributor

Redmine issue - https://projects.theforeman.org/issues/39638

@nofaralfasi nofaralfasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the RM and community post and the fix approach looks correct (association-cache issue).
I still can’t reproduce locally with the community command/run sequence, so I can’t independently confirm the failure path in my environment.

Could we add a regression test that reproduces the reported scenario (same host, second registration, force=true, update_packages=false)? That would make the fix verifiable regardless of environment differences.

Also, can we confirm the create vs build change is safe for any registration path where setBuild is not called (e.g. host[managed]=true)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants