Bug #37433
closedCloudinit default generates invalid yaml output
Description
Description of problem:
Starting on Satellite 6.15, the template cloudinit default generates an invalid yaml output.
This breaks the usage of cloud-init for provisioning.
This used to work until Satellite 6.14
How reproducible:
Always
Is this issue a regression from an earlier version:
Yes
Steps to Reproduce:
1. Create a host and assign an activation key to it (without the activation key, the broken part of the template is not processed)
2. Render the cloudinit default template for that host
3. Check the rendered template and you'll that's not a valid yaml. Indentation is wrong.
Actual behavior:
Bad indentation on the rendered output, resulting in invalid yaml, which cloud-init can't process properly.
Expected behavior:
Valid yaml output, so cloud-init will finish the provisioning properly
Business Impact / Additional info:
Problem comes from the snippet redhat_register. Until 6.14, all the code was inside the snippet itself. On 6.15, we introduced a new snippet (which is called inside redhat_register) to configure subscription-manager. That snippet is not being called with an indentation option and the result is the bad indentation.
Here's the line:
Adding a simple indent(2) when calling the new snippet subscription_manager_setup is enough to fix the problem.
Red Hat issue -> https://issues.redhat.com/browse/SAT-25042
Updated by The Foreman Bot 8 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/10153 added
Updated by The Foreman Bot 6 months ago
- Pull request https://github.com/theforeman/foreman/pull/10200 added
Updated by Joniel Pasqualetto 5 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|aa8f66f2f442602f48980fb037c003d13addc9ce.
Updated by The Foreman Bot 5 months ago
- Pull request deleted (
https://github.com/theforeman/foreman/pull/10153, https://github.com/theforeman/foreman/pull/10200)
Updated by Ewoud Kohl van Wijngaarden 4 months ago
- Category set to Unattended installations
- Triaged changed from No to Yes
Updated by Leos Stejskal 4 months ago
- Related to Bug #37766: Revert #37433 indentation for subscription_manager_setup added
Updated by The Foreman Bot 4 months ago
- Pull request https://github.com/theforeman/foreman/pull/10289 added
Updated by The Foreman Bot 4 months ago
- Pull request https://github.com/theforeman/foreman/pull/10292 added
Updated by Ewoud Kohl van Wijngaarden 4 months ago
- Status changed from Closed to New
- Fixed in Releases deleted (
3.12.0)
Reopening since the commit was reverted.
Some additional information: I think bf03a259a7e6fd65207b9a40639bb99e0e507dd8 unintentionally resolved this issue. Looking at #36525 it should be resolved in Foreman 3.11.0, but that should be verified.
Updated by Ewoud Kohl van Wijngaarden 4 months ago
- Related to Bug #36525: kickstart's RHSM line only works on RHEL hosts added
Updated by The Foreman Bot 4 months ago
- Status changed from New to Ready For Testing
- Assignee set to Shimon Shtein
- Pull request https://github.com/theforeman/foreman/pull/10295 added
Updated by Ewoud Kohl van Wijngaarden 3 months ago
- Status changed from Ready For Testing to Closed
This should have been closed but Redmine doesn't close issues on stable branches.