Bug 1976048

Summary: "oc log" command with "--selector" does not print all the specified logs
Product: Migration Toolkit for Containers Reporter: Xin jiang <xjiang>
Component: GeneralAssignee: Ian <ibolton>
Status: CLOSED ERRATA QA Contact: Xin jiang <xjiang>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: high    
Version: 1.5.0CC: ernelson, rjohnson, sregidor, whu
Target Milestone: ---   
Target Release: 1.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-28 04:08:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xin jiang 2021-06-25 04:06:44 UTC
Description of problem:
It seems the behavior is different when viewing logs with a label selector. for instance, the 1st command just print our around 10 lines logs, the 2nd print out hundreds lines logs. 
1. oc logs --follow --selector logreader=mig --namespace openshift-migration --container color
2. oc logs migration-log-reader-58dc94fbf8-twf88 -c color

Because of above behavior, the oc commands on tree view of Migration Resource cannot print out logs by grep the resource name, for example

$ oc logs --selector control-plane=controller-manager --namespace openshift-migration --container mtc | grep '"dism":"migration-f42f3-pqhgn-rp467"'

Version-Release number of selected component (if applicable):
MTC 1.5.0

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:
It cannot print all logs

Expected results:
It should print out all logs 


Additional info:

Comment 4 Xin jiang 2021-07-08 12:33:18 UTC
verified with 1.5.0, build is registry.redhat.io/rhmtc/openshift-migration-ui-rhel8@sha256:4fa42a785864bbc75929aaa6cfc2fc5bef201ddfd829da36054fb74130af927b


the command looks like 

oc logs migration-log-reader-7789f5d7d-wvvzd -c plain | grep '"dim":"migration-a3e18-zcrl7"'

Comment 10 errata-xmlrpc 2021-07-28 04:08:21 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 (Migration Toolkit for Containers (MTC) image release advisory 1.5.0), 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-2021:2929