Skip to content
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

Support for OVH Object Storage #5

Closed
Louspirit opened this issue Jul 31, 2020 · 9 comments
Closed

Support for OVH Object Storage #5

Louspirit opened this issue Jul 31, 2020 · 9 comments

Comments

@Louspirit
Copy link

Hello Alan,

Huge thanks to you to provide a working out of the box solution!

The ideal solution (at least for me) would be to use OVH Object Storage (hosted in France and cheaper) instead than AWS S3.

But I am new to cloud and it looks confusing, so maybe you see clearly what should be done to configure Estranged.Lfs.

OVH say that they are S3-compatible, here is their guide.
Does it mean that is is possible to use your solution as is ? (only changing the S3 URL somehow)

Or is it needed to implement a IBlobAdapter? By using AmazonS3Client too?

I am a bit lost...

@alanedwardes
Copy link
Owner

Hi Guillaume,

I'm glad you're finding the library useful!

If OVH offers an S3 compatible API, then it should just be a case of changing the service URL on the S3 client configuration. If you're consuming the Lambda version, you can modify the S3 client config here:

services.AddLfsS3Adapter(new S3BlobAdapterConfig { Bucket = lfsBucket }, new AmazonS3Client(new AmazonS3Config { UseAccelerateEndpoint = s3Acceleration }));

The initialisation of AmazonS3Config can be changed like this:

new AmazonS3Config
{
   ServiceURL = "<ovh's s3 compatible endpoint>"
}

You'll need to build it yourself and deploy it with the change - I just updated the README.md with instructions on how to build and deploy the Lambda component: https://github.com/alanedwardes/Estranged.Lfs#deploying-to-lambda

Let me know if that helps!
Alan

@Louspirit
Copy link
Author

Hi Alan,

Thanks for the quick reply.

I am currently in contact with OVH to make a AWS client work with OVH Object Storage.

The endpoint will be https://s3.<public cloud region>.cloud.ovh.net.
This is the endpoint for calling the API. Seems that authentication to call the endpoint will be needed too (maybe in your case it was carried by the IAM role in your CloudFormation stack). Where to add aws_access_key_id and aws_secret_access_key_id ?

Still wandering where I should put the Object Storage bucket URL.
image

Not sure what to put in these values :

"s3-prefix": "Estranged.Lfs.Hosting.Lambda/",
  "s3-bucket": "ae-temp",

bucket isn't separated from lambda ?

Not yet succeeded to upload the lambda - it asks cloud template path, I gave your magic stack link - I will try with AWS VS extension instead of cmd...

Does the dotnet version allows to bypass lambda ? How does it work? How to configure it ?

Louspirit

@Louspirit
Copy link
Author

Louspirit commented Aug 10, 2020

Hi Alan,

Here are the news.

Firstly, I managed to make the AWS CLI client with OVH with the guide mentioned before.
I would just add that the plugin awscli-plugin-endpoint isn't compatible with AWS CLIV2, so a workaround is needed. This part allowed to test OVH S3 compatibility, endpoint url, access key and secret.

Secondly, I tried to make the AmazonS3Client .Net Core client with OVH. I tried at first to use the DotNet version of Estranged.Lfs.

It would be nice to detail a little more the readme for this part.

  1. Edit
    services.AddLfsS3Adapter(new S3BlobAdapterConfig{Bucket = "test-ovh"}, new AmazonS3Client("MyAccesKeyAWS", "MyAccesSecretAWS", new AmazonS3Config { ServiceURL = "https://s3.MyPublicRegionLowerCase.cloud.ovh.net" }));

  2. It can be launched in VS by choosing Estranged.Lfs.Hosting.AspNet (not the default IIS Express option that doesnt work).

image
3. Or it can be published in folder, then launched with Estranged.Lfs.Hosting.AspNet.exe
4. This is a console application that is listening for HTTP LFS requests on https://localhost:5001

image

  1. Change the .lfconfig to send request to the console app
[lfs]
url = https://localhost:5001/
  1. Push from git repo , and enter when asked the user and password set by this line
    services.AddSingleton<IAuthenticator>(x => new DictionaryAuthenticator(new Dictionary<string, string> { { "usertest", "passwordtest" } }));

  2. The file is present in OVH Object Storage
    image

Note : This line is currently not used and causes error:
IConfiguration credentials = new ConfigurationBuilder().AddJsonFile("credentials.json").Build();

Now I will update my fork and try to use AWS Lambda to connect to OVH Object Storage since OVH Lambda are not currently stable.

@Louspirit
Copy link
Author

Louspirit commented Aug 12, 2020

Hello Alan,

I finally get it working with AWS Lambda too. Some things needed to be slightly ajusted or just detailed a little more.

In the file aws-lambda-tool-defaults.json, the only part relative to OVH is in environment-variables.
I varialized the OVH region, access key and password needed by the AmazonClient.
Before to publish to lambda, AWS Client must be configured and working for AWS.

I added some information in the README of my OVH-ready fork: https://github.com/MineoGames/Estranged.Lfs.

Cheers

@Louspirit
Copy link
Author

For other who would need this, I wrote an article explaining the whole thing : https://www.mineogames.com/2020/08/12/VERSIONING_GIT_LFS/

I am gonna close the issue now.

Happy coding !

@Louspirit
Copy link
Author

Louspirit commented Sep 17, 2020

Hello @alanedwardes,

Last week I tried to clone the repo from another PC and I got errors 😞 Indeed, pushing LFS file to OVH with lambda works but not pulling them !

I read your code and tried to understand what's happening :
https://github.com/alanedwardes/Estranged.Lfs/blob/master/src/Estranged.Lfs.Data/ObjectManager.cs
I see that you put authenticated=true but in the traces, authenticated worths null.

Here are the traces while doing git lfs pull, not so clear to me... :


11:33:12.457232 trace git-lfs: api: batch 63 files
11:33:12.457232 trace git-lfs: creds: git credential cache ("https", "zhg6fwevq0.execute-api.eu-west-1.amazonaws.com", "")
11:33:12.457232 trace git-lfs: Filled credentials for https://zhg6fwevq0.execute-api.eu-west-1.amazonaws.com/lfs
11:33:12.457232 trace git-lfs: HTTP: POST https://zhg6fwevq0.execute-api.eu-west-1.amazonaws.com/lfs/objects/batch
> POST /lfs/objects/batch HTTP/1.1
> Host: zhg6fwevq0.execute-api.eu-west-1.amazonaws.com
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Authorization: Basic * * * * *
> Content-Length: 5691
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> User-Agent: git-lfs/2.9.1 (GitHub; windows 386; go 1.12.7; git 7b479cc8)
>
{"operation":"download","objects":[{"oid":"94c993abd6ec613a0690f362364a80e3ff88981d5712eaeeda6b2a387483ed0a","size":178268315},{"oid":"34d9494b2ad7ea574264f1c2cfe52a6302e2fd384dac4465cf92b79b57a11b2d","size":122505650},{"oid":"ebc9361d9d3712bd8c7bb11","size":7938044},{"oid":"bc6f12592680dad4f45e417823f6664ec8eae6f208c1a49606fdb07a87018424","size":7372800},{"oid":"de393f72321a768dc3964f30238fa8f5561a713f68a186e839f884400716418f","size":5481498},{"oid":"f4572bc190bb73b0aac276","size":5292044},{"oid":"63e0dc193a7062bc4e82b4a7f8f8b6023c4a80fa382a6a6b858cf0900ae44566","size":2646044},{"oid":"7e57d2c3a3f082606a686b6f7a2f441306f6f2ccd42bcc2669b3be47b41eea94","size":1658880},{"oid":"6a668d6ce7368c2a34f1de","size":1033640},{"oid":"e5efc1e3cbbbcb108f72412e80e8e3797bf0b27fa3118de6ddea6338c8a5e7b7","size":909608},{"oid":"94f60933ccb266541e3418cbdd477aeea2f075bc271aa436da06e485b4e9f52b","size":580567},{"oid":"a54a42e1febed3d183d74","size":341152},{"oid":"80c12e3eca0772db7af0b7ef6cdbd80e608cff694f743d29ae4931b496df3298","size":270263},{"oid":"2166cf3b49fa321583bf989f330fb6e1b98c694e23e8e52e6bd2040a7617c3e4","size":230437},{"oid":"2d555d848c2eb6fd8b1ee","size":128090},{"oid":"d35fea997b9cc97b9ccad878ed36e6e37318615c2c60f8111300c53b0b0c7e5c","size":108514},{"oid":"08b7354a721ce1dde690348e5979060b62f019e09beb4c6391ad41d6ad665a91","size":106173},{"oid":"343c44836fddd47fadfa59466e28":100241},{"oid":"c9d3a71c5799b0b348ba6c3a0985054dde259017608a7bc997656ff259ad193f","size":95426},{"oid":"90677fb6733a924403d4cf4eeb506cd007c3693c2f9771b7e3b8ee1ea7355b92","size":92319},{"oid":"3cbc29b16fa935b9e54ce875928f0c31e557e"oid":"345e6ca7d3d5020bb63be6f86d44a1e44492e5b822f0df811c78e8add1e52632","size":80698},{"oid":"32b2744f99e3acca612d7248bdd96d7ce2961b68c7d571f37c4759c84f89a61d","size":79224},{"oid":"e4c989c019e867d2a9833e96e3ebfa7135187190870f64996432f6a205bb7df0c8328f6045b4e4b5a10483061fc287e3c1ea662237da","size":67977},{"oid":"d8744dc5b18b26e1485fd89e6c33781749d0d37187896d9a46db84b2372b129a","size":62222},{"oid":"c27b50f165dde34ce948d13d0f37869847cb62fab8b8f32ef180afc051d134087d73a0877dc064ecd0880f835655a64224b66697a671","size":48186},{"oid":"b168af71f88d261bb841fd8c69563a6b5c179fcfdff211a4e1cd8d9f906b7049","size":45259},{"oid":"dc0d1577ac9779f488f07cbdd78304d8f197b054115ef504a3e5c861d664a523","sizec24a0212a456986d3f70ac1e9569877cc8009","size":16671},{"oid":"bb8f329acc9d0c2815d28349d5a4144ebd337f7e2a93819cf1a7c3cc9b06ecea","size":16085},{"oid":"32df103dd6f9e1c63e0d1d8f7ac01c5a036e1858aa7f732cfc303e374433b9d6","size":15500},{a54cacd873c86c580d26f64cd6d","size":14892},{"oid":"129a59bccad750da9f37591ab1616c798021230be28e060b04ac2a69f0884b73","size":14793},{"oid":"2227f2cce0c3cce682dda39b973c1687d640b7bb88e3444c1725b1a14cee51ce","size":14707},{"oid":"455a5f88ae86097c14bb","size":14418},{"oid":"59747ac98775730209beef78a36d772fe6c82dbace8f94a9270ca6899e7219ef","size":14329},{"oid":"62df28125ad71afa2596b1fe60f85f9711a98bd1fad72c7f431d7d58f03d04aa","size":14320},{"oid":"0070d1dbd0905bdbf11e","size":14138},{"oid":"ca20523bd9b8c47c0bfad42c1127b7351f517a898b3d03ad130cd09a0bc98661","size":14105},{"oid":"fae70f4726784a5de23dc0f92833511f3344c59f50460115bca27ee573f8fe03","size":7020},{"oid":"eac09a19149b472680abd8bcb38:4934},{"oid":"a5063bc88a2c328ef7793f1f952cf1e205a7d0f12c774f85daf6336875afc9dc","size":4341},{"oid":"9a4c9fd3d85a99b80d3008e8c9ede55943cc16b79a382a8200b3fa4883d5468b","size":3371},{"oid":"edcb9b1e92c4850c5dd1a4346e6a31eea4f25c18032ecf91b7e4a799b61ce29e182d44ebd73c3bacfcde18d70480a22d1882716ce6","size":1493},{"oid":"14cf1270e5141cdb6de6d8385773ecaf1525beced9f8bd126be18419e5b07264","size":1260}],"transfers":["lfs-standalone-file","basic"],"ref":{"name":"refs/


< HTTP/2.0 200 OK
< Content-Length: 18586
< Content-Type: application/vnd.git-lfs+json; charset=utf-8
< Date: Mon, 14 Sep 2020 09:33:16 GMT
< Via: 1.1 099547a0e052eaf06abe4d508de91bbc.cloudfront.net (CloudFront)
< X-Amz-Apigw-Id: S2XSKF5IDoEFtyg=
< X-Amz-Cf-Id: 73Og330r_LQ8GLK5yE2rJo4TNu20CfhI9p9O9t0jO_pB5yLjfJUgRQ==
< X-Amz-Cf-Pop: CDG50-C1
< X-Amzn-Remapped-Content-Length: 18586
< X-Amzn-Requestid: ab7cce92-ed92-491a-9026-2c8049718086
< X-Amzn-Trace-Id: Root=1-5f5f38da-7065f5a6741e13cfbf778af2;Sampled=0
< X-Cache: Miss from cloudfront
<
11:33:14.463923 trace git-lfs: HTTP: {"transfer":"basic","objects":[{"oid":"94c993abd6ec613a0690f362364a80e3ff88981d5712eaeeda6b2a387483ed0a","size":178268315,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error m}},{"oid":"34d9494b2ad7ea574264f1c2cfe52a6302e2fd384dac4465cf92b79b57a11b2d","size":122505650,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with E
{"transfer":"basic","objects":[{"oid":"94c993abd6ec613a0690f362364a80e3ff88981d5712eaeeda6b2a387483ed0a","size":178268315,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadReque52a6302e2fd384dac4465cf92b79b57a11b2d","size":122505650,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with E11:33:14.463923 trace git-lfs: HTTP: rror Code BadRequest and Http Status Code Baddeea19860a","size":99667291,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service.r":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"bc6f12592680dad4f45e417823f6664ec8eae6f208c1a49606fdb07equest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"de393f72321a
rror Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"ebc9769897bbb8081f6c1c04f68a0b084023fd93884e671c07548bdeea19860a","size":99667291,"authenticated":null,"actirror information was returned by the service."}},{"oid":"11f5e0c704d309157a4ee7972226919ce373c4fc057dc361d9d3712bd8c7bb11","size":7938044,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Er80dad4f45e417823f6664ec8eae6f208c1a49606fdb07a87018424","size":7372800,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further err68a186e839f884400716418f","size":5481498,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned byons":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"18a02de85f46ec357a613d6c15d639bfe42ec93dc1ror Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"63e0dc193a7062bc4e82b4a7f8f8b6023c4a80fa382a6a6b858cf0900ae44566","size":2646044,"authenticated":null,"actionor information was returned by the service."}},{"oid":"7e57d2c3a3f082606a686b6f7a2f441306f6f2ccd42bcc2669b3be47b41eea94","size":1658880,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Erro3549131accc288eb9c0a7dbf8776ef4b35815fbbd3c1471154df","size":1503232,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error0,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service.
768dc3964f30238fa8f5561a713f68a186e839f884400716418f","size":5481498,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error4,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"18a02de85f46ecError making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"63e0dc193a7062bc4e82b4a7f8f8b6023c4a80fa382a6a6b858cf0900ae44566","size":2646044,e BadRequest. No further error information was returned by the service."}},{"oid":"7e57d2c3a3f082606a686b6f7a2f441306f6f2ccd42bcc2669b3be47b41eea94","size":1658880,"authenticated":null,"actions":{},"error":{"code":400,"message":"Erice."}},{"oid":"6a668d6cebb73549131accc288eb9c0a7dbf8776ef4b35815fbbd3c1471154df","size":1503232,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code 7368c2a34f1de","size":1033640,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the servicauthenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"94f60933ccb266541r making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"a54a42e1febed38024f58bc029038ccfb56cdb5486634dd833a9779a800fa1cd","size":430196,"authRequest. No further error information was returned by the service."}},{"oid":"4e9c532fa2a0be9d9fa6e61fd57f15195c75f063ea1fe0d239bd37925d183d74","size":341152,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error ma},{"oid":"80c12e3eca0772db7af0b7ef6cdbd80e608cff694f743d29ae4931b496df3298","size":270263,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequ17c3e4","size":230437,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"de":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"021d9a9248908a6eb1326386fb9fc1ed433a4d411046c5706522e6104d299fnd Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"d35fea997b9cc97b9ccad878ed36e6e37318615c2c60f8111300c53b0b0c7e5c","size":108514,"authenticated":null,"actions":{},"error":{"code":urned by the service."}},{"oid":"08b7354a721ce1dde690348e5979060b62f019e09beb4c6391ad41d6ad665a91","size":106173,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Ha54ba688e1e610f17b7d384443be4","size":103213,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returnections":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"c9d3a71c5799b0b348ba6c3a0985054dde25901rror Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"90677fb6733a924403d4cf4eeb506cd007c3693c2f9771b7e3b8ee1ea7355b92","size":92319,"authenticated":null,"actionsr informat
"}},{"oid":"e5efc1e3cbbbcb108f72412e80e8e3797bf0b27fa3118de6ddea6338c8a5e7b7","size":909608,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadReb4e9f52b","size":580567,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"4e9c532fa2a0be9d9fa6e61fd57f15195c75f063ea1fe0d239bd37925d18 and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"80c12e3eca0772db7af0b7ef6cdbd80e608cff694f743d29ae4931b496df3298","size":270263,"authenticated":null,"actions":{},"error":{"codeeturned by the service."}},{"oid":"2166cf3b49fa321583bf989f330fb6e1b98c694e23e8e52e6bd2040a7617c3e4","size":230437,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and57e840f84158dcc15b178b97c6e9e27","size":139908,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was retur"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"d35fea997b9cc97b9ccad878ed36e6e373186h Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"08b7354a721ce1dde690348e5979060b62f019e09beb4c6391ad41d6ad665a91","size":106173,"authenticated":null,"acterror information was returned by the service."}},{"oid":"343c44836fddd47fadfa59466e28646255ea54ba688e1e610f17b7d384443be4","size":103213,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Er53a3edf2a51d6404abcd897685a1c836738b1ddc7da4e8a24591d4","size":100241,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further erro,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"90677fb6733a924or making request with Error Code BadRequest and Http Status Code BadRequest. No further error informat11:33:14.463923 trace git-lfs: HTTP: ion was returned by the service."}},{"oid":"3cbc29b16fa935b9e54ce875928f0c31e557e7454f22713e BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"4d881e7cfb561c51b61a83976bf55838e7c3be26c4e2035098a3b2b1bd7c7bde","size":83996,"authenticated":null,"actions":{},"eration was returned by the service."}},{"oid":"345e6ca7d3d5020bb63be6f86d44a1e44492e5b822f0df811c78e8add1e52632","size":80698,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadR8bdd96d7ce2961b68c7d571f37c4759c84f89a61d","size":79224,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information d":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"fb2d52d42801dd38dcb341d6aa74fest with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"b42d6432f6a205bb7df0c8328f6045b4e4b5a10483061fc287e3c1ea662237da","size":67977,"authenticated":nulrther error information was returned by the service."}},{"oid":"d8744dc5b18b26e1485fd89e6c33781749d0d37187896d9a46db84b2372b129a","size":62222,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request wi0f165dde34ce948d13d0f37869847cb62fab8b8f32ef180afc051d52bac","size":61233,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further 0933,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"7755c6b14c9"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"b168af71f88d261bb841fd8c69563a6b5c179fcfdff211a4e1cd8d9f906b7049","size":45259," BadRequest. No further error information was returned by the service."}},{"oid":"dc0d1577ac9779f488f07cbdd78304d8f197b054115ef504a3e5c861d664a523","size":34954,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error."}},{"oid":"2524eb30b5a5d51a87a6a7243ff04cb1a6e8532d79f3ece9d9616aa44c31b944","size":17313,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRe77cc8009","size":16671,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{de":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"32df103dd6f9e1c63e0d1d8f7ac01c5a036e1858aa7f732cfc303e374433b9d Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"5c51a0a08e82ff1d13e3c9cf6597ab5fba36ecc7b6bb2ab7a5b68bb312c88deb","size":14992,"authenticated":null,"actions":{},"error":{"code":40ned by the service."}},{"oid":"9033fdcfeb42912f53de4830eb5a3f0e206fca54cacd873c86c580d26f64cd6d","size":14892,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http0be28e060b04ac2a69f0884b73","size":14793,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned bys":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"455a8325e0220dcede44c091914c167eaf08cca16018Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"b02d746edfeff108f4960198fb9ffd3e0aa0cdf0704bc85a5f88ae86097c14bb","size":14418,"authenticated":null,"actions":{},ormation was returned by the service."}},{"oid":"59747ac98775730209beef78a36d772fe6c82dbace8f94a9270ca6899e7219ef","size":14329,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code Bb1fe60f85f9711a98bd1fad72c7f431d7d58f03d04aa","size":14320,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error informatiated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"082d15ab02c5084a71124524c4equest with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"ca20523bd9b8c47c0bfad42c1127b7351f517a898b3d03ad130cd09a0bc98661","size":14105,"authenticated":
ion was returned by the service."}},{"oid":"3cbc29b16fa935b9e54ce875928f0c31e557e7454f2271369c3e987a40f7bcaa","size":84975,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadReqbf55838e7c3be26c4e2035098a3b2b1bd7c7bde","size":83996,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information wa:null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"32b2744f99e3acca612d7248bdd96d7t with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"e4c989c019e867d2a9833e96e3ebfa7135187190870f649960d16364e9c3664e","size":77721,"authenticated":null,her error information was returned by the service."}},{"oid":"fb2d52d42801dd38dcb341d6aa74f14877749e8293674b93363bfefcba3aa398","size":68892,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with2f6a205bb7df0c8328f6045b4e4b5a10483061fc287e3c1ea662237da","size":67977,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further er22,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"c27b50f165dderror making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"2b84033c488bc14aec3035d21a1900915e5df8bdc0e87fa4117c068b805d21d3","size":60933,"auadRequest. No further error information was returned by the service."}},{"oid":"7755c6b14c9c0f0134087d73a0877dc064ecd0880f835655a64224b66697a671","size":48186,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error m}},{"oid":"b168af71f88d261bb841fd8c69563a6b5c179fcfdff211a4e1cd8d9f906b7049","size":45259,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequ64a523","size":34954,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"o":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"14302ed1699fcc8cbb1cb6bb0bec24a0212a456986d3f70ac1e9569877cc8009Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"bb8f329acc9d0c2815d28349d5a4144ebd337f7e2a93819cf1a7c3cc9b06ecea","size":16085,"authenticated":null,"actions":{},"error":{"code":400,d by the service."}},{"oid":"32df103dd6f9e1c63e0d1d8f7ac01c5a036e1858aa7f732cfc303e374433b9d6","size":15500,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Sb6bb2ab7a5b68bb312c88deb","size":14992,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by t:{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"129a59bccad750da9f37591ab1616c798021230be28e06de BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"2227f2cce0c3cce682dda39b973c1687d640b7bb88e3444c1725b1a14cee51ce","size":14707,"authenticated":null,"actions":{},"emation was returned by the service."}},{"oid":"455a8325e0220dcede44c091914c167eaf08cca160187622e25329c78fd7df3b","size":14570,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code Bad98fb9ffd3e0aa0cdf0704bc85a5f88ae86097c14bb","size":14418,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error informationed":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"62df28125ad71afa2596b1fe60f8uest with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"0070d1dbd0905bd1f8f706854715522c00096ed50c432e0902b3ef80b1842d8c","size":14182,"authenticated":nuurther error information was returned by the service."}},{"oid":"082d15ab02c5084a71124524c42c52a0bbb325eb877cd9c6cd9833e5a4cbf11e","size":14138,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request w523bd9b8c47c0bfad42c1127b7351f517a898b3d03ad130cd09a0bc98661","size":14105,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Co11:33:14.463923 trace gitc59f50460115bca27ee573f8fe03","size":7020,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned bs":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"7e147c826907c55cb4a6ff6497f2a4fe958a17292edfode BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"a5063bc88a2c328ef7793f1f952cf1e205a7d0f12c774f85daf6336875afc9dc","size":4341,"authenticated":null,"actions":{},"emation was returned by the service."}},{"oid":"9a4c9fd3d85a99b80d3008e8c9ede55943cc16b79a382a8200b3fa4883d5468b","size":3371,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadR46e6a31eea4f25c1803c1cb32643eb100f8bc4f38","size":2632,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information w:null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"2ecf91b7e4a799b61ce29e182d44ebd with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"14cf1270e5141cdb6de6d8385773ecaf1525beced9f8bd126be18419e5b07264","size":1260,"authenticated":null,"ar error information was returned by the service."}}]}
de BadRequest. No further error information was returned by the service."}},{"oid":"fae70f4726784a5de23dc0f92833511f3344c59f50460115bca27ee573f8fe03","size":7020,"authenticated":null,"actions":{},"error":{"code":400,"message":"Erroe."}},{"oid":"eac09a19149b472680abd8bcb38513edbe29083a34edb4bbdbfbebec68540029","size":5879,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRe6e8c4e0c","size":4934,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}},{"oid":"9a4c9fd3d85a99b80d3008e8c9ede55943cc16b79a382a8200b3fa4883d5468bttp Status Code BadRequest. No further error information was returned by the service."}},{"oid":"edcb9b1e92c4850c5dd1a4346e6a31eea4f25c1803c1cb32643eb100f8bc4f38","size":2632,"authenticated":null,"actions":{},"error":{"code":400,"mby the service."}},{"oid":"302da9f6c541ae7841e4dda3704dff42ac997798fa4e28cf49b90296f6ecb748","size":2417,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Stat8d70480a22d1882716ce6","size":1493,"authenticated":null,"actions":{},"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the s11:33:14.466921 trace git-lfs: xfer: adapter "basic" End()ror Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}}]}Downloading LFS objects:  83% (301/363), 793 MB  0 B/s
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 0 stopping
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 6 auth signal received
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 1 auth signal received
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 4 auth signal received
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 1 stopping
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 4 stopping
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 3 auth signal received
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 3 stopping
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 7 auth signal received
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 5 auth signal received
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 5 stopping
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 6 stopping
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 2 auth signal received
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 2 stopping
11:33:14.466921 trace git-lfs: xfer: adapter "basic" worker 7 stopping
11:33:14.466921 trace git-lfs: xfer: adapter "basic" stopped
[df0706b0a624c94582a7c62c36612cda2d1448920d70c45f08642b27bdfe2533] Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service.: [400] Error making reque
[57e09406a75162f291a72a000f12a69b3df967ccf92152d41e532d50224fcb33] Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service.: [400] Error making reque

I already made a ticket to OVH but it may be an error at the lambda function level...
Have you some ideas ?

Edit: Btw I don't see errors in the lambda cloudwatch (at least after going back to user password security, with bitbucket security I got BasicFilter failed when doing git pull, but that's another problem).

@Louspirit Louspirit reopened this Sep 17, 2020
@alanedwardes
Copy link
Owner

Hello,

As you have indicated you forked the project and are running that I can't offer much help here. In the normal case, this means that your blob storage provider is throwing an error when HEAD is being called on the object:

GetObjectMetadataResponse metadataResponse;
try
{
metadataResponse = await client.GetObjectMetadataAsync(config.Bucket, config.KeyPrefix + oid, token).ConfigureAwait(false);
}
catch (AmazonS3Exception ex)
{
return new SignedBlob
{
ErrorCode = (int)ex.StatusCode,
ErrorMessage = ex.Message
};
}

You can see it in your log messages above:

"error":{"code":400,"message":"Error making request with Error Code BadRequest and Http Status Code BadRequest. No further error information was returned by the service."}

Alan

@Louspirit
Copy link
Author

Louspirit commented Sep 21, 2020

Hey Alan,

I havn't changed the library core, only the amazon S3 client config.

I contacted OVH and they said they saw only PUT, neither GET nor HEAD.
How do you debug Lambda function?

@Louspirit
Copy link
Author

Louspirit commented Sep 22, 2020

Hey Alan,

Thanks for your time. To debug, I used the .Net version of the application. It was easier than the Mock Toolkit or local debug with VS Code and Docker!

Finally I found what was the problem by using Fiddler to compare HTTP requests between the application and the AWS CLI.
It was the Authentication region that was us-east-1 by default. It may be a problem for you one day too.
Here is the fix : https://github.com/MineoGames/Estranged.Lfs/blob/7d6ca7805ab1d18c3dac989e4261cf9ef0030346/hosting/Estranged.Lfs.Hosting.Lambda/Startup.cs#L82

Some additions I've also done:

  • Added log for the problematic exeption that was hidden
  • Updated the Amazon SDK to last version
  • Specified V4 signature as it was forced when putting the AuthenticationRegion parameter
  • Deleted Content-Type header because it failed the upload with V4 signature

I hope that now I have a fully working version of Estranged.LFS with OVH Object Storage!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants