ceph / ceph-medic

find common issues in ceph clusters
MIT License
22 stars 18 forks source link

Explain how to use openshift connection more clearly #113

Closed djgalloway closed 5 years ago

djgalloway commented 5 years ago

The docs mention the new openshift and kubernetes connections but not how they communicate with the cluster(s).

I have an OpenShift 4 cluster up and want to communicate with it just using the standard oc command if possible. Currently, it looks like ceph-medic tries to use the minishift method of communicating with a specific cluster by using contexts.

If the context isn't defined, I think ceph-medic should fall back to just trying to run oc.

alfredodeza commented 5 years ago

The connections are handled with the remoto library, and the --context line is only used if specified in the configuration file under the openshift (or kubernetes) section. It is possible that you have a configuration file left around that is messing things up that has '39' defined in there.

Check in the CWD and at ~/.cephmedic.conf - you can also run ceph-medic --help and it will tell you what it has loaded (if anything).

alfredodeza commented 5 years ago

Fixing this ticket will mean updating the docs to mention that kubernetes uses kubectl and openshift uses oc. These commands are shown in the file log, for example:

 oc --context 3 exec -i -n rook-ceph rook-ceph-mon-b-958cf7785-2cstl -- /bin/sh -c python
 oc --context 3 --request-timeout=5 get -n rook-ceph pods -o json