Project

General

Profile

Actions

Bug #37433

closed

Cloudinit default generates invalid yaml output

Added by Joniel Pasqualetto 8 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Unattended installations
Target version:
-
Fixed in Releases:
Found in Releases:

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:

https://github.com/theforeman/foreman/blob/develop/app/views/unattended/provisioning_templates/snippet/redhat_register.erb#L99

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


Related issues 2 (0 open2 closed)

Related to Foreman - Bug #37766: Revert #37433 indentation for subscription_manager_setupClosedLeos StejskalActions
Related to Foreman - Bug #36525: kickstart's RHSM line only works on RHEL hostsClosedEwoud Kohl van WijngaardenActions
Actions #1

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
Actions #2

Updated by The Foreman Bot 7 months ago

  • Pull request https://github.com/theforeman/foreman/pull/10200 added
Actions #3

Updated by The Foreman Bot 5 months ago

  • Fixed in Releases 3.12.0 added
Actions #4

Updated by Joniel Pasqualetto 5 months ago

  • Status changed from Ready For Testing to Closed
Actions #5

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)
Actions #6

Updated by Ewoud Kohl van Wijngaarden 4 months ago

  • Category set to Unattended installations
  • Triaged changed from No to Yes
Actions #7

Updated by Shimon Shtein 4 months ago

  • Red Hat JIRA set to SAT-25042
Actions #8

Updated by Leos Stejskal 4 months ago

  • Related to Bug #37766: Revert #37433 indentation for subscription_manager_setup added
Actions #9

Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/theforeman/foreman/pull/10289 added
Actions #10

Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/theforeman/foreman/pull/10292 added
Actions #11

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.

Actions #12

Updated by Ewoud Kohl van Wijngaarden 4 months ago

  • Related to Bug #36525: kickstart's RHSM line only works on RHEL hosts added
Actions #13

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
Actions #14

Updated by The Foreman Bot 4 months ago

  • Fixed in Releases 3.10.1 added
Actions #15

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.

Actions

Also available in: Atom PDF