Bug 1999619 - cloudinit is malformatted if a user sets a password during VM creation flow
Summary: cloudinit is malformatted if a user sets a password during VM creation flow
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.9
Hardware: Unspecified
OS: Unspecified
medium
urgent
Target Milestone: ---
: 4.10.0
Assignee: Matan Schatzman
QA Contact: Leon Kladnitsky
URL:
Whiteboard:
Depends On:
Blocks: 2023285
TreeView+ depends on / blocked
 
Reported: 2021-08-31 12:54 UTC by Ruth Netser
Modified: 2022-03-10 16:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:06:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10057 0 None Merged Bug 1999619: #cloud-config is now added to yaml 2021-11-07 13:30:06 UTC
Github openshift console pull 10319 0 None closed Bug 2021405: [e2e][automation] VM creation wizard Cloud Init editor 2021-12-08 10:50:11 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:06:50 UTC

Description Ruth Netser 2021-08-31 12:54:39 UTC
Description of problem:
Setting a password during VM creation in the customization flow will result in a malformed cloudinit section; password will not be set.

Version-Release number of selected component (if applicable):
OCP 4.9.0-fc.0, CNV 4.9.0

How reproducible:
100%

Steps to Reproduce:
1. Create a VM from template
2. Select the customize flow
3. Set a password in the cloudinit screen

Actual results:
- `#cloud-config` line is removed.
- When the VM is started, the following error appears:
2021-08-31 08:32:02,407 - __init__.py[WARNING]: Unhandled non-multipart (text/x-not-multipart) userdata: 'user: cloud-user\npasswor...'
- It is impossible to login with the selected password.


Expected results:
cloudinit should be well formatted.

Additional info:
==== Wrong format - VM created with customization ====
        - cloudInitNoCloud:
            userData: |
              user: fedora
              password: fedora
              chpasswd:
                expire: false
              ssh_authorized_keys:
                - ''

==== Good format - VM created without customization ====

        - cloudInitNoCloud:
            userData: |-
              #cloud-config
              user: fedora
              password: fyl3-q66d-p3ik
              chpasswd: { expire: False }
          name: cloudinitdisk

Comment 4 errata-xmlrpc 2022-03-10 16:06:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:0056


Note You need to log in before you can comment on or make changes to this bug.