Skip to content

[BUG] ssh runner times out #3334

Open
Open
@LucienBrule

Description

@LucienBrule

General information

  • OS: Linux
  • Hypervisor: KVM under ESXI
  • Did you run crc setup before starting it (Yes/No)? Yes
  • Running CRC on: VM

CRC version

CRC version: 2.8.0+9afa0b95
OpenShift version: 4.11.1
Podman version: 4.1.1

CRC status

[developer@devbox]~% crc status --log-level debug
DEBU CRC version: 2.8.0+9afa0b95
DEBU OpenShift version: 4.11.1
DEBU Podman version: 4.1.1
DEBU Running 'crc status'
DEBU Checking file: /home/developer/.crc/machines/crc/.crc-exist
DEBU Checking file: /home/developer/.crc/machines/crc/.crc-exist
DEBU Found binary path at /home/developer/.crc/bin/crc-driver-libvirt
DEBU Launching plugin server for driver libvirt
DEBU Plugin server listening at address 127.0.0.1:36001
DEBU () Calling .GetVersion
DEBU Using API Version 1
DEBU () Calling .SetConfigRaw
DEBU () Calling .GetMachineName
DEBU (crc) Calling .GetBundleName
DEBU (crc) Calling .GetState
DEBU (crc) DBG | time="2022-09-06T09:50:38-04:00" level=debug msg="Getting current state..."
DEBU (crc) DBG | time="2022-09-06T09:50:38-04:00" level=debug msg="Fetching VM..."
DEBU (crc) Calling .GetIP
DEBU (crc) DBG | time="2022-09-06T09:50:38-04:00" level=debug msg="GetIP called for crc"
DEBU (crc) DBG | time="2022-09-06T09:50:38-04:00" level=debug msg="Getting current state..."
DEBU (crc) DBG | time="2022-09-06T09:50:38-04:00" level=debug msg="IP address: 192.168.130.11"
DEBU (crc) Calling .GetIP
DEBU (crc) DBG | time="2022-09-06T09:50:38-04:00" level=debug msg="GetIP called for crc"
DEBU (crc) DBG | time="2022-09-06T09:50:38-04:00" level=debug msg="Getting current state..."
DEBU (crc) DBG | time="2022-09-06T09:50:38-04:00" level=debug msg="IP address: 192.168.130.11"
DEBU Running SSH command: df -B1 --output=size,used,target /sysroot | tail -1
DEBU Using ssh private keys: [/home/developer/.crc/machines/crc/id_ecdsa /home/developer/.crc/cache/crc_libvirt_4.11.1_amd64/id_ecdsa_crc]
DEBU SSH command results: err: <nil>, output: 32737570816 13514244096 /sysroot
DEBU authentication operator is still progressing, Reason: OAuthServerDeployment_NewGeneration
DEBU Making call to close driver server
DEBU (crc) Calling .Close
DEBU Successfully made call to close driver server
DEBU Making call to close connection to plugin binary
DEBU (crc) DBG | time="2022-09-06T09:50:40-04:00" level=debug msg="Closing plugin on server side"
CRC VM:          Running
OpenShift:       Starting (v4.11.1)
Podman:
Disk Usage:      13.51GB of 32.74GB (Inside the CRC VM)
Cache Usage:     34.13GB
Cache Directory: /home/developer/.crc/cache

CRC config

[developer@devbox]~% crc config view
- consent-telemetry                     : yes
- cpus                                  : 8
- enable-shared-dirs                    : false
- kubeadmin-password                    : developer
- nameserver                            : 1.1.1.1
- pull-secret-file                      : /home/developer/pull-secret.txt

Host Operating System

NAME="Fedora Linux"
VERSION="36 (Server Edition)"
ID=fedora
VERSION_ID=36
VERSION_CODENAME=""
PLATFORM_ID="platform:f36"
PRETTY_NAME="Fedora Linux 36 (Server Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:36"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f36/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=36
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=36
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Server Edition"
VARIANT_ID=server

kernel: 5.18.19-200.fc36.x86_64

Steps to reproduce

  1. Install ESXI 7
  2. Create Fedora 36 VM from ESXI console with iso
  3. Install operating system
  4. Get shell into os
  5. install crc
  6. run crc setup
  7. run crc start

Expected

crc start doesn't time out.

Actual

crc start hangs when attempting to get ssh access to the VM.
The timeout is only 300 seconds as per https://github.com/code-ready/crc/blob/main/pkg/crc/machine/start.go#L335

Solution

I pulled the code and made the timeout 10000 seconds. After waiting about 15 minutes, it came up and finished installing successfully.

Etc

So I monitored the crc vm with cockpit, when booting it hangs for about 10 minutes at 'Booting RHEL FCOS' (the first line before it goes into console spam mode/systemd). Of interest, other VMs run under KVM don't have this long boot time problem, including the stock FCOS image. So my fix of increasing the timeout works for now but perhaps there's something that can be done about the boot time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    nested-virtTo identify issues that are related to nested virtualization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions