Sam Gaw
04/18/2023, 11:23 AMhttps://<id>.<http://r2.cloudflarestorage.com/my_bucket|r2.cloudflarestorage.com/my_bucket>
Created a lakefs config file:
$ cat .config/lakefs.yaml
database:
type: "postgres"
postgres:
connection_string: "<postgresql://sg@127.0.0.1:5432/lakefs_dev>"
auth:
encrypt:
secret_key: "a4d333b733f7b63d69fe9065701a4cf8"
blockstore:
type: s3
s3:
force_path_style: true
endpoint: https://<id>.<http://r2.cloudflarestorage.com|r2.cloudflarestorage.com>
discover_bucket_region: false
credentials:
access_key_id: <key>
secret_access_key: <secret>
Running lakefs --config ~/.config/lakefs.yaml run
does what's expected. I create an admin account and attempt to create a new repo with the following settings:
Repository ID: local_dev
Storage Namespace: s3://<id>.<http://r2.cloudflarestorage.com/my_bucket|r2.cloudflarestorage.com/my_bucket>
Default Branch: trunk
That gives me a "failed to create repository: failed to access storage" error.
ERROR [2023-04-18T12:03:06+01:00]lakeFS/pkg/api/auth_middleware.go:351 pkg/api.userByAuth authenticate error="2 errors occurred:\n\t* built in authenticator: credentials not found\n\t* email authenticator: crypto/bcrypt: hashedSecret too short to be a bcrypted password\n\n" service=api_gateway user=""
ERROR [2023-04-18T12:04:39+01:00]lakeFS/pkg/block/s3/adapter.go:309 pkg/block/s3.(*Adapter).Get failed to get S3 object bucket <id>.<http://r2.cloudflarestorage.com/my_bucket|r2.cloudflarestorage.com/my_bucket> key dummy error="InvalidBucketName: The specified bucket name is not valid.\n\tstatus code: 400, request id: , host id: " host="127.0.0.1:8000" method=POST operation=GetObject operation_id=CreateRepository path=/api/v1/repositories request_id=11d96aa3-7c8e-42f2-8f64-bb35429258a9 service_name=rest_api user=sg
WARNING[2023-04-18T12:04:39+01:00]lakeFS/pkg/api/controller.go:1576 pkg/api.(*Controller).CreateRepository Could not access storage namespace error="InvalidBucketName: The specified bucket name is not valid.\n\tstatus code: 400, request id: , host id: " reason=unknown service=api_gateway storage_namespace="s3://<id>.<http://r2.cloudflarestorage.com/my_bucket|r2.cloudflarestorage.com/my_bucket>"
ERROR [2023-04-18T12:05:20+01:00]lakeFS/pkg/block/s3/adapter.go:275 pkg/block/s3.(*Adapter).streamToS3 bad S3 PutObject response error="s3 error: <?xml version=\"1.0\" encoding=\"UTF-8\"?><Error><Code>NotImplemented</Code><Message>STREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented</Message></Error>" host="127.0.0.1:8000" method=POST operation=PutObject operation_id=CreateRepository path=/api/v1/repositories request_id=061e03f2-a2e2-471b-9dfe-b22f98fb0cb8 service_name=rest_api status_code=501 url="https://<id>.<http://r2.cloudflarestorage.com/my_bucket/dummy|r2.cloudflarestorage.com/my_bucket/dummy>" user=sg
WARNING[2023-04-18T12:05:20+01:00]lakeFS/pkg/api/controller.go:1576 pkg/api.(*Controller).CreateRepository Could not access storage namespace error="s3 error: <?xml version=\"1.0\" encoding=\"UTF-8\"?><Error><Code>NotImplemented</Code><Message>STREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented</Message></Error>" reason=unknown service=api_gateway storage_namespace="<s3://my_bucket>"
ERROR [2023-04-18T12:05:36+01:00]lakeFS/pkg/block/s3/adapter.go:309 pkg/block/s3.(*Adapter).Get failed to get S3 object bucket <id>.<http://r2.cloudflarestorage.com/my_bucket|r2.cloudflarestorage.com/my_bucket> key dummy error="InvalidBucketName: The specified bucket name is not valid.\n\tstatus code: 400, request id: , host id: " host="127.0.0.1:8000" method=POST operation=GetObject operation_id=CreateRepository path=/api/v1/repositories request_id=c01cf2d9-5be1-4bff-be29-467f082de1d4 service_name=rest_api user=sg
WARNING[2023-04-18T12:05:36+01:00]lakeFS/pkg/api/controller.go:1576 pkg/api.(*Controller).CreateRepository Could not access storage namespace error="InvalidBucketName: The specified bucket name is not valid.\n\tstatus code: 400, request id: , host id: " reason=unknown service=api_gateway storage_namespace="s3://<id>.<http://r2.cloudflarestorage.com/my_bucket|r2.cloudflarestorage.com/my_bucket>"
If I click the info icon in the create repo modal, it takes me to a dead link: https://docs.lakefs.io/setup/create-repo.html#create-the-repository so I've no idea what format "Storage Namespace" is expecting.Or Tzabary
04/18/2023, 11:27 AMhttps://<id>.<http://r2.cloudflarestorage.com/|r2.cloudflarestorage.com/>
prefix as it’s already configured in the configuration file.
can you please retry with <s3://my_bucket>
only?
regarding the broken link, sorry to hear that, I opened an issue to address thisSam Gaw
04/18/2023, 11:35 AMSTREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented
Or Tzabary
04/18/2023, 11:40 AMSam Gaw
04/18/2023, 11:42 AMOr Tzabary
04/18/2023, 11:47 AMSam Gaw
04/18/2023, 11:50 AMOr Tzabary
04/18/2023, 11:53 AMSam Gaw
04/18/2023, 11:54 AMOr Tzabary
04/18/2023, 11:57 AMSam Gaw
04/18/2023, 12:00 PMOr Tzabary
04/18/2023, 12:08 PMeinat.orr
04/18/2023, 12:21 PMSam Gaw
04/18/2023, 12:28 PMlakefs
seems to be ignoring the search_path
param given to pgx in the postgres connection string. If I try to set the postgres user to a specific schema it barfs error="setup failed: ERROR: no schema has been selected to create in (SQLSTATE 3F000)"
on startup. If I try to enforce it only from the DB side with ALTER USER, it ignores the search_path set in the session and explicitly tries to create tables in public -- error="setup failed: ERROR: permission denied for schema public (SQLSTATE 42501)"
Or Tzabary
04/18/2023, 1:17 PMlakefs_dev
scheme and it seems to be trying to use the public
scheme regardless of the connection string, is that the case?Sam Gaw
04/18/2023, 1:28 PM<postgresql://lakefs:password@127.0.0.1:5432/lakefs_dev?application_name=lakefs>
But after creating a 'datalake' schema and pinning the lakefs
user to it via _search_path_, the config that produced the errors was:
<postgresql://lakefs:password@127.0.0.1:5432/world_dev?application_name=lakefs&search_path=datalake>
Note: application_name is respected and I can confirm with SELECT * FROM pg_stat_activity WHERE application_name = 'lakefs';
Or Tzabary
04/18/2023, 1:31 PMapplication_name
filter?