Bug 1976048 - "oc log" command with "--selector" does not print all the specified logs
Summary: "oc log" command with "--selector" does not print all the specified logs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Containers
Classification: Red Hat
Component: General
Version: 1.5.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 1.5.0
Assignee: Ian
QA Contact: Xin jiang
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-25 04:06 UTC by Xin jiang
Modified: 2021-07-28 04:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-28 04:08:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github konveyor mig-ui pull 1261 0 None closed Bug 1976048: Fix oc logs command by adding pod name 2021-07-07 16:05:47 UTC
Github konveyor mig-ui pull 1262 0 None closed Bug 1976048: Update logs commands 2021-07-07 19:39:32 UTC
Github konveyor mig-ui pull 1263 0 None closed Bug 1976048: Update logs commands (#1262) 2021-07-07 19:39:31 UTC
Github konveyor mig-ui pull 1264 0 None closed Bug 1976048: Add logger pod name to oc logs command 2021-07-07 19:39:34 UTC
Red Hat Product Errata RHEA-2021:2929 0 None None None 2021-07-28 04:08:28 UTC

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


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