Bug #37720
closedHost remains in build mode during registration when setup_insights is set to true
Description
When using global registration method to register a system and setup_insights is set to true, The registration process will terminate immediately after completing the execution of "insights-client --register" and the host never exists from build mode.
Based on the recent internal discussions, It's happening because of how we execute the whole `register_katello_host` function i.e. straightaway pipe it to bash. The current working hypothesis is that insights-client somehow hijacks the pipe that is used to pass the inner script into bash. And hence needed to find out a way to feed the whole function to some different way to bash and execute it.
The best way to do so is to pass the function content as virtual file to bash e.g.
instead of
register_katello_host | bash
we can do
bash <(register_katello_host)
And that allows the execution to complete without any issues
Updated by The Foreman Bot about 2 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/10267 added
Updated by Sayan Das about 2 months ago
- Category set to Host registration
- Difficulty set to easy
Updated by Sayan Das about 2 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|e80d5558767bb713c13264e821122baea577af76.
Updated by Ewoud Kohl van Wijngaarden about 1 month ago
- Triaged changed from No to Yes