Bug 1390900 - Output info is strange when run 'oadm manage-node' command
Summary: Output info is strange when run 'oadm manage-node' command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Juan Vallejo
QA Contact: Xingxing Xia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-02 08:34 UTC by DeShuai Ma
Modified: 2017-08-16 19:51 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: 1. Pod headers were only being printed once for all sets of pods when listing pods from multiple nodes. 2. Executing `oadm manage-node <node-1> <node-2> ... --evacuate --dry-run` with multiple nodes would print the same output multiple times (once per each specified node) Consequence: Users would see inconsistent or duplicate pod information. Fix: 1. Pod headers are now printed for each set of pods per node 2. Output of `oadm manage-node <node-1> <node-2> ... --evacuate --dry-run` is now printed once, regardless of the number of nodes that were specified. Result: Pod data is consistent when listing sets of pods for multiple nodes, and output of `oadm manage-node <node-1> <node-2> ... --evacuate --dry-run` is no longer duplicated.
Clone Of:
Environment:
Last Closed: 2017-08-10 05:15:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1716 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.6 RPM Release Advisory 2017-08-10 09:02:50 UTC

Description DeShuai Ma 2016-11-02 08:34:23 UTC
Description of problem:
There are two issues in this bug:
1. when use 'oadm manage-node' list pods on node, the output info for different nodes is not consistent.
2. when use 'oadm manage-node' evacuate pods no node with '--dry-run', the output info display twice. 

Version-Release number of selected component (if applicable):
openshift v3.4.0.18+ada983f
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

How reproducible:
Always

Steps to Reproduce:
1.Get node info and create some pod on node
[root@qe-dma-master-1 ~]# oc get node
NAME                            STATUS    AGE
qe-dma-master-1                 Ready     5h
qe-dma-node-registry-router-1   Ready     5h

2.List pod on multi nodes
[root@qe-dma-master-1 ~]# oadm manage-node  --list-pods  --pod-selector='name=heapster'  --selector='role=node'

Listing matched pods on node: qe-dma-master-1

NAME      READY     STATUS    RESTARTS   AGE

Listing matched pods on node: qe-dma-node-registry-router-1

heapster-tw295   0/1       Running   35        4h

3.Evacuate pods on multi nodes with '--dry-run'
[root@qe-dma-master-1 ~]# oadm manage-node qe-dma-master-1 qe-dma-node-registry-router-1 --evacuate  --pod-selector='name=hello-daemonset'  --dry-run

Listing matched pods on node: qe-dma-master-1

NAME                    READY     STATUS    RESTARTS   AGE
hello-daemonset-pk9nt   1/1       Running   0          8m

Listing matched pods on node: qe-dma-node-registry-router-1

hello-daemonset-fmaiz   1/1       Running   0         6m

Listing matched pods on node: qe-dma-master-1

NAME                    READY     STATUS    RESTARTS   AGE
hello-daemonset-pk9nt   1/1       Running   0          8m

Listing matched pods on node: qe-dma-node-registry-router-1

hello-daemonset-fmaiz   1/1       Running   0         6m

Actual results:
2.The output format on different node should be consistent
3.The result should only display once

Expected results:


Additional info:

Comment 1 Juan Vallejo 2017-01-17 20:24:35 UTC
Related PR: https://github.com/openshift/origin/pull/12528

Comment 2 Juan Vallejo 2017-01-18 23:03:18 UTC
Related upstream PR: https://github.com/kubernetes/kubernetes/pull/40111

origin PR will merge after rebase with kube 1.6. Adding UpcomingRelease tag to this bug

Comment 3 Fabiano Franz 2017-01-19 23:42:41 UTC
Waiting for the 1.6 Kube rebase.

Comment 4 Fabiano Franz 2017-05-09 04:29:44 UTC
Fixed by the 1.6 Kubernetes rebase and https://github.com/openshift/origin/pull/12528.

Comment 6 DeShuai Ma 2017-06-05 09:43:30 UTC
Verify on openshift v3.6.94

[root@qe-dma36-master-1 ~]#  oc get node
NAME                              STATUS    AGE       VERSION
qe-dma36-master-1                 Ready     6h        v1.6.1+5115d708d7
qe-dma36-node-registry-router-1   Ready     6h        v1.6.1+5115d708d7
[root@qe-dma36-master-1 ~]# oadm manage-node --list-pods --pod-selector='name=hello-pod' --selector='role=node'

Listing matched pods on node: qe-dma36-master-1

NAME      READY     STATUS    RESTARTS   AGE

Listing matched pods on node: qe-dma36-node-registry-router-1

NAME        READY     STATUS    RESTARTS   AGE
hello-pod   0/1       Running   0          15m
[root@qe-dma36-master-1 ~]# oadm manage-node qe-dma36-node-registry-router-1 --evacuate --dry-run --pod-selector='name=hello-pod'
Flag --evacuate has been deprecated, use 'oadm drain NODE' instead

Listing matched pods on node: qe-dma36-node-registry-router-1

NAME        READY     STATUS    RESTARTS   AGE
hello-pod   0/1       Running   0          15m

Comment 8 errata-xmlrpc 2017-08-10 05:15:47 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, 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/RHEA-2017:1716


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