Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-36225

Dynamic injection of SSH keys does not configure the proper username at vm creation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • CNV v4.15.0
    • CNV v4.14.1
    • CNV User Interface
    • None
    • Quality / Stability / Reliability
    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • CNV v4.15.0.rhel9-2147
    • No

      Description of problem:

      When creating a vm from a template in OpenShift 4.14, it is possible for the dynamic ssh key injection to configure the wrong user. This occurs only when creating the VM from a template in the UI. 
      
      This issue is triggered by configuring the sections in the "Scripts" area of the "Customize and create VM" UI screen out of order. If you first select and add the dynamic SSH key and then change the Cloud-init section, the two parts will not match up. 

      Version-Release number of selected component (if applicable):

      4.14.1

      How reproducible:

      every time

      Steps to Reproduce:

      1. From the OpenShift Console, select Virtualization, then Create a new VM from template
      2. Select Red Hat Enterprise Linux 9
      3. Select Customize VirtualMachine
      4. Select "Customize VirtualMachine parameters"
      5. Select "Scripts"
      6. FIRST Add an authorized SSH Key
      7. NEXT Select Dynamic SSH key injection
      8. FINALLY select "edit" for the Cloud-Init and change the user to "test"
      9. Click Apply
      10. Click "Create VirtualMachine"
      
      You can then validate in the YAML that the template.spec.accessCredentials.sshPublicKey.propagationMethod.qemuGuestAgent.users is set to "cloud-user" and not the "test" user set in template.spec.volumes.cloudInitConfigDrive.userData

      Actual results:

      Wrong user names in the accessCredentials and CloudInitConfigDrive do not match

      Expected results:

      user names in the accessCredentials and CloudInitConfigDrive should match

      Additional info:

       

              mschatzm@redhat.com Matan Schatzman
              mdeneve@redhat.com Mark DeNeve
              Guohua Ouyang Guohua Ouyang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: