Bug 1314238 - oc logs dc should not return user pod logs after deployment completed
oc logs dc should not return user pod logs after deployment completed
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Michail Kargakis
Wei Sun
: Regression
Depends On:
  Show dependency treegraph
Reported: 2016-03-03 04:23 EST by yapei
Modified: 2016-05-12 13:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-05-12 13:11:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description yapei 2016-03-03 04:23:36 EST
Description of problem:
After latest deployment of deployment config is complete, use oc logs -f dc/<dc-name> to check dc logs, pod logs are returned and printed

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

How reproducible:

Steps to Reproduce:
1. Create dc 
# oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/deployment/deployment1.json
2. Trigger deployment manually
# oc deploy hooks --latest
3. Check latest deployment logs when deployment is running 
# oc logs -f dc/hooks
I0303 08:58:36.390237       1 deployer.go:201] Deploying from yapei-test/hooks-1 to yapei-test/hooks-2 (replicas: 1)
I0303 08:58:36.403661       1 lifecycle.go:168] Created lifecycle pod yapei-test/hooks-2-hook-pre for deployment yapei-test/hooks-2
I0303 08:58:36.403714       1 lifecycle.go:181] Watching logs for hook pod yapei-test/hooks-2-hook-pre while awaiting completion
I0303 08:58:39.465704       1 lifecycle.go:221] Finished reading logs for hook pod yapei-test/hooks-2-hook-pre
I0303 08:58:39.465728       1 recreate.go:103] Pre hook finished
I0303 08:58:39.465734       1 recreate.go:108] Scaling yapei-test/hooks-1 down to zero
I0303 08:58:41.518432       1 recreate.go:126] Scaling yapei-test/hooks-2 to 1 before performing acceptance check
I0303 08:58:43.549588       1 recreate.go:131] Performing acceptance check of yapei-test/hooks-2
I0303 08:58:43.549724       1 lifecycle.go:445] Waiting 600 seconds for pods owned by deployment "yapei-test/hooks-2" to become ready (checking every 1 seconds; 0 pods previously accepted)
I0303 08:58:45.551946       1 lifecycle.go:466] All pods ready for yapei-test/hooks-2
I0303 08:58:45.587916       1 lifecycle.go:168] Created lifecycle pod yapei-test/hooks-2-hook-post for deployment yapei-test/hooks-2
I0303 08:58:45.587945       1 lifecycle.go:181] Watching logs for hook pod yapei-test/hooks-2-hook-post while awaiting completion
I0303 08:58:47.625286       1 lifecycle.go:221] Finished reading logs for hook pod yapei-test/hooks-2-hook-post
I0303 08:58:47.625320       1 lifecycle.go:87] Hook failed, ignoring: 
I0303 08:58:47.625329       1 recreate.go:153] Post hook finished
I0303 08:58:47.625333       1 recreate.go:156] Deployment hooks-2 successfully made active
4. Check latest deployment status
# oc deploy hooks
hooks #2 deployed about a minute ago - 1 pod
5. Check latest deployment log again
# oc log -f dc/hooks
W0303 17:00:56.135411    7774 cmd.go:200] log is DEPRECATED and will be removed in a future version. Use logs instead.
---> 08:58:45     Processing MySQL configuration files ...
---> 08:58:45     Initializing database ...
---> 08:58:45     Running mysql_install_db ...
160303  8:58:45 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld (mysqld 5.5.45) starting as process 41 ...
160303  8:58:45 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld (mysqld 5.5.45) starting as process 48 ...

To do so, start the server, then issue the following commands:

Version: '5.5.45'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)

Actual results:
5. user pod logs are returned 

Expected results:
5. For latest completed deployment, should not show user pod logs

Additional info:
On web console, for completed deployment, no logs is printed
Comment 1 Michail Kargakis 2016-03-03 09:54:00 EST
This is working as expected. We should document it better.
Comment 2 yapei 2016-03-03 19:41:31 EST
if 'oc logs -f dc/<dc-name>' shows user pod logs, does that mean user should also have pod logs returned when requesting Deployed deployments on web console?
Comment 3 Michail Kargakis 2016-03-04 05:50:41 EST
I guess the console should have parity with the cli. I've asked Jessica and Sam about it in https://github.com/openshift/origin/pull/6935#issuecomment-192229733. Closing this bug.
Comment 4 yapei 2016-03-07 22:08:38 EST
checked on web console, now Deployed deployments show pod logs, the console has the same behavior with CLI, move to VERIFIED

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