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

crc status should provide information on the preset used #3626

Open
slemeur opened this issue May 3, 2023 · 9 comments
Open

crc status should provide information on the preset used #3626

slemeur opened this issue May 3, 2023 · 9 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@slemeur
Copy link

slemeur commented May 3, 2023

I've restarted an instance of OpenShift Local. No idea what is the preset

crc status should provide information on the preset used

@slemeur slemeur added kind/bug Something isn't working status/need triage labels May 3, 2023
@praveenkumar
Copy link
Member

@slemeur we don't expose the preset as part of human readable status but it is part of json which is used by the tools ( like podman desktop and VS extensions). To end user if they use the podman preset then there would be no openshift version as part of status and for microshift/okd/openshift preset there is openshift version and that is what user more interested if the openshift is running or not and api is accessible instead preset. preset is important on tooling side so it is part of json output.

$ ./crc status -ojson
{
  "success": true,
  "crcStatus": "Running",
  "openshiftStatus": "Running",
  "openshiftVersion": "4.12.9",
  "diskUsage": 19659599872,
  "diskSize": 32737570816,
  "cacheUsage": 303515336903,
  "cacheDir": "/home/prkumar/.crc/cache",
  "ramSize": 9398726656,
  "ramUsage": 7564517376,
  "preset": "openshift"
}

@gbraad
Copy link
Contributor

gbraad commented May 3, 2023 via email

@rohanKanojia
Copy link
Contributor

I want to work on this issue. Could someone please assign it to me?

@rohanKanojia
Copy link
Contributor

Hello, I think we can add preset information in crc status just below CRC VM section like this:

CRC VM:                  Running
+CRC Preset:              microshift
MicroShift:              Starting (v4.16.14)
RAM Usage:               1.156GB of 3.821GB
Disk Usage:              5.086GB of 16.1GB (Inside the CRC VM)
Persistent Volume Usage: 0B of 15GB (Allocated)
Cache Usage:             12.56GB
Cache Directory:         /home/rokumar/.crc/cache

@praveenkumar
Copy link
Member

Since now as part of status we show Microshift: Starting (v4.16.14) in case of microshift and OpenShift: Starting (v4.16.14) so doesn't that mean it is already solved and we don't have to add extra filed for UX?

@rohanKanojia
Copy link
Contributor

@praveenkumar : From my outsider's perspective, it's still unclear. We can change the line format to CRC Preset : MicroShift (Starting v4.16.14)

@rohanKanojia
Copy link
Contributor

Looking at code in status.go , we only seem to got OpenShift/ MicroShift status for openshift and microshift presets, not for okd:

crc/cmd/crc/cmd/status.go

Lines 198 to 202 in f71d9ce

if s.Preset == preset.OpenShift {
lines = append(lines, line{"OpenShift", openshiftStatus(s)})
}
if s.Preset == preset.Microshift {
lines = append(lines, line{"MicroShift", openshiftStatus(s)})

@praveenkumar
Copy link
Member

Looking at code in status.go , we only seem to got OpenShift/ MicroShift status for openshift and microshift presets, not for okd:

OKD/OCP from end user prospective is same because both consume same amount of resource. This request is came from because of resource requirement was different for OCP and podman preset (we didn't get any issue from user). @crc-org/crc-team wdyt?

@cfergeau
Copy link
Contributor

cfergeau commented Nov 22, 2024

crc status should be accurate about what we are running, if we are running OKD, don't mention openshift but print OKD. If you want to group okd and openshift under a common name, better to use one which is not ambiguous, eg OpenShift/OKD: ...

rohanKanojia added a commit to rohankanojia-forks/crc that referenced this issue Nov 22, 2024
Currently `crc status` only logs information for OpenShift and
MicroShift presets only. We should also log cluster information for OKD
preset.

Signed-off-by: Rohan Kumar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

5 participants