Hide Forgot
Description of problem: We can't simply copy the labels from output of "oc describe machineset" to get machines associated with it Version-Release number of selected component (if applicable): oc v4.0.0-0.82.0 kubernetes v1.11.0+6855010f70 features: Basic-Auth GSSAPI Kerberos SPNEGO kubernetes v1.11.0+81b29ee How reproducible: Always Steps to Reproduce: 1. Get all machinesets in the cluster oc get machinesets --all-namespaces .....skipped.... 2. User 'oc get' to get the selector $ oc get machineset qe-chuyu-worker-us-east-1a -n openshift-cluster-api -o yaml | grep -i match.*label -A 8 -B 1 selector: matchLabels: sigs.k8s.io/cluster-api-cluster: qe-chuyu sigs.k8s.io/cluster-api-machineset: qe-chuyu-worker-us-east-1a template: metadata: creationTimestamp: null labels: sigs.k8s.io/cluster-api-cluster: qe-chuyu sigs.k8s.io/cluster-api-machine-role: worker 3.Use 'oc describe' to get the selector $ oc describe machineset qe-chuyu-worker-us-east-1a -n openshift-cluster-api | grep -i match.*label -A 8 -B 1 Selector: Match Labels: Sigs . K 8 S . Io / Cluster - API - Cluster: qe-chuyu Sigs . K 8 S . Io / Cluster - API - Machineset: qe-chuyu-worker-us-east-1a Template: Metadata: Creation Timestamp: <nil> Labels: Sigs . K 8 S . Io / Cluster - API - Cluster: qe-chuyu Sigs . K 8 S . Io / Cluster - API - Machine - Role: worker Actual results: 3. We can see the output of 'oc describe' is not user friendly, we can't copy and use it directly with command 'oc get machine --selector=key1=value1,key2=value2' to get all machines associated with this MachineSet Expected results: 3. Labels in 'oc describe' output should be in right format, such as the output of 'oc get -o yaml' Additional info:
Fix in https://github.com/openshift/origin/pull/22198
*** Bug 1586343 has been marked as a duplicate of this bug. ***
*** Bug 1698235 has been marked as a duplicate of this bug. ***
// using `oc get -o yaml` to get machinesets labels $ oc get machinesets -n openshift-machine-api gpei-0429-pgvnx-worker-us-east-2a -o yaml | grep -i match.*label -A 8 -B 1 selector: matchLabels: machine.openshift.io/cluster-api-cluster: gpei-0429-pgvnx machine.openshift.io/cluster-api-machineset: gpei-0429-pgvnx-worker-us-east-2a template: metadata: creationTimestamp: null labels: machine.openshift.io/cluster-api-cluster: gpei-0429-pgvnx machine.openshift.io/cluster-api-machineset: gpei-0429-pgvnx-worker-us-east-2a // using `oc describe` to get machinesets labels $ oc describe machinesets -n openshift-machine-api gpei-0429-pgvnx-worker-us-east-2a | grep -i match.*label -A 8 -B 1 Selector: Match Labels: machine.openshift.io/cluster-api-cluster: gpei-0429-pgvnx machine.openshift.io/cluster-api-machineset: gpei-0429-pgvnx-worker-us-east-2a Template: Metadata: Creation Timestamp: <nil> Labels: machine.openshift.io/cluster-api-cluster: gpei-0429-pgvnx machine.openshift.io/cluster-api-machineset: gpei-0429-pgvnx-worker-us-east-2a the labels are shown in correct format, move to VERIFIED Verified on oc version Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.0", GitCommit:"f19fc6a99", GitTreeState:"clean", BuildDate:"2019-04-28T17:00:00Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.4+438fe5b", GitCommit:"438fe5b", GitTreeState:"clean", BuildDate:"2019-04-25T11:05:03Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
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, 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/RHBA-2019:0758