Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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.
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.
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.
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