Bug 1906968 - Must-gather should support collecting kubernetes-nmstate resources
Summary: Must-gather should support collecting kubernetes-nmstate resources
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Brad P. Crochet
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-12 01:12 UTC by Brad P. Crochet
Modified: 2021-02-24 15:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:43:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift must-gather pull 198 0 None closed Bug 1906968: Add kubernetes-nmstate resources to must-gather 2021-02-17 04:10:27 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:43:26 UTC

Description Brad P. Crochet 2020-12-12 01:12:25 UTC
Description of problem:
The kubernetes-nmstate component is being released as a Tech Preview in OCP 4.7. must-gather should have support for collecting resources managed by kubernetes-nmstate.

This is currently gathered by CNV, and will replace that functionality once landed.

Comment 1 Brad P. Crochet 2020-12-12 01:14:28 UTC
The patch should have landed already, but was experiencing CI issues. It was lgtm and approved. A different approach was attempted, which removed the labels, but the original was preferred. I reverted to that patch, but by the time it was done, we were past FF.

Comment 4 zhou ying 2020-12-15 02:36:24 UTC
Meni Yakove:

Hi, could you help verify this issue ? thanks.

Comment 7 RamaKasturi 2021-02-12 17:52:46 UTC
Verified in the build below and i see that oc adm must-gather collects kubernetes-nsmate resources.

[knarra@knarra openshift-client-linux-4.7.0-0.nightly-2021-02-12-013204]$ ./oc version -o yaml
clientVersion:
  buildDate: "2021-02-11T01:40:14Z"
  compiler: gc
  gitCommit: c66c03f3012a10f16eb86fdce6330433adf6c9ee
  gitTreeState: clean
  gitVersion: 4.7.0-202102110027.p0-c66c03f
  goVersion: go1.15.5
  major: ""
  minor: ""
  platform: linux/amd64
openshiftVersion: 4.7.0-0.nightly-2021-02-09-224509
releaseClientVersion: 4.7.0-0.nightly-2021-02-12-013204
serverVersion:
  buildDate: "2021-02-05T22:18:43Z"
  compiler: gc
  gitCommit: ba455830ecb91ff61bb61ca4f70b6f3f4a5e3796
  gitTreeState: clean
  gitVersion: v1.20.0+ba45583
  goVersion: go1.15.5
  major: "1"
  minor: "20"
  platform: linux/amd64

Below are the steps followed to test the same:
=================================================
1) create catalogsource with the contents below
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: my-operator-catalog
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: brew.registry.redhat.io/rh-osbs/iib:45153
  displayName: My Operator Catalog
  publisher: grpc

2) Now login to the console -> operatorHub -> search for nmstate
3) Create namespace called openshift-nmstate
4) Now install the operator in the above namespace
5) create nmstate instance by using the defaults in the UI
6) create nncp using the file below
apiVersion: nmstate.io/v1beta1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: test-policy
spec:
  desiredState:
    interfaces:
    - name: eni-0ca7e2276f7ecc57c
      type: ethernet
      state: up
  nodeSelector:
    node-role.kubernetes.io/worker: ""
7) Now run must-gather

Pasting a sample of what has been captured in must-gather
=========================================================
[must-gather-m59f6] OUT cluster-scoped-resources/operators.coreos.com/operators/kubernetes-nmstate-operator.openshift-nmstate.yaml
[must-gather-m59f6] OUT namespaces/openshift-nmstate/
[must-gather-m59f6] OUT namespaces/openshift-nmstate/operators.coreos.com/
[must-gather-m59f6] OUT namespaces/openshift-nmstate/operators.coreos.com/clusterserviceversions/
[must-gather-m59f6] OUT namespaces/openshift-nmstate/operators.coreos.com/clusterserviceversions/kubernetes-nmstate-operator.v4.7.0.yaml
[must-gather-m59f6] OUT namespaces/openshift-nmstate/operators.coreos.com/installplans/
[must-gather-m59f6] OUT namespaces/openshift-nmstate/operators.coreos.com/installplans/install-lxx5x.yaml
[must-gather-m59f6] OUT namespaces/openshift-nmstate/operators.coreos.com/operatorgroups/
[must-gather-m59f6] OUT namespaces/openshift-nmstate/operators.coreos.com/operatorgroups/openshift-nmstate-g6bfm.yaml
[must-gather-m59f6] OUT namespaces/openshift-nmstate/operators.coreos.com/subscriptions/
[must-gather-m59f6] OUT namespaces/openshift-nmstate/operators.coreos.com/subscriptions/kubernetes-nmstate-operator.yaml
[must-gather-m59f6] OUT cluster-scoped-resources/admissionregistration.k8s.io/mutatingwebhookconfigurations/nmstate.yaml
[must-gather-m59f6] OUT cluster-scoped-resources/apiextensions.k8s.io/customresourcedefinitions/nmstates.nmstate.io.yaml
[must-gather-m59f6] OUT cluster-scoped-resources/apiextensions.k8s.io/customresourcedefinitions/nodenetworkconfigurationenactments.nmstate.io.yaml
[must-gather-m59f6] OUT cluster-scoped-resources/apiextensions.k8s.io/customresourcedefinitions/nodenetworkconfigurationpolicies.nmstate.io.yaml
[must-gather-m59f6] OUT cluster-scoped-resources/apiextensions.k8s.io/customresourcedefinitions/nodenetworkstates.nmstate.io.yaml

Based on the above moving bug to verified state.

Comment 9 errata-xmlrpc 2021-02-24 15:43:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633


Note You need to log in before you can comment on or make changes to this bug.