diff --git a/docker/conf/nginx.conf b/docker/conf/nginx.conf index ef538162e7..bc9e3db6da 100644 --- a/docker/conf/nginx.conf +++ b/docker/conf/nginx.conf @@ -13,6 +13,7 @@ http { upstream objectnodes { server 192.168.0.41:80; server 192.168.0.42:80; + server 192.168.0.43:80; } server { diff --git a/docker/conf/objectnode.json b/docker/conf/objectnode.json index c1dbd8d6f7..4d2d2cf7e0 100644 --- a/docker/conf/objectnode.json +++ b/docker/conf/objectnode.json @@ -11,5 +11,11 @@ "enableHTTPS": "false", "domains": [ "object.chubao.io" + ], + "signatureIgnoredActions": [ + "oss:action:GetObjectXAttr", + "oss:action:PutObjectXAttr", + "oss:action:DeleteObjectXAttr", + "oss:action:ListObjectXAttrs" ] } diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index b0e762f7c3..8e6af36c28 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -33,6 +33,7 @@ services: - datanode4 - objectnode1 - objectnode2 + - objectnode3 - nginx networks: extnetwork: @@ -279,6 +280,20 @@ services: extnetwork: ipv4_address: 192.168.0.42 + objectnode3: + image: chubaofs/cfs-base:1.0 + ports: + - "80" + volumes: + - ./bin:/cfs/bin + - ./conf/objectnode.json:/cfs/conf/objectnode.json + - ./script/start_objectnode.sh:/cfs/script/start.sh + command: /bin/sh /cfs/script/start.sh + restart: on-failure + privileged: true + networks: + extnetwork: + ipv4_address: 192.168.0.43 client: image: chubaofs/cfs-base:1.0 @@ -347,7 +362,7 @@ services: privileged: true networks: extnetwork: - ipv4_address: 192.168.0.100 + ipv4_address: 192.168.0.300 build: image: chubaofs/cfs-base:1.0 diff --git a/objectnode/api_handler_object.go b/objectnode/api_handler_object.go index 0a347cc336..dd7b7a8c3d 100644 --- a/objectnode/api_handler_object.go +++ b/objectnode/api_handler_object.go @@ -920,11 +920,11 @@ func (o *ObjectNode) putObjectXAttrHandler(w http.ResponseWriter, r *http.Reques } // Get object extend attribute (xattr) -func (o *ObjectNode) getObjectXAttr(w http.ResponseWriter, r *http.Request) { +func (o *ObjectNode) getObjectXAttrHandler(w http.ResponseWriter, r *http.Request) { var err error var param *RequestParam if param, err = o.parseRequestParam(r); err != nil { - log.LogWarnf("deleteObjectXAttrHandler: parse request param fail: requestID(%v) err(%v)", GetRequestID(r), err) + log.LogWarnf("getObjectXAttr: parse request param fail: requestID(%v) err(%v)", GetRequestID(r), err) _ = InvalidArgument.ServeResponse(w, r) return } diff --git a/objectnode/policy_action.go b/objectnode/policy_action.go index 73fb3bc0e1..75dbbbd324 100644 --- a/objectnode/policy_action.go +++ b/objectnode/policy_action.go @@ -83,7 +83,7 @@ const ( AbortMultipartUploadAction Action = OSSActionPrefix + "AbortMultipartUpload" GetBucketLocationAction Action = OSSActionPrefix + "GetBucketLocation" GetObjectXAttrAction Action = OSSActionPrefix + "GetObjectXAttr" - PutObjectXAttrAction Action = OSSActionPrefix + "PutObjectAttr" + PutObjectXAttrAction Action = OSSActionPrefix + "PutObjectXAttr" ListObjectXAttrsAction Action = OSSActionPrefix + "ListObjectXAttrs" DeleteObjectXAttrAction Action = OSSActionPrefix + "DeleteObjectXAttr" GetObjectTaggingAction Action = OSSActionPrefix + "GetObjectTagging" diff --git a/objectnode/router.go b/objectnode/router.go index 1649ad4cf8..1a4d92b234 100644 --- a/objectnode/router.go +++ b/objectnode/router.go @@ -81,7 +81,7 @@ func (o *ObjectNode) registerApiRouters(router *mux.Router) { Methods(http.MethodGet). Path("/{object:.+}"). Queries("xattr", "", "key", "{key:.+}"). - HandlerFunc(o.getObjectXAttr) + HandlerFunc(o.getObjectXAttrHandler) // List object XAttrs r.NewRoute().Name(ListObjectXAttrsAction.UniqueRouteName()).