operator-framework / olm-docs

Hugo doc site for https://github.com/operator-framework/operator-lifecycle-manager
10 stars 82 forks source link

Debugging OLM and Catalog Operator #80

Open mjdavisibm opened 3 years ago

mjdavisibm commented 3 years ago

Article mentions setting -debug to get more information when debugging the catalog, but there is no information on how to do that

IBMRob commented 3 years ago

This is a good question. I tried editing the deployment and added the -debug flag to the arguments but the pod gets restarted within about a minute and reset to the original values.

benluddy commented 3 years ago

This is a good question. I tried editing the deployment and added the -debug flag to the arguments but the pod gets restarted within about a minute and reset to the original values.

If you're on OpenShift, the catalog-operator deployment is managed by CVO (see https://github.com/openshift/cluster-version-operator/blob/master/docs/dev/clusterversion.md) and that would be squashing any manual edits you make.

ajsimpson1 commented 2 years ago

I have just encountered this issue too. I'd like to set the catalog-operator into debug mode. I update the deployment spec with the -debug flag and the operator pod restarts, after a minute or so, the pod is terminated and the change reverted. Are there any instructions on how to prevent CVO from reverting any changes?

timflannagan commented 2 years ago

@ajsimpson1 I think you'd need to disable the CVO in order to avoid it stomping on changes when it's reconciling the core components in the OCP payload. IIRC, there's a way to disable CVO reconciliation for a specific component, but I typically just run the following alias when I need to debug something further (and it's helpful in dev workflows too):

$ alias kcvod
alias kcvod='kubectl -n openshift-cluster-version scale deployment --all --replicas 0'