red-hat-storage/ocs-operator

must-gather missing some info due to old oc command version

Opened this issue · 9 comments

nekop commented

The ocs must-gather doesn't get PodDisruptionBudget due to old oc command version.

$ podman run -it --rm  --entrypoint /bin/sh registry.redhat.io/ocs4/ocs-must-gather-rhel8:v4.8
sh-4.4# oc version
Client Version: 4.6.0-202108202025.p0.git.2b525e8.assembly.stream-2b525e8

It'd be nice if we update the oc command so we can get standard information set from the oc adm inspect.

Upgrading oc command is not a odf must-gather issue, user has to update the command on their end.
Not sure if I am missing anything here.

yes, even I looked at the code, we don't have anything to be done from our end. The must-gather runs all the commands on the user cluster and stores the output in the dir. Hence, the oc version has to be updated from the user's end.

nekop commented

The oc command for the must-gather exists inside the must-gather image and it runs inside the image. My oc command is always latest. We need update the oc binary inside the ocs must-gather image.

In that case I will investigate and reply back.

On running must-gather command in my local,

[yatipadia@192 ocp4.9]$ oc adm must-gather --image=yati1998/ocs-must-gather:provider
[must-gather      ] OUT Using must-gather plug-in image: yati1998/ocs-must-gather:provider
When opening a support case, bugzilla, or issue please include the following summary data along with any other requested information.
ClusterID: f7349640-2e34-495c-bef1-22423ea23f27
ClusterVersion: Stable at "4.9.23"

It says the clusterVersion used is 4.9.23 which is same as mine:

[yatipadia@192 ocp4.9]$ oc version
Client Version: 4.8.9
Server Version: 4.9.23
Kubernetes Version: v1.22.3+b93fd35

Not sure if I am missing anything. @agarwal-mudit

@yati1998 We use

FROM quay.io/openshift/origin-cli:latest
as the base image to build ocs must-gather.

It uses oc client version v4.2.0 which is outdated as seen below.

docker run -ti quay.io/openshift/origin-cli:latest oc version
Client Version: v4.2.0-alpha.0-1411-ge9566cc

ServerVersion or ClusterVersion is the version of your OCP/K8s cluster.

To fix this, we need to update our base image to use latest oc client.

okay got that, will change that. Thanks @umangachapagain

@umangachapagain I tried checking other tags for quay.io/openshift/origin-cli:latest but the oc client is still the same.

$ docker run -ti quay.io/openshift/origin-cli:4.11.0 oc version
Client Version: v4.2.0-alpha.0-1411-ge9566cc

Which oc version do we need to use to get the latest build?