Bug #36393
closedglobal registration should not create hosts as "managed" or "to be built"
Description
When the "original" implementation of "create a host via curl" was done in 57d95c1685f28e0a52bd40fc26dd66d24adc0288, the create_host_curl
method contained "build": "false", "managed": "false"
in the payload, as this is IMHO the correct thing to do (the host is already created, so build:false is obvious, managed:false also makes sense as we do not submit enough data to create a fully managed host).
this also matches the behaviour of bootstrap.py:
https://github.com/Katello/katello-client-bootstrap/blob/master/bootstrap.py#L926
https://github.com/Katello/katello-client-bootstrap/blob/master/bootstrap.py#L936-L939
Now when things were split up into "plain Foreman" and "Foreman with Katello" in 2110556a713d53d5f09f8af35016ee92f0403572, the Katello part is missing the build:false and managed:false entries
This means that every host registration in Katello now needs to flip the machine back to "it's built" state, costing precious time during registration.
Updated by Ewoud Kohl van Wijngaarden over 1 year ago
This came up in https://community.theforeman.org/t/benchmarking-katello-using-host-registration/33495 and it's also mentioned that besides costing precious time it could even cause host rebuilds which can lead to data loss.
Updated by The Foreman Bot over 1 year ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/9746 added
Updated by The Foreman Bot over 1 year ago
- Assignee set to Ewoud Kohl van Wijngaarden
- Pull request https://github.com/theforeman/foreman/pull/9788 added
Updated by The Foreman Bot over 1 year ago
- Pull request https://github.com/theforeman/foreman/pull/9789 added
Updated by Leos Stejskal over 1 year ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|7c4128649ea125f799389eb0dec24a847e3b8416.
Updated by Ewoud Kohl van Wijngaarden over 1 year ago
- Triaged changed from No to Yes