red-hat-storage / ocs-operator

Operator for RHOCS
Apache License 2.0
85 stars 184 forks source link

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

Open nekop opened 2 years ago

nekop commented 2 years ago

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.

umangachapagain commented 2 years ago

@yati1998 PTAL

agarwal-mudit commented 2 years ago

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.

yati1998 commented 2 years ago

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 2 years ago

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.

yati1998 commented 2 years ago

In that case I will investigate and reply back.

yati1998 commented 2 years ago

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

umangachapagain commented 2 years ago

@yati1998 We use https://github.com/red-hat-storage/ocs-operator/blob/dcc00921abb43f109204c32b8d7d975b0146c610/must-gather/Dockerfile#L1 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.

yati1998 commented 2 years ago

okay got that, will change that. Thanks @umangachapagain

yati1998 commented 2 years ago

@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?