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
Unable to get deployment logs for multi container pods #10186
Comments
Thanks @jhellar. Looks like this is fixed on a more recent version, may be broken in OSE 3.2 In any case, I have steps to reproduce the issue: $ oc version
oc v1.3.0-alpha.2-267-g2fe486f-dirty
kubernetes v1.3.0-alpha.3-599-g2746284
$ cat dc-multi-container.json
{
"kind": "DeploymentConfig",
"apiVersion": "v1",
"metadata": {
"name": "test-dc"
},
"spec": {
"strategy": {
"type": "Rolling"
},
"triggers": [
{
"type": "ConfigChange"
}
],
"replicas": 1,
"selector": {
"name": "test-dc"
},
"template": {
"metadata": {
"labels": {
"name": "test-dc"
}
},
"spec": {
"containers": [
{
"name": "busybox",
"image": "busybox:latest",
"command": ["tail", "-f", "/dev/null"]
},
{
"name": "alpine",
"image": "alpine:latest",
"command": ["tail", "-f", "/dev/null"]
}
]
}
}
}
}
$ oc create -f dc-multi-container.json
deploymentconfig "test-dc" created
$ oc logs dc/test-dc
Error from server: a container name must be specified for pod test-dc-1-t63xy, choose one of: [busybox alpine] @jhellar could you please confirm what output you get when running the steps above? update 2016-08-11: updated template to include a command so that the containers run forever. That makes the issue reproducible. |
@rhcarvalho I can confirm that it works. oc logs dc/test-dc |
@jhellar could you find a way to reproduce this? |
Talking with @jhellar on IRC, he mentioned that After the deployment finishes, the same command stops working, and the error incorrectly tells us to choose a pod:
But:
And since we want the deployment logs, it shouldn't ask for a container. I've updated my comment above with steps to reproduce the issue. |
I've updated the title to better reflect the issue. |
I'm looking at this |
And I think I found the problem ;-) |
Reopening because the change was reverted (it breaks the API backward compatibility for UI). |
Does this issue affect pod replicas as well? I am only seeing one pod's log output using |
@mfojtik fixed now? |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
When there are multiple containers in pod
oc logs
fails for deploymentconfigs for that pod and it is not possible to specify the container with -c parameter.Version
oc v3.2.0.20
kubernetes v1.2.0-36-g4a3f9c5
Steps To Reproduce
Current Result
Error from server: a container name must be specified for pod ..., choose one of: [... ...]
Expected Result
logs...
The text was updated successfully, but these errors were encountered: