跳转到主内容

使用metada-directive replace的StorageGRID 副本对象行为不正常

Views:
Visibility:
Public
Votes:
0
Category:
storagegrid<a>2009467512</a>
Specialty:
not set
Last Updated:

适用场景

  • NetApp StorageGRID
  • s3fs
  • [1]  已启用存储对象加密选项
  • 使用metadata-directive Replace复制对象

问题描述

尝试使用复制对象时 metadata-directive REPLACE 收到错误代码 501 和错误消息 Changing the server-side encryption of an existing object is not supported

  • 复制步骤如下:
  1. 通过调试挂载s3fs:

root@scspa0499453001:~# s3fs bucketnonvers /mnts3fs/ -o passwd_file=/root/custom-passwd-s3fs,allow_other,use_path_request_style,mp_umask=0022,url=http://ams.sglab.netapp.com:10456,noatime,ensure_diskfree=500 -d -d -f -o f2 -o curldbg -o no_check_certificate

  1. 打开一个额外的会话并执行以下命令:
    1. cd /mnts3fs
    2. echo foo > bar
    3. chown nobody bar 命令返回 chown: changing ownership of 'bar': Operation not supported
  • 示例日志:
2023-02-09T13:07:58.178Z [CURL DBG] > PUT /bucketnonvers/bar HTTP/1.1
2023-02-09T13:07:58.178Z [CURL DBG] > User-Agent: s3fs/1.91 (commit hash unknown; OpenSSL)
2023-02-09T13:07:58.178Z [CURL DBG] > Accept: */* 2023-02-09T13:07:58.178Z[CURL DBG] > Authorization: AWS4-HMAC-SHA256 Authorization: AWS4-HMAC-SHA256 Credential=ZEHP4Q6H5C7OAA7YJX0V/20230214/us-east-1/s3/aws4_request, SignedHeaders=content-type;host;x-amz-acl;x-amz-content-sha256;x-amz-copy-source;x-amz-date;x-amz-meta-gid;x-amz-meta-mode ;x-amz-meta-mtime;x-amz-meta-uid;x-amz-metadata-directive;x-amz-server-side-encryption, Signature=c9ef32f297084d306f222d53c730f70224e90ea00327cad2aebf127ac4b2607e
2023-02-09T13:07:58.178Z [CURL DBG] > Content-Type: application/octet-stream
2023-02-09T13:07:58.178Z [CURL DBG] > host: ams.sglab.netapp.com:10456
2023-02-09T13:07:58.178Z [CURL DBG] > x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
2023-02-09T13:07:58.178Z [CURL DBG] > x-amz-copy-source: /bucketnonvers/bar
2023-02-09T13:07:58.178Z [CURL DBG] > x-amz-date: 20230209T130758Z
2023-02-09T13:07:58.178Z [CURL DBG] > x-amz-meta-atime: 1672763344
2023-02-09T13:07:58.178Z [CURL DBG] > x-amz-meta-ctime: 1675948078
2023-02-09T13:07:58.178Z [CURL DBG] > x-amz-meta-gid: 0
2023-02-09T13:07:58.178Z [CURL DBG] > x-amz-meta-mode: 33279
2023-02-09T13:07:58.178Z [CURL DBG] > x-amz-meta-mtime: 1672763344
2023-02-09T13:07:58.178Z [CURL DBG] > x-amz-meta-uid: 0
2023-02-09T13:07:58.178Z [CURL DBG] >x-amz-metadata-directive: REPLACE
2023-02-09T13:07:58.178Z [CURL DBG] >x-amz-server-side-encryption: AES256
2023-02-09T13:07:58.178Z [CURL DBG] > Content-Length: 0
2023-02-09T13:07:58.178Z [CURL DBG] > Expect: 100-continue
2023-02-09T13:07:58.178Z [CURL DBG] >
2023-02-09T13:07:58.190Z [CURL DBG] <HTTP/1.1 501 Not Implemented
2023-02-09T13:07:58.190Z [CURL DBG] < date: Tue, 14 Feb 2023 08:47:19 GMT
2023-02-09T13:07:58.190Z [CURL DBG] < content-type: application/xml
2023-02-09T13:07:58.190Z [CURL DBG] < content-length: 269
2023-02-09T13:07:58.190Z [CURL DBG] < x-amz-request-id: 1676364439425331
2023-02-09T13:07:58.190Z [CURL DBG] < x-amz-id-2: :
2023-02-09T13:07:58.190Z [CURL DBG] < x-ntap-sg-trace-id: 8ececf3a24ac7376
2023-02-09T13:07:58.190Z [CURL DBG] < strict-transport-security: max-age=16000000; includeSubDomains; preload;
2023-02-09T13:07:58.190Z [CURL DBG] * HTTP error before end of send, stop sending
2023-02-09T13:07:58.190Z [CURL DBG] < 2023-02-09T13:07:58.190Z [CURL DBG] * Closing connection 9
2023-02-09T13:07:58.191Z [INF] curl.cpp:RequestPerform(2387): HTTP response code 501 was returned, returning ENOTSUP
2023-02-09T13:07:58.191Z [DBG] curl.cpp:RequestPerform(2388): Body Text: <?xml version="1.0" encoding="UTF-8"?><Error><Code>XNotImplemented</Code><Message>Changing the server-side encryption of an existing object is not supported.</Message><Resource>/bucketnonvers/test1/test</Resource><RequestId>1675948077116669</RequestId></Error>
2023-02-09T13:0 7:58.191Z [DBG] curl_handlerpool.cpp:ReturnHandler(103): Return handler to pool unique: 144, error: -95 (Operation not supported), outsize: 16 unique: 145, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 126994
 

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.