aliyun / ossfs

Export s3fs for aliyun oss.
GNU General Public License v2.0
738 stars 152 forks source link

Print to stderr when check OSS fails #31

Closed rockuw closed 8 years ago

rockuw commented 8 years ago

This should fix #29

rockuw commented 8 years ago

Fix之后的效果:

root@iZ23qc6ioeeZ:~/ossfs# ./src/ossfs oss-dev-tianlong /tmp/ossfs -ourl=http://bucket.oss-cn-hangzhou-internal.a
liyuncs.com
ossfs: Check OSS service failed. Run ossfs with -f option to see details.
root@iZ23qc6ioeeZ:~/ossfs# ./src/ossfs oss-dev-tianlong /tmp/ossfs -ourl=http://bucket.oss-cn-hangzhou-internal.aliyuncs.com -f
[ERR] curl.cpp:CheckBucket(2625): Check bucket failed, OSS response: <?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>InvalidBucketName</Code>
  <Message>The specified bucket is not valid.</Message>
  <RequestId>576296906575C1E1E869852A</RequestId>
  <HostId>oss-dev-tianlong.bucket.oss-cn-hangzhou-internal.aliyuncs.com</HostId>
  <BucketName>oss-dev-tianlong.bucket</BucketName>
</Error>

[ERR] curl.cpp:CheckBucket(2625): Check bucket failed, OSS response: <?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>InvalidBucketName</Code>
  <Message>The specified bucket is not valid.</Message>
  <RequestId>576296906575C1E1E8698531</RequestId>
  <HostId>oss-dev-tianlong.bucket.oss-cn-hangzhou-internal.aliyuncs.com</HostId>
  <BucketName>oss-dev-tianlong.bucket</BucketName>
</Error>

[CRT] s3fs.cpp:s3fs_check_service(3681): Bad Request - result of checking service.
ossfs: Check OSS service failed. Run ossfs with -f option to see details.
hryang commented 8 years ago

+1