Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove hosts from local inventory by (unique) name instead of hostname during checkin #356

Merged

Conversation

tpapaioa
Copy link
Collaborator

@tpapaioa tpapaioa commented Mar 3, 2025

In some cases, the hostname attribute is not set or available on AAP hosts. For example:

Id | Hostname              | Name
0  | Unknown               | tpapaioa-AAP-MR1
1  | Unknown               | tpapaioa-AAP-MR2
2  | host1.example.com     | tpapaioa-rhel-9.5-3

If I check in one of these hosts, then broker removes all of them from inventory.yaml, instead of just the one that was removed from AAP:

$ broker checkin 0
[....]
$ broker inventory
Id | Hostname              | Name
0  | host1.example.com     | tpapaioa-rhel-9.5-3

This PR updates Broker.checkin() to pass the host's unique name attribute instead, so that only the given hosts are removed from the inventory.

@tpapaioa tpapaioa requested a review from JacobCallahan March 3, 2025 17:10
@tpapaioa tpapaioa self-assigned this Mar 3, 2025
@JacobCallahan JacobCallahan merged commit b69161a into SatelliteQE:master Mar 3, 2025
5 checks passed
@tpapaioa tpapaioa deleted the use_host_name_in_checkin branch March 3, 2025 18:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants