Details
-
Bug
-
Resolution: Done-Errata
-
Major
-
None
-
False
-
-
False
-
CLOSED
-
---
-
---
-
CNV Virtualization Sprint 220, CNV Virtualization Sprint 221, CNV Virtualization Sprint 222, CNV Virtualization Sprint 223
-
High
Description
Description of problem:
If the pod hosting a VM is killed, when the pod is recreated and the VM restarted, the SSH keys have been changed thereby triggering a known_hosts mismatch error to a user logging in.
Version-Release number of selected component (if applicable):
OCP 4.10.12 (SNO); CNV 4.10.0
How reproducible:
Reliably
Steps to Reproduce:
1. Create RHEL VM from template
2. Log in to VM and accept host key... note creation dates of host keys in `/etc/ssh`
3. Stop and Start (or Restart) the VM from the Actions drop-down on the VM Details screen.
4. Log in and see known_hosts error
5. Delete known_hosts key and log in and see SSH keys with later creation dates
Actual results:
SSH keys are regenerated when VM is restarted from the UI and known_hosts error results. This could potentially result in increased concern from the owner of a VM that crashes unexpectedly.
Expected results:
After VM reboots, user can log in the same SSH keys still exist.
Additional info:
If the VM is rebooted from "inside the VM" with `reboot` command, this problem does not exist. Only when restarted from the OCP console. It appears to be because restarting from the OCP console recreates the pod which changes the instance_id in cloud-init which triggers cloud-init to re-run its init processes.