-
Sub-task
-
Resolution: Done
-
Undefined
-
None
Description of problem:
As per the Jira SAT-25042 the issue is resolved in 6.16, post upgrading the satellite to 6.16.z, the same exception is visible in the client logs
How reproducible:
100%
Is this issue a regression from an earlier version:
Yes ( but for freeipa_register snippet )
Steps to Reproduce:
- Install Satellite 6.16
- Enable Realm feature
- Configure realm capsule
- Configure satellite for Image Based deployment on VMware with Realm capsule selected
- Try a build on VMware via Userdata\cloudinit method with realm capsule selected
Actual behavior:
Bad indentation on the rendered output, resulting in invalid yaml, which cloud-init can't process properly. This is because of the freeipa_register snippet
Exception:
Cloud init logs the following in /var/log/cloud-init-output.log on the host:
2024-11-27 12:43:49,330 - util.py[DEBUG]: Attempting to load yaml from string of length 18548 with allowed root types (<class 'dict'>,) 2024-11-27 12:43:49,341 - util.py[WARNING]: Failed loading yaml blob. Invalid format at line 3 column 1: "while parsing a block mapping in "<unicode string>", line 3, column 1: hostname: rhel9.example.com ^ expected <block end>, but found '<scalar>' in "<unicode string>", line 278, column 7: /usr/libexec/openssh/sshd-keygen rsa ^" 2024-11-27 12:43:49,357 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-ddbf4be1cbc4572284/user-data.txt.i - wb: [600] 18747 bytes 2024-11-27 12:44:17,617 - __init__.py[DEBUG]: Calling handler CloudConfigPartHandler: [['text/cloud-config', 'text/cloud-config-jsonp']] (text/cloud-config, part-001, 3) with frequency always 2024-11-27 12:44:17,617 - util.py[DEBUG]: Attempting to load yaml from string of length 18548 with allowed root types (<class 'dict'>,) 2024-11-27 12:44:17,626 - util.py[WARNING]: Failed loading yaml blob. Invalid format at line 3 column 1: "while parsing a block mapping in "<unicode string>", line 3, column 1: hostname: rhel9.example.com ^ expected <block end>, but found '<scalar>' in "<unicode string>", line 278, column 7: /usr/libexec/openssh/sshd-keygen rsa ^" 2024-11-27 12:44:17,626 - cloud_config.py[WARNING]: Failed at merging in cloud config part from part-001: empty cloud config 2024-11-27 12:44:17,627 - __init__.py[DEBUG]: Calling handler CloudConfigPartHandler: [['text/cloud-config', 'text/cloud-config-jsonp']] (__end__, None, 3) with frequency always 2024-11-27 12:44:17,627 - util.py[DEBUG]: Writing to /var/lib/cloud/instances/i-ddbf4be1cbc4572284/cloud-config.txt - wb: [600] 77 bytes
here in this if-else block https://github.com/theforeman/foreman/blob/develop/app/views/unattended/provisioning_templates/snippet/freeipa_register.erb#L21-L35 the `freeipa_client=` part is indented too much perhaps and we may have some other issues inside the snippet indentation as well.
Expected behavior:
- Valid yaml output, so cloud-init will finish the provisioning properly
- Every snippet mentioned in the cloud-init template should work properly.
Business Impact / Additional info:
However, applying the resolution from the KBASE , but for the freeipa_register snippet, fixes the issue.
QE Tracker for https://issues.redhat.com/browse/SAT-35582