user
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-18T120306+0100]lakeFS/pkg/api/auth middleware.go351 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-18T120439+0100]lakeFS/pkg/block/s3/adapter.go309 pkg/block/s3.(*Adapter).Get failed to get S3 object bucket <id>.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-18T120439+0100]lakeFS/pkg/api/controller.go1576 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>.r2.cloudflarestorage.com/my_bucket"
ERROR [2023-04-18T120520+0100]lakeFS/pkg/block/s3/adapter.go275 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>.r2.cloudflarestorage.com/my_bucket/dummy" user=sg
WARNING[2023-04-18T120520+0100]lakeFS/pkg/api/controller.go1576 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-18T120536+0100]lakeFS/pkg/block/s3/adapter.go309 pkg/block/s3.(*Adapter).Get failed to get S3 object bucket <id>.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-be…user
04/18/2023, 11:27 AMuser
04/18/2023, 11:31 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 thisuser
04/18/2023, 11:35 AMSTREAMING-AWS4-HMAC-SHA256-PAYLOAD not implementeduser
04/18/2023, 11:35 AMuser
04/18/2023, 11:35 AMuser
04/18/2023, 11:36 AMuser
04/18/2023, 11:40 AMuser
04/18/2023, 11:42 AMuser
04/18/2023, 11:43 AMuser
04/18/2023, 11:47 AMuser
04/18/2023, 11:50 AMuser
04/18/2023, 11:53 AMuser
04/18/2023, 11:54 AMuser
04/18/2023, 11:57 AMuser
04/18/2023, 12:00 PMuser
04/18/2023, 12:07 PMuser
04/18/2023, 12:08 PMuser
04/18/2023, 12:21 PMuser
04/18/2023, 12:28 PMuser
04/18/2023, 1:10 PMuser
04/18/2023, 1:16 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)"user
04/18/2023, 1:17 PMuser
04/18/2023, 1:17 PMuser
04/18/2023, 1:18 PMlakefs_dev scheme and it seems to be trying to use the public scheme regardless of the connection string, is that the case?user
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';user
04/18/2023, 1:31 PMuser
04/18/2023, 1:37 PMapplication_name filter?