Fixes #39638 - Fix host re-registration - #11171
Open
trengri wants to merge 1 commit into
Open
Conversation
Use host_parameters association instead of direct HostParameter queries to keep association in sync. Signed-off-by: Grigory Trenin <gtrenin@gmail.com>
Contributor
|
Redmine issue - https://projects.theforeman.org/issues/39638 |
nofaralfasi
reviewed
Aug 18, 2026
Contributor
There was a problem hiding this comment.
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)?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Direct
HostParameterqueries bypass the host's association cache, causing stale data when re-registering already registered host. Use@host.host_parametersinstead to keep the association in sync.