-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
--tail In Deploy Mode Mixes Outputs #1753
Comments
Thank you for opening this!
Now the image name is used as a pod selector - if the selector matches multiple pods skaffold will tail logs from both pods - which might be the case when you specify a not specific enough image name in Question: what is the exact command you are running - especially interesting is the value of the (This might be also a motivating example for solving #922 where you could just pass in a build result file containing the built artifacts with tags to |
Hi @balopat, the --image tag is just the name of my image, which is something like my.domain.com/project:b4fdee where b4fdee is just a randomly-generated value we gave it when creating the image. Are you suggesting I should tag the image with another value before launching, even though it's the same image? Or is there a different way to tail besides the image name? I read that issue you linked, and yes, I'm using skaffold build essentially as a kubectl apply, with the one exception that it would be nice to have the --tail work properly so that I wouldn't have to tail it myself after the kubectl apply. |
@balopat did you need more information from me? I think this could be fixed outside of Skaffold, but I don't know if this is something you'd consider a valid use case. |
Apologies - this fell off my plate. |
I think should be fixed now since we use |
@tejal29 which version do you think this was fixed in? |
@cliffburdick If #2981 brings back the logs, will you be able to check that is issue is fixed too? Thanks a lot! |
@dgageot , do you know if the latest binary here has it included? https://storage.googleapis.com/skaffold/builds/latest/skaffold-linux-amd64 I tried to compile from scratch, but go build fails. I'm assuming it's just a versioning issue. |
@cliffburdick I don't think it's available until it's merged |
@dgageot ok, thanks. I won't be able to test it out unless I can get go build working. I'll try a couple more things. |
@cliffburdick which OS are you using? I can produce a binary for you |
@dgageot Ubuntu 18.04 |
@cliffburdick I've just built this one from commit 3907a07: sha256: aa46eb3d4e625618e7165f8135540421449f76a97f279597cc35957aacd94231 |
@dgageot that seems to have fixed it. Thanks! |
@dgageot I misspoke originally. The problem with tail not working was indeed fixed by your patch, but I can still reproduce the problem where tailing the same image from two containers gives output mixed from both of them. Is there something I need to enable to fix that? |
@cliffburdick I'm not sure I understand the issue now. Could you re-explain? |
Hi @dgageot, if I issue a skaffold deploy with an image from a terminal, then do a separate launch from another terminal and the same image (but different pod), the outputs are mixed because it seems to tail anything with that image name. |
do we not use the run id in skaffold deploy? I think we should be filtering on that in the pod selector for getting logs. @cliffburdick are you still on an old version of skaffold? |
Hi @nkubala , the issue does not appear to be fixed, even with 1.8.0. I launched in two different terminals with a config similar to this:
Skaffold was run with: On both terminals I saw the output of the other pod/deployment mixed in with its own. |
@cliffburdick could you share the logs for both deployments? Are you using different tags in both deployments? |
@cliffburdick Also are you running both terminals in different namespaces? |
I spoke with @dgageot on slack about this, and just to clarify the situation more:
|
Here's a reproduction: https://github.com/dgageot/skaffold-deploy-mix |
Fixes GoogleContainerTools#1753 Signed-off-by: David Gageot <david@gageot.net>
I confirmed this is fixed by #4097 |
Fixes GoogleContainerTools#1753 Signed-off-by: David Gageot <david@gageot.net>
@dgageot @balopat Is it possible to revisit/reopen this issue since #4097 was reverted due to causing other issues. |
@jmentzer722 sorry this never got reopened. we're currently in the process of making some major changes to our helm deployer, which will allow us to reimplement the change in #4097 that would fix this issue. i'll reopen this for now, and once we've shipped the changes to the helm deployer we can pick this issue back up. |
The logger know listens for pods only having the runId. This issue should be fixed now. I was not able to reproduce it. |
Expected behavior
Independent outputs from two processes
Actual behavior
If I run two skaffold commands in separate windows with the deploy mode and --image, the output of one spills onto the other screen, and both are seen. This behavior does not occur with run --tail.
Information
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: