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

Fix remote api logs #7522

Closed
wants to merge 1 commit into from
Closed

Conversation

ashley-cui
Copy link
Member

properly returning logs through remote api
Closes: #7196
Closes: #6628

Signed-off-by: Ashley Cui [email protected]

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ashley-cui
To complete the pull request process, please assign mheon
You can assign the PR to them by writing /assign @mheon in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

properly returning logs through remote api

Signed-off-by: Ashley Cui <[email protected]>
@zhangguanzhang
Copy link
Collaborator

zhangguanzhang commented Sep 1, 2020

show add some test like this

podman run --rm --tty busybox echo 1 | cat -A

and the bug is not belong to the remote

$ podman run --rm  alpine echo 1 | cat -A
1$
$ podman run --rm --tty alpine echo 1 | cat -A
1^M$
    [root@sz-test ~]# 

@ashley-cui
Copy link
Member Author

ashley-cui commented Sep 1, 2020

@zhangguanzhang The logs wouldn't show because curl detected it as a binary, not application/json, so it didn't output anything.
I'm not sure what the cat -a is supposed to show, but using podman logs:

$ podman run --name hello  busybox echo 1 
1
$ podman logs hello
1

Feel free to test this PR and see if it fixes the issue

@zhangguanzhang
Copy link
Collaborator

must try this with the --tty

@ashley-cui
Copy link
Member Author

@zhangguanzhang still works for me

$ podman run --tty --name hello  busybox echo 1 
1
$ podman logs hello
1

@zhangguanzhang
Copy link
Collaborator

zhangguanzhang commented Sep 1, 2020

with | cat -A

$ podman run --rm  alpine echo 1 | cat -A
1$
$ podman run --rm --tty alpine echo 1 | cat -A
1^M$
    [root@sz-test ~]# 

@ashley-cui
Copy link
Member Author

ashley-cui commented Sep 1, 2020

@zhangguanzhang I'm not sure what the cat -A has to do with the remote podman logs command, since podman logs works.

@zhangguanzhang
Copy link
Collaborator

In this case, I may need to open a new issue

@ashley-cui
Copy link
Member Author

@zhangguanzhang It might be worthwhile, since this PR is dealing with remote log output, not cli as you have been looking at

@ashley-cui
Copy link
Member Author

uh oh looks like i broke something while fixing something..

@ashley-cui ashley-cui closed this Sep 1, 2020
@ashley-cui ashley-cui deleted the binlogs branch October 12, 2020 13:59
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APIv2] Container log not provided [APIv2] log output of container is in binary format
3 participants