Yaphet Kebede
01/10/2024, 3:43 PMblockstore:
type: s3
s3:
endpoint: "<https://na-s3.somehost.com/bucket>"
discover_bucket_region: false
credentials:
access_key_id: "######"
secret_access_key: "########"
the s3 bucket interface i am using is the following (https://docs.netapp.com/us-en/ontap/s3-config/ontap-s3-supported-actions-reference.html#bucket-operations)
I was wondering if anyone here is using netapp s3 buckets as storage backend for lakefs?
I was getting errors like this when i was using it
error="operation error S3: GetObject, https response error StatusCode: 501, RequestID: , HostID: , api error NotImplemented: A header or query you provided implies functionality that is not implemented."
which i believe is coming from my netapp s3 instance, but was wondering what headers were being sent by lakefs ?Itai Admi
01/10/2024, 4:20 PMYaphet Kebede
01/10/2024, 4:21 PMYaphet Kebede
01/10/2024, 4:21 PMYaphet Kebede
01/10/2024, 4:24 PMtime="2024-01-09T22:05:17Z" level=info msg="initialize blockstore adapter" func=pkg/block/factory.BuildBlockAdapter file="build/pkg/block/factory/build.go:32" type=s3
time="2024-01-09T22:05:17Z" level=info msg="initialized blockstore adapter" func=pkg/block/factory.buildS3Adapter file="build/pkg/block/factory/build.go:111" type=s3
time="2024-01-09T22:05:18Z" level=info msg="initialize blockstore adapter" func=pkg/block/factory.BuildBlockAdapter file="build/pkg/block/factory/build.go:32" type=s3
time="2024-01-09T22:05:18Z" level=info msg="initialized blockstore adapter" func=pkg/block/factory.buildS3Adapter file="build/pkg/block/factory/build.go:111" type=s3
time="2024-01-09T22:05:18Z" level=info msg="initialize OpenAPI server" func=pkg/api.Serve file="build/pkg/api/serve.go:38" service=api_gateway
time="2024-01-09T22:05:18Z" level=info msg="initialized S3 Gateway handler" func=pkg/gateway.NewHandler file="build/pkg/gateway/handler.go:124" s3_bare_domain="[<http://s3.local.lakefs.io|s3.local.lakefs.io>]" s3_region=us-east-1
time="2024-01-09T22:05:18Z" level=info msg="starting HTTP server" func=cmd/lakefs/cmd.glob..func8 file="cmd/run.go:307" listen_address="0.0.0.0:8000"
lakeFS 1.1.0 - Up and running (^C to shutdown)...
βββ ββββββ βββ βββββββββββββββββββββββββββ
βββ βββββββββββ ββββββββββββββββββββββββββββ
βββ βββββββββββββββ ββββββ ββββββ ββββββββ
βββ βββββββββββββββ ββββββ ββββββ ββββββββ
βββββββββββ ββββββ ββββββββββββββ ββββββββ
βββββββββββ ββββββ ββββββββββββββ ββββββββ
β
β If you're running lakeFS locally for the first time,
β complete the setup process at <http://127.0.0.1:8000/setup>
β
β
β For more information on how to use lakeFS,
β check out the docs at <https://docs.lakefs.io/quickstart/>
β
β
β For support or any other question, >(.οΌΏ.)<
β join our Slack channel <https://docs.lakefs.io/slack> ( )_
β
Version 1.1.0
time="2024-01-09T22:06:34Z" level=error msg="failed to get S3 object bucket *******/example key dummy" func="pkg/logging.(*logrusEntryWrapper).Errorf" file="build/pkg/logging/logger.go:284" error="operation error S3: GetObject, https response error StatusCode: 501, RequestID: , HostID: , api error NotImplemented: A header or query you provided implies functionality that is not implemented." host=lakefs.local method=POST operation=GetObject operation_id=CreateRepository path=/api/v1/repositories request_id=4dd67131-c2ca-4773-ac99-ba25f0587dfa service_name=rest_api user=admin
time="2024-01-09T22:06:34Z" level=warning msg="Could not access storage namespace" func="pkg/api.(*Controller).CreateRepository" file="build/pkg/api/controller.go:1601" error="operation error S3: GetObject, https response error StatusCode: 501, RequestID: , HostID: , api error NotImplemented: A header or query you provided implies functionality that is not implemented." reason=unknown service=api_gateway storage_namespace="s3://*******/example"
time="2024-01-09T22:06:39Z" level=error msg="failed to get S3 object bucket *******/example key dummy" func="pkg/logging.(*logrusEntryWrapper).Errorf" file="build/pkg/logging/logger.go:284" error="operation error S3: GetObject, https response error StatusCode: 501, RequestID: , HostID: , api error NotImplemented: A header or query you provided implies functionality that is not implemented." host=lakefs.local method=POST operation=GetObject operation_id=CreateRepository path=/api/v1/repositories request_id=dd6419a6-71d8-4176-adaf-ba251ae2e07d service_name=rest_api user=admin
time="2024-01-09T22:06:39Z" level=warning msg="Could not access storage namespace" func="pkg/api.(*Controller).CreateRepository" file="build/pkg/api/controller.go:1601" error="operation error S3: GetObject, https response error StatusCode: 501, RequestID: , HostID: , api error NotImplemented: A header or query you provided implies functionality that is not implemented." reason=unknown service=api_gateway storage_namespace="s3://*******/example"
Oz Katz
force_path_style
to true
to avoid DNS and certificate mismatches..
In your example, the config would look something like this:
blockstore:
type: s3
s3:
endpoint: "<https://na-s3.somehost.com/bucket>"
discover_bucket_region: false
force_path_style: true # <-- Add this
credentials:
access_key_id: "######"
secret_access_key: "########"
Yaphet Kebede
01/10/2024, 4:44 PMYaphet Kebede
01/10/2024, 4:57 PMStorage Namespace
on the UI ?
i did
Storage Namespace = "<s3://na-s3.somehost.com/bucket/test-repo>"
got the aforementioned error
tried
Storage Namespace = "<s3://test-repo>"
i got the same error
time="2024-01-10T16:48:37Z" level=warning msg="Could not access storage namespace" func="pkg/api.(*Controller).CreateRepository" file="build/pkg/api/controller.go:1601" error="operation error S3: GetObject, https response error StatusCode: 501, RequestID: , HostID: , api error NotImplemented: A header or query you provided implies functionality that is not implemented." reason=unknown service=api_gateway storage_namespace="<s3://test-repo/>"
wondering if the real issue is that i don't understand what this value should be ?Oz Katz
s3://<bucket name>/<path in the bucket>
Oz Katz
test-repo
is a bucket that exists in your S3 (or S3-compatible) storageOz Katz
/bucket
should be removed - the endpoint should not contain a bucket nameYaphet Kebede
01/10/2024, 5:06 PMIn your second example, it is expected that `
Copy codetest-repo
is a bucket that exists in your S3 (or S3-compatible) storageNo this is the new repo path that i wanted to create, and my s3 has a bucket called
bucket
so you are saying
<s3://bucket/test-repo>
should work?Yaphet Kebede
01/10/2024, 5:07 PMItai Admi
01/10/2024, 6:25 PMAmit Kesarwani
01/10/2024, 9:21 PMdocker run -d --pull always -p 8000:8000 \
--name lakefs-netapp \
-e LAKEFS_BLOCKSTORE_TYPE='s3' \
-e LAKEFS_BLOCKSTORE_S3_FORCE_PATH_STYLE="true" \
-e LAKEFS_BLOCKSTORE_S3_ENDPOINT="<https://xxx.netapp.com:443>" \
-e LAKEFS_BLOCKSTORE_S3_CREDENTIALS_ACCESS_KEY_ID="AAAAAAAAA" \
-e LAKEFS_BLOCKSTORE_S3_CREDENTIALS_SECRET_ACCESS_KEY="bbbbb" \
treeverse/lakefs run --local-settings