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

Chectl che-operator-image parameter replaces DevWorkspace Operator image instead of Che Operator image #21106

Closed
amisevsk opened this issue Feb 1, 2022 · 6 comments
Labels
area/chectl Issues related to chectl, the CLI of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/current
Milestone

Comments

@amisevsk
Copy link
Contributor

amisevsk commented Feb 1, 2022

Describe the bug

Specifying the --che-operator-image parameter to chectl server:deploy will override the image used for the DevWorkspace Operator instead of the Che Operator. Further:

  • The CSV for DWO is updated, if it exists, to use the alternate image, which is rather unexpected
  • The image replacement is not complete (as the default image is still used in some places, e.g. for the DevWorkspace webhook server

Che version

next (development version)

Steps to reproduce

Execute chectl server:deploy with the --che-operator-image argument.

Expected behavior

From the documentation, it looks like this parameter should override the image used for the Che Operator instead:

--che-operator-image=che-operator-image
Container image of the operator. This parameter is used only when the installer is the operator or OLM.

Runtime

OpenShift

Screenshots

No response

Installation method

chectl/next

Environment

Linux

Eclipse Che Logs

No response

Additional context

Current documentation: https://github.com/che-incubator/chectl#chectl-serverdeploy

@amisevsk amisevsk added kind/bug Outline of a bug - must adhere to the bug report template. area/chectl Issues related to chectl, the CLI of Che labels Feb 1, 2022
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Feb 1, 2022
@tolusha
Copy link
Contributor

tolusha commented Feb 2, 2022

I can't reproduce
chectl server:deploy --platform minikube --che-operator-image abazko/operator:test
--che-operator-image flag is used to replace operator image only.

screenshot-127 0 0 1_33733-2022 02 02-10_44_06
screenshot-127 0 0 1_33733-2022 02 02-10_44_24

@tolusha tolusha added severity/P1 Has a major impact to usage or development of the system. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Feb 2, 2022
@amisevsk
Copy link
Contributor Author

amisevsk commented Feb 2, 2022

I'll test it again and either close this issue as "I did something weird" or give more detailed steps to reproduce.

@amisevsk
Copy link
Contributor Author

amisevsk commented Feb 2, 2022

Verified with chectl/0.0.20220202-next.24032ae linux-x64 node-v16.13.2 on OpenShift. What follows is the exact process I followed, so some steps may be superfluous:

  1. Install next DWO catalogsource: oc apply -f https://raw.githubusercontent.com/devfile/devworkspace-operator/main/catalog-source.yaml. Wait for catalog to be resolved
  2. Install next version of DWO on the cluster through OperatorHub (current version is v0.13.0-dev). Wait for operator to be installed
  3. Execute
    chectl server:deploy \
      --platform=openshift \
      --workspace-engine=dev-workspace \
      -n openshift-operators \
      --no-olm-suggested-namespace \
      --che-operator-image=quay.io/amisevsk/che-operator:dev

Result:

  • DWO CSV is updated to use quay.io/amisevsk/che-operator:dev
  • DWO deployment enters a crashloop
  • Che Operator deployment uses quay.io/eclipse/che-operator:next
chectl output
› Installer type is set to: 'olm'
› Current Kubernetes context: 'default/<snip>:6443/kube:admin'
  ✔ Verify Kubernetes API...OK (it's OpenShift)
  ✔ 👀  Looking for an already existing Eclipse Che instance
    ✔ Verify if Eclipse Che is deployed into namespace "openshift-operators"...it is not
  ✔ ✈️  Openshift preflight checklist
    ✔ Verify if oc is installed...done.
    ✔ Verify if openshift is running...done.
    ✔ Check OpenShift version: 4.x
    ✔ Check Kubernetes version: Unknown.
  ✔ Following Eclipse Che logs
    ✔ Start following Operator logs...done
    ✔ Start following Eclipse Che Server logs...done
    ✔ Start following PostgreSQL logs...done
    ✔ Start following Keycloak logs...done
    ✔ Start following Plug-in Registry logs...done
    ✔ Start following Devfile Registry logs...done
    ✔ Start following Eclipse Che Dashboard logs...done
    ✔ Start following namespace events...done
  ✔ Create Namespace openshift-operators...[Exists]
  ✔ 🏃‍  Running Olm installation Eclipse Che
    ✔ Check if OLM is pre-installed on the platform...[OK]
    ✔ Configure context information...[OK]
    ✔ Create CatalogSource for 'next' channel...[OK]
    ✔ Deploy Dev Workspace operator
      ✔ Check Dev Workspace operator installation...[OperatorHub]
    ✔ Create operator subscription...[OK]
    ✔ Wait while subscription is ready...[OK]
    ✔ Wait operator install plan...[OK]
    ✔ Check cluster service version resource...[OK]
    ✔ Set custom operator image...[OK]
    ✔ Prepare Eclipse Che cluster CR...[OK]
    ✔ Create the Custom Resource of type checlusters.org.eclipse.che in the namespace openshift-operators...done.
  ✔ ✅  Post installation checklist
    ✔ PostgreSQL pod bootstrap
      ✔ Scheduling...done
      ✔ Downloading images...done
      ✔ Starting...done
    ✔ Keycloak pod bootstrap...skipped
    ✔ Devfile Registry pod bootstrap
      ✔ Scheduling...done
      ✔ Downloading images...done
      ✔ Starting...done
    ✔ Plug-in Registry pod bootstrap
      ✔ Scheduling...done
      ✔ Downloading images...done
      ✔ Starting...done
    ✔ Eclipse Che Dashboard pod bootstrap
      ✔ Scheduling...done
      ✔ Downloading images...done
      ✔ Starting...done
    ✔ Eclipse Che Server pod bootstrap
      ✔ Scheduling...done
      ✔ Downloading images...done
      ✔ Starting...done
    ✔ Eclipse Che status check...done
  ✔ Retrieving Che self-signed CA certificate...OK
  ✔ Prepare post installation output...done
  ✔ Show important messages
    ✔ Eclipse Che 'next' has been successfully deployed.
    ✔ Documentation             : https://www.eclipse.org/che/docs/
    ✔ -------------------------------------------------------------------------------
    ✔ Users Dashboard           : https://che-openshift-operators.<snip>.com/dashboard/
    ✔ -------------------------------------------------------------------------------
    ✔ Plug-in Registry          : https://che-openshift-operators.<snip>.com/plugin-registry/v3/
    ✔ Devfile Registry          : https://che-openshift-operators.<snip>.com/devfile-registry/
    ✔ -------------------------------------------------------------------------------
Command server:deploy has completed successfully in 03:42.

@tolusha
Copy link
Contributor

tolusha commented Feb 3, 2022

Thank you for detailed steps. I will check.

@tolusha
Copy link
Contributor

tolusha commented Feb 4, 2022

Will be fixed by https://github.com/che-incubator/chectl/pull/2007/files

BTW. You have some extra steps to deploy Eclipse Che + DW

Install next DWO catalogsource:
Install next version of DWO

It is not needed. chectl does it itself. Make sure you use next version of chectl (chectl update next)

--workspace-engine=dev-workspace

You can omit it. DevWorkspace is enabled by default

-n openshift-operators --no-olm-suggested-namespace

That's strange. Why do you need to deploy Eclipse Che in openshift-operators namespace?
If you omit it, then che-operator deployment goes into openshift-operators and checluster and other things go into eclipse-che namespace.

So, just use chectl server:deploy --platform openshift --che-operator-image <IMAGE>

@amisevsk
Copy link
Contributor Author

amisevsk commented Feb 4, 2022

The reason I was installing the DWO catalogsource/operator was because I wanted to run my own development version of DWO to debug something (I change the CSV, etc. after the fact and scale down the DWO deployment so that I can debug). Thanks for the advice, though -- I was mostly just using a chectl command from my shell history :). Deploying everything in openshift-operators is mostly to make it easier for me to grab logs from different components (without switching namespaces).

I'll stick to the simple command in the future though 👍

@tolusha tolusha closed this as completed Feb 4, 2022
@tolusha tolusha added this to the 7.44 milestone Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/chectl Issues related to chectl, the CLI of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system. sprint/current
Projects
None yet
Development

No branches or pull requests

3 participants