Bug 1877363 - [oc] oc logs -f dc/hello does not work
Summary: [oc] oc logs -f dc/hello does not work
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: openshift-apiserver
Version: 4.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.6.0
Assignee: Maciej Szulik
QA Contact: RamaKasturi
Depends On:
TreeView+ depends on / blocked
Reported: 2020-09-09 13:10 UTC by RamaKasturi
Modified: 2020-10-27 16:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-10-27 16:38:53 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift openshift-apiserver pull 135 0 None closed Bug 1877363: fix missing conversions for DeploymentLogOptions 2020-10-07 05:17:41 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:39:12 UTC

Description RamaKasturi 2020-09-09 13:10:53 UTC
Description of problem:
When running the command "oc logs -f dc/deployment" with 4.6/4.5 oc client it gives me the error "Error from server (BadRequest): converting (url.Values) to (v1.DeploymentLogOptions): unknown conversion"

Version-Release number of selected component (if applicable):
[ramakasturinarra@dhcp35-60 openshift-client-linux-4.6.0-0.nightly-2020-09-08-123737]$ ./oc version
Client Version: 4.6.0-0.nightly-2020-09-08-123737
Server Version: 4.6.0-0.nightly-2020-09-08-123737
Kubernetes Version: v1.19.0-rc.2+068702d

How reproducible:

Steps to Reproduce:
1) install latest 4.6 cluster
2) Run the command oc create deploymentconfig my-nginx --image=nginx
3) Run the command oc logs -f dc/my-nginx

Actual results:
Below error is seen
Error from server (BadRequest): converting (url.Values) to (v1.DeploymentLogOptions): unknown conversion

Expected results:
Logs should be displayed.

Additional info:
Tried with 4.5 latest nightly, seeing similar results
[ramakasturinarra@dhcp35-60 openshift-client-linux-4.5.0-0.nightly-2020-09-08-123650]$ ./oc version
Client Version: 4.5.0-0.nightly-2020-09-08-123650
Server Version: 4.6.0-0.nightly-2020-09-08-123737
Kubernetes Version: v1.19.0-rc.2+068702d

custom deployments as well gives same error, steps to reproduce the same here:
1) oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/deployment/custom-recreate.yaml

2) Check the logs using the command oc  logs -f dc/<dc_name>

You will see the same error as mentioned in the Actual results.

Comment 2 Maciej Szulik 2020-09-09 18:50:56 UTC
I verified this with both oc 4.5 and 4.6 and I'm not seeing this happening. 
I'm going to close this, feel free to re-open and attach -v=9 with it as well.

Comment 4 RamaKasturi 2020-09-10 05:52:40 UTC
Also tried the same on a 4.5 cluster with 4.5 client and i see that it works and does not throw error as above

[ramakasturinarra@dhcp35-60 openshift-client-linux-4.5.0-0.nightly-2020-09-08-123650]$ ./oc logs -f dc/my-nginx
--> Scaling my-nginx-1 to 1
error: update acceptor rejected my-nginx-1: pods for rc 'test1/my-nginx-1' took longer than 600 seconds to become available

Comment 5 Maciej Szulik 2020-09-10 19:52:07 UTC
It's a bug in openshift-apiserver, PR on the way.

Comment 7 RamaKasturi 2020-09-14 11:50:11 UTC
Verified with the payload below and i see that it works fine. Ran through auto script.


[06:24:38] INFO> Shell Commands: oc version -o yaml --client --kubeconfig=/tmp/kubeconfig20200914-373-en4qk0
        buildDate: "2020-09-12T02:49:22Z"
        compiler: gc
        gitCommit: a4a051198b64f2e8bbfe9fc08c9a2728c7628e0e
        gitTreeState: clean
        gitVersion: 4.6.0-202009120210.p0-a4a0511
        goVersion: go1.14.7
        major: ""
        minor: ""
        platform: linux/amd64

[09:48:16] INFO> Shell Commands: oc logs dc/custom-deployment -f --kubeconfig=/home/jenkins/workspace/Runner-v3/workdir/ocp4_testuser-2.kubeconfig
      --> pre: Running hook pod ...
      test pre hook executed
      --> pre: Success
      --> Scaling custom-deployment-1 to 2
      --> Reached 50%
      --> pre: Hook pod already succeeded
      --> Success
      [09:48:38] INFO> Exit Status: 0
      | f             | true                 |
      | resource_name | dc/custom-deployment |
        Then the output should contain:                                 # features/step_definitions/common.rb:33
      | Reached 50% |
      | Halfway     |
      | Success     |
      | Finished    |

Based on the above moving the bug to verified state.

Comment 10 errata-xmlrpc 2020-10-27 16:38:53 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 (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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