Bug 1999621 - Empty ssh_authorized_keys entry is added to VM's cloudinit if created from a customize flow
Summary: Empty ssh_authorized_keys entry is added to VM's cloudinit if created from a ...
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
high
Target Milestone: ---
: 4.10.0
Assignee: Matan Schatzman
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-31 12:58 UTC by Ruth Netser
Modified: 2022-03-10 16:06 UTC (History)
3 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 10102 0 None open Bug 1999621: Removed ssh_authorized_keys empty array 2021-09-19 12:37:18 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:58:54 UTC
Description of problem:
VM creation in the customization flow - empty ssh_authorized_keys entry is added to VM's cloudinit; it is not added in the wizard flow.

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

Actual results:
The following is added to cloudinit:
              ssh_authorized_keys:
                - ''


Expected results:
If no keys are added by the user, this section should not be added.

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 1 Guohua Ouyang 2021-09-01 07:00:04 UTC
It probably has the same cause with bug https://bugzilla.redhat.com/show_bug.cgi?id=1996630

Comment 5 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.