Skip to content

echo "test" | mc pipe /tmp/hello.txt doesn't work #1830

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

Closed
vadmeste opened this issue Sep 22, 2016 · 10 comments
Closed

echo "test" | mc pipe /tmp/hello.txt doesn't work #1830

vadmeste opened this issue Sep 22, 2016 · 10 comments
Assignees

Comments

@vadmeste
Copy link
Member

vadmeste commented Sep 22, 2016

The pipe command doesn't seem to be working as expected with the mc master:

$ echo "test" | mc --debug pipe /tmp/hello.txt
mc: <ERROR> Unable to write to one or more targets. read /dev/stdin: illegal seek
 (4) pipe-main.go:109 cmd.mainPipe(..) Tags: [/tmp/test]
 (3) pipe-main.go:84 cmd.pipe(..) Tags: [/tmp/test]
 (2) common-methods.go:87 cmd.putTargetStreamFromAlias(..) Tags: [, /tmp/test]
 (1) client-fs.go:264 cmd.(*fsClient).Put(..) Tags: [/tmp/test.part.minio]
 (0) client-fs.go:1067 cmd.(*fsClient).toClientError(..)
 Commit:b404c7583bc9 | Release-Tag:DEVELOPMENT.2016-09-22T16-57-13Z | Host:xps-u | OS:linux | Arch:amd64 | Lang:go1.7.1 | Mem:12MB/19MB | Heap:12MB/15MB
@harshavardhana
Copy link
Member

can we put some more details here? - we shouldn't be reporting bugs in this manner.

@vadmeste
Copy link
Member Author

can we put some more details here? - we shouldn't be reporting bugs in this manner.

👍 , I updated the description.

@vadmeste
Copy link
Member Author

vadmeste commented Sep 23, 2016

os.Stdin is considered as File in go and implements (ReadAt). This could change in go2.0 according to this ticket => golang/go#13473. I think os.Stdin can easily be treated separately in mc code.

@harshavardhana
Copy link
Member

os.Stdin is considered as File in go and implements (ReadAt). This could change in go2.0 according to this ticket => golang/go#13473. I think os.Stdin can easily be treated separately in mc code.

We can mask it into another struct before passing to minio-go, ie which implements io.Reader() alone.

@vadmeste
Copy link
Member Author

We can mask it into another struct before passing to minio-go, ie which implements io.Reader() alone.

This bug is reproducible only with FS, so no minio-go. client-fs anticipated this case. I added an additional check in #1834 to avoid seeking os.Stdin in Put()

@vadmeste
Copy link
Member Author

vadmeste commented Oct 31, 2016

Looks like this bug emerged again.

@vadmeste
Copy link
Member Author

vadmeste commented Oct 31, 2016

Looks like this bug emerged again.

This is a regression in minio-go, fixed it but will test further

@harshavardhana
Copy link
Member

Is this fixed @vadmeste ?

@vadmeste
Copy link
Member Author

vadmeste commented Nov 2, 2016

Is this fixed @vadmeste ?

Yes, fixed by minio/minio-go#546

@vadmeste vadmeste closed this as completed Nov 2, 2016
@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants