Nothing Special   »   [go: up one dir, main page]

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

log detail error message for http error status #6032

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

half-life666
Copy link
Contributor

What problem are we solving?

Improve error log for #6011

How are we solving the problem?

Pass error message to http body, parse the error message from http_global_client_util.go

How is the PR tested?

  • Write a file in fuse mount
  • Corrupt the volume file
  • Restart volume server, filer, mount
  • Copy the file to another place
[root@udm deploy]# curl -v http://192.168.3.138:8081/123,05ff8664c39048?readDeleted=true
*   Trying 192.168.3.138:8081...
* Connected to 192.168.3.138 (192.168.3.138) port 8081 (#0)
> GET /123,05ff8664c39048?readDeleted=true HTTP/1.1
> Host: 192.168.3.138:8081
> User-Agent: curl/7.76.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< Server: SeaweedFS Volume 30GB 3.73
< Date: Sun, 15 Sep 2024 15:01:02 GMT
< Content-Length: 46
< Content-Type: text/plain; charset=utf-8
<
{"error":"CRC error! Data On Disk Corrupted"}

fuse mount log:

E0915 15:29:29.094807 filehandle_read.go:61 file handle read /opt/udm/fs3/1.dat: http://192.168.3.138:8081/123,05ff8664c39048?readDeleted=true: 500 Internal Server Error, detail error: {"error":"CRC error! Data On Disk Corrupted"}
W0915 15:29:29.094816 weedfs_file_read.go:51 file handle read /opt/udm/fs3/1.dat 0: http://192.168.3.138:8081/123,05ff8664c39048?readDeleted=true: 500 Internal Server Error, detail error: {"error":"CRC error! Data On Disk Corrupted"}

Checks

  • I have added unit tests if possible.
  • I will add related wiki document changes and link to this PR after merging.

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

Successfully merging this pull request may close these issues.

1 participant