RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1110388 - docker events --since=X un-documented pty-dependent behavior
Summary: docker events --since=X un-documented pty-dependent behavior
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Matthew Heon
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1109938
TreeView+ depends on / blocked
 
Reported: 2014-06-17 14:24 UTC by Chris Evich
Modified: 2019-03-06 01:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-18 20:45:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1266 0 normal SHIPPED_LIVE docker bug fix and enhancement update 2014-09-19 00:45:12 UTC

Description Chris Evich 2014-06-17 14:24:38 UTC
Description of problem:

The "streaming" behavior of docker events with --since option, changes if running under tty/pty.  Without the --events option, it always "streams" events as they happen untill the command is killed (expected).  However, if there is no pty/tty, and --since is used, the command exits after outputing past events (unexpected).  When a pty/tty is in control, the past events are output, then events "stream" until the process is killed.

Version-Release number of selected component (if applicable):
docker-0.11.1-19.el7.x86_64

How reproducible:
Easy

Steps to Reproduce:
1. docker events
2. echo "$(docker events)"
3. docker events --since=0
4. echo "$(docker events --since=0)"

Actual results:
#1 and #2 match in output + behavior (i.e. "stream" until killed)
#3 and #4 do NOT match (i.e. output and streaming behavior differ)

Expected results:
#3 and #4 should output and behavior should match.  Preferably "streaming" events, as #1 and #2 do - though 'help' text does not specify.

Additional info:
This is a regression from previous behavior (IIRC, before bug 1095901 was fixed).

An alternative fix could be fixing behavior of --since with a tty/pty, so it always exits after displaying prior events.  The downside would be, for "things" following events output, some could be lost between end of streaming past, and beginning of streaming new.  e.g.  docker events --since=0 > logfile && docker events >> logfile

Found on RHEL 7 GA using Autotest 0.16.0-master-63-g35e93, Docker test 0.7.4, "docker_cli/events" sub-test.

Comment 2 Daniel Walsh 2014-06-27 16:23:05 UTC
Seems to be working on docker-1.0

Comment 3 Matthew Heon 2014-07-18 13:22:50 UTC
Cannot reproduce this on RHEL7 with docker-1.0.0-10 - docker events --since='CURRENT_DATE' hangs, streaming new events, even when launched without a TTY.

Comment 4 Chris Evich 2014-07-18 15:36:42 UTC
Confirmed docker-1.0.0-10.el7.x86_64 Docker version 1.0.0, build 20fdb42/1.0.0


Both with and without --since, the foregound process waits for it's child to finish (or be killed), then dumps everything that was output.  So the behavior is consistent now.

Comment 6 errata-xmlrpc 2014-09-18 20:45:50 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.

http://rhn.redhat.com/errata/RHBA-2014-1266.html


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