Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Can't push images to OpenShift Local clusters (ssh key name issue) #495

Open
danivilla9 opened this issue Jan 21, 2025 · 0 comments
Open

Comments

@danivilla9
Copy link
Collaborator

General information

  • OS: Linux Fedora
  • Hypervisor:
  • Did you run crc setup before starting it? Yes
  • Running CRC on: Laptop

CRC version

CRC version: 2.46.0+8f40e8
OpenShift version: 4.17.10
MicroShift version: 4.17.10

CRC status

vel debug
DEBU CRC version: 2.46.0+8f40e8                   
DEBU OpenShift version: 4.17.10                   
DEBU MicroShift version: 4.17.10                  
DEBU Running 'crc status'                         
CRC VM:                  Running
MicroShift:              Running (v4.17.10)
RAM Usage:               4.492GB of 16.1GB
Disk Usage:              1.596GB of 4.09GB (Inside the CRC VM)
Persistent Volume Usage: 0B of 15GB (Allocated)
Cache Usage:             5.49GB
Cache Directory:         /home/myuser/.crc/cache

Steps to reproduce

  1. Setup and run a crc cluster from podman desktop
  2. Pull an image, e.g.: registry.access.redhat.com/ubi8/httpd-24
  3. Restart podman desktop (the option to push the image to the cluster won't appear otherwise)
  4. Dropdown menu on the pulled image, push it to OpenShift Local cluster

Expected

The selected image is pushed to the OpenShift Local cluster, and a notification of the success of the operation appears

Actual

The image is not pushed to the OpenShift Local cluster, and a notification with this text appears:

Error while pushing image registry.access.redhat.com/ubi8/httpd-24 to OpenShift Local cluster: Cannot connect to Podman. Please verify your connection to the Linux system using podman system connection list, or try podman machine init and podman machine start to manage a new Linux VM Error: unable to connect to Podman socket: failed to read identity "/home/myuser/.crc/machines/crc/id_ecdsa": open /home/myuser/.crc/machines/crc/id_ecdsa: no such file or directory: ssh://[email protected]:2222/run/podman/podman.sock

I've tried this process in a Windows machine as well and the result is exactly the same. From my research and talk with a crc developer, it's very likely that an update that changed the type of encryption for the ssh keys broke the push method:

From image-handler.ts, line 56:

         const result = await runCliCommand(
          getPodmanCli(),
          [
            '--url=ssh://[email protected]:2222/run/podman/podman.sock',
            `--identity=${os.homedir()}/.crc/machines/crc/id_ecdsa`,
            'load',
            '-i',
            filename,
          ],
          { env },
        );

The method is expecting the ssh key to be called id_ecdsa, but from recent updates the name of the generated ssh key is id_ed25519

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant