Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchLogs for deployment is broken starting in 4.10.2 #2342

Closed
longwa opened this issue Jul 11, 2020 · 2 comments · Fixed by #2349
Closed

watchLogs for deployment is broken starting in 4.10.2 #2342

longwa opened this issue Jul 11, 2020 · 2 comments · Fixed by #2349
Assignees
Labels

Comments

@longwa
Copy link

longwa commented Jul 11, 2020

Starting with 4.10.2, trying to watch logs on a deployment fails:

def watchLog = client.apps().deployments().inNamespace("k8s-test-f4772a").withName("testdeployment").watchLog(System.out)

The error indicates that it can't find the ReplicaSet:

Caught: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://x.x.x.x:6443/apis/apps/v1/namespaces/k8s-test-f4772a/replicasets/testdeployment?labelSelector=app.kubernetes.io%2Fname%3Dtestdeployment%2Capp.kubernetes.io%2Finstance%3Dtestdeployment. Message: the server could not find the requested resource. Received status: Status(apiVersion=v1, code=404, details=StatusDetails(causes=[], group=null, kind=null, name=null, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=the server could not find the requested resource, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=NotFound, status=Failure, additionalProperties={}).

Looking at the error, it seems like maybe it's trying to find a replicaSet specifically named "testdeployment" (I'm assuming that's what the last part of the path means), but the replica sets are obviously named with a hash so maybe this lookup is too selective and should just be using the labels to match it.

Running the same test with 4.10.1 works fine.

@manusa manusa added the bug label Jul 13, 2020
@rohanKanojia
Copy link
Member

I think somehow #2239 broke this behavior. Let me try to revert to old behavior

@rohanKanojia rohanKanojia self-assigned this Jul 14, 2020
@rohanKanojia
Copy link
Member

It's not just for Deployment, I checked it's broken for Jobs too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants