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

Documentation is not clear on how to enable debugging #178

Open
jackson-chris opened this issue Jul 29, 2021 · 3 comments
Open

Documentation is not clear on how to enable debugging #178

jackson-chris opened this issue Jul 29, 2021 · 3 comments

Comments

@jackson-chris
Copy link

https://olm.operatorframework.io/docs/tasks/troubleshooting/olm-and-catalog-operators/#how-to-view-the-catalog-operator-logs states:

Both the OLM and Catalog operators have -debug flags available that display much more useful information when diagnosing a problem. If necessary, add this flag to their deployments and perform the action that is showing undersired behavior.

but it is not clear how exactly this flag is supposed to be set, it would be good to include a patch command or alternatively an example of how to set the flag. IE. where in the deployment does the flag need to be set? Is it an additional arg like:

    Command:
      /bin/olm
    Args:
      --namespace
      $(OPERATOR_NAMESPACE)
      --writeStatusName
      operator-lifecycle-manager
      --writePackageServerStatusName
      operator-lifecycle-manager-packageserver
      --tls-cert
      /var/run/secrets/serving-cert/tls.crt
      --tls-key
      /var/run/secrets/serving-cert/tls.key
      --debug

or something else?

@timflannagan
Copy link
Contributor

It looks like it's expecting the --debug flag here, so providing an argument makes sense looking at the helm chart template: https://github.com/operator-framework/operator-lifecycle-manager/blob/master/deploy/chart/templates/0000_50_olm_07-olm-operator.deployment.yaml#L61-L63.

@jackson-chris
Copy link
Author

That makes sense, but I don't think that will be obvious to everyone, I am suggesting this is an area where the document can be improved.

In addition the flag is different between the olm-operator and catalog-operator based upon what I see in the templates, the former uses --debug and the latter -debug. I'm not sure if these commands both accept either format (one or double dash). See: https://github.com/operator-framework/operator-lifecycle-manager/blob/master/deploy/chart/templates/0000_50_olm_08-catalog-operator.deployment.yaml

@timflannagan
Copy link
Contributor

Yeah agreed that this is a gap in documentation - I did a poor job of conveying "this is what you can do in the meantime" in my previous comment. When playing around with the olm/catalog operators locally, it looks like both the -debug/--debug flag values are respected:

$ ./bin/catalog
INFO[0000] log level info                               
$ ./bin/catalog --debug
INFO[0000] setting logging level to DEBUG               
$ ./bin/catalog -debug
INFO[0000] setting logging level to DEBUG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants