crc-org / crc-extension

Red Hat OpenShift Local Extension for integration of OpenShift Local clusters with Podman Desktop
Apache License 2.0
12 stars 16 forks source link

[BUG] Installation and start do not result in a working environment #189

Closed odockal closed 2 months ago

odockal commented 7 months ago

General information

CRC version

# Put `crc version` output here
CRC version: 2.28.0+e1f42d
OpenShift version: 4.13.14
Podman version: 4.4.4

CRC status

# Put `crc status --log-level debug` output here
CRC VM:          Running
MicroShift:      Unreachable (v4.13.14)
RAM Usage:       455.3MB of 3.828GB
Disk Usage:      4.554GB of 16.1GB (Inside the CRC VM)
Cache Usage:     87.19GB
Cache Directory: C:\Users\Ondrej\.crc\cache

CRC config

# Put `crc config view` output here
- consent-telemetry                     : no
- preset                                : microshift
- pull-secret-file                      : C:\Users\Ondrej\crc\pull-secret

Host Operating System

# Put the output of `cat /etc/os-release` in case of Linux
# put the output of `sw_vers` in case of Mac
# Put the output of `systeminfo` in case of Windows
Windows 10 Professional
10.0.19045 N/A Build 19045

Steps to reproduce

  1. Install OpenShift local extension into podman desktop (1.6.0-next)
  2. Install Openshift local via dashboard
  3. Confirm that you will reboot the PC after installation is done
  4. Installation done, I choose Microshift preset
  5. Error dialog appeared notifying me at the end of the long message, that I have to reboot
  6. Rebooting the PC
  7. Back again, all is running (PD)
  8. Initialize and start OpenShift local in Dashboard
  9. Assert:

Expected

Microshift is started/running, no error

Actual

OpenShift Local start error: Error: Error running post start: Post "http://unix/add": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

MicroshiftStartError

Logs

Before gather the logs try following if that fix your issue

$ crc delete -f
$ crc cleanup
$ crc setup
$ crc start --log-level debug

Please consider posting the output of crc start --log-level debug on http://gist.github.com/ and post the link in the issue.

odockal commented 7 months ago

When I click OK. I can see that OSLocal on Dashboard shows that microshift is running. On Settings -> Resources -> OpenShift Local I do not have any option to do anything with the cluster (nor stop or delete button is present).

On cli:

CRC VM:          Running
MicroShift:      Unreachable (v4.13.14)
RAM Usage:       435.3MB of 3.828GB
Disk Usage:      4.557GB of 16.1GB (Inside the CRC VM)
Cache Usage:     87.19GB
Cache Directory: C:\Users\Ondrej\.crc\cache
gbraad commented 7 months ago

Can you try this with a slightly older version of PD? Perhaps recent changes have broken the lifecycle of the extension, as no changes have been made to the extension for over a few months.

gbraad commented 7 months ago

Can you otherwise confirm if a start from the commandline works? If not, this is not related to the extension. As,

MicroShift:      Unreachable (v4.13.14)

seems a start was triggered, but not finished properly.

gbraad commented 7 months ago

can you add the full output of systeminfo here?

gbraad commented 7 months ago

was this a clean install?

Error dialog appeared notifying me at the end of the long message, that I have to reboot

as reboots are only necessary for the sitution when the user gets added to the "Hyper-V Admins" group

gbraad commented 7 months ago

When I click OK. I can see that OSLocal on Dashboard shows that microshift is running.

On Settings -> Resources -> OpenShift Local I do not have any option to do anything with the cluster (nor stop or delete button is present).

CRC VM:          Running
MicroShift:      Unreachable (v4.13.14)

@evidolob how is the state determined for 'running'? Since when 'unreachable' the cluster for sure is not operational...

gbraad commented 7 months ago

This issue describes multiple individual issues:

adrianriobo commented 7 months ago

So I tested this on a fresh environment win 11 pro 23h2 with latest pre-release PD version:

  1. Click on install Openshift Local

  2. Go through OL installer (normally, when tested OL without PD, it ends up with a reboot popup, in this case it does not) <- This could be an issue: installer flow run from PD close the installer without allowing reboot through the installer reboot popup/alert)

  3. Flow goes back to PD which shows a dialog telling we need to reboot but it directly execute the setup which ends up on a error <- Is the dialog here on purpose b/c the installer popup is not shown?, then should we automatically proceed with the setup ?

To check what is the current state here are the last lines for the logs:

crc.log

time="2023-11-23T12:41:21Z" level=info msg="Checking admin helper service is running"
time="2023-11-23T12:41:21Z" level=debug msg="Running '(Get-Service crcAdminHelper).Status'"
time="2023-11-23T12:41:21Z" level=debug msg="Get \"http://unix/version\": open \\\\.\\pipe\\crc-admin-helper: Access is denied."

PD dialog logs:

msg="Checking if the daemon task is running" level=info msg="Running the daemon task" level=info msg="Checking admin helper service is running" Make sure you installed crc using the Windows installer and performed required reboot

Which summarizes in a reboot was required (because the user/group management on the installation process) before running the setup but the flow does not allow us to do it

odockal commented 7 months ago

@gbraad @adrianriobo thanks for looking into this!

gbraad commented 6 months ago

but the flow does not allow us to do it

The reboot has always been an issue; the installers we use can actually request this when needed; but can't be enforced. This is something the extension needs to handle by picking this need up and enforce before use.

gbraad commented 6 months ago

Also, it might be best for the extension to actually check the message and show a custom 'modal' dialog for this.

adrianriobo commented 6 months ago

How about change the options when running msiexec at https://github.com/crc-org/crc-extension/blob/main/src/install/win-install.ts#L44 then if installer dialogs are not hidding we will allow the user to decide if wants to reboot or not?