-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Host path handling for S3 #2151
Comments
Tagging @DennisHeimbigner but we can address these in the next release. Thanks! |
We were using a local appliance supplied to us by NCAR for testing. |
Ok, make the following change to ds3util.c and see if it fixes your problem.
to
|
Still need to prepend the region in the non-aws case, the following resolves to the correct host: /* Construct the revised host */
if (host == NULL) {
ncbytescat(buf, "s3.");
ncbytescat(buf, region);
ncbytescat(buf, AWSHOST);
} else {
ncbytescat(buf, region);
ncbytescat(buf, ".");
ncbytescat(buf, host);
}
host = ncbytesextract(buf); |
I am posting this here as it is relevant to s3 handling but could post this as a separate issue if you'd like: liblib/nc_initialize.c include/ncs3sdk.h libdispatch/ncs3sdk.cpp |
There is a problem with your prepending the region to non-aws host. |
That makes a lot of sense, the code snippet posted above by @DennisHeimbigner works as intended when I change the host to the actual host. |
Anyway, I am in the process of putting up a PR for these issues. |
re: Unidata#2151 The of a non-aws appliance broke during the switch to testing against Amazon S3. So make necessary changes to get non-aws appliances work correctly.
Fixed by PR #2152 |
During some testing to get minio (S3-compatible storage) to work we encountered some issues with the host path handling in this library.
netcdf-c/libdispatch/ds3util.c
Line 125 in 26ac2a6
host
and not the defaultAWSHOST
.netcdf-c/libdispatch/ds3util.c
Line 123 in 26ac2a6
netcdf-c/libdispatch/ds3util.c
Line 125 in 26ac2a6
https://example.com/BUCKET/dataset#mode=zarr,s3&aws.region=minio
The last one can be worked around by specifying the region as
minio.
(trailing dot), although the assumption seems to be that host will always start with a dot (e.g. AWSHOST).The text was updated successfully, but these errors were encountered: