Cronicle icon indicating copy to clipboard operation
Cronicle copied to clipboard

Upgrading from 0.9.12 to 0.9.16 -> Munges the S3 host name

Open care2DavidDPD opened this issue 3 years ago • 2 comments

Upgrading from 0.9.12 to 0.9.16, someone is mis-evaluating the S3 hostname (in this case, my MinIO setup), the string "cronicle" is getting prefixed on my host name.

[1669172270.745][2022-11-23 02:57:50][cron1.iad1.care2.com][714055][S3][error][s3][Failed to fetch key: global/servers: getaddrinfo ENOTFOUND cronicle.nas1.iad1.care2.com][{"errno":-3008,"code":"ENOTFOUND","syscall":"getaddrinfo","hostname":"cronicle.nas1.iad1.care2.com","$metadata":{"attempts":1,"totalRetryDelay":0}}]

Summary

Steps to reproduce the problem

Upgrading from 0.9.12 to 0.9.16,

Your Setup

Operating system and version?

Rocky EL8 (8.6)

Node.js version?

v16.16.0

Cronicle software version?

Upgrading from 0.9.12 to 0.9.16,

Are you using a multi-server setup, or just a single server?

Multi - 6 servers, two different colos (east/west coast USA)

Are you using the filesystem as back-end storage, or S3/Couchbase?

S3/MinIO

Can you reproduce the crash consistently?

Rolling back fixed the issue. Had a previous tar ball of the /opt/cronicle dir.

care2DavidDPD avatar Nov 23 '22 03:11 care2DavidDPD

Yup, so we just switched from the old, bloated aws-sdk to the new, streamlined @aws-sdk/client-s3. This is a complete redesign of the S3 API, so I expected a few hiccups, especially with those using non-Amazon (but S3 compatible) hosts such as MinIO.

I've never used MinIO, but I suspect you may need to tweak your storage configuration so it is compatible with @aws-sdk/client-s3.

Cronicle is definitely not touching your hostname / endpoint, nor adding that weird prefixing, but it's a huge clue that it is the word "cronicle". That is coming from somewhere.

Maybe it has to do with forcePathStyle? See:

https://northflank.com/guides/connect-nodejs-to-minio-with-tls-using-aws-s3

The s3ForcePathStyle is important in case your MinIO deployment doesn’t support S3 virtual-host style for accessing objects.

https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/interfaces/s3clientconfig.html#forcepathstyle

jhuckaby avatar Nov 24 '22 05:11 jhuckaby

Yup, so we just switched from the old, bloated aws-sdk to the new, streamlined @aws-sdk/client-s3. This is a complete redesign of the S3 API, so I expected a few hiccups, especially with those using non-Amazon (but S3 compatible) hosts such as MinIO.

Thanks Joseph - I'll look dig deeper later this week, and get back to you on a solution and maybe a simple sh/awk/sed migration script.

I didn't see anything else mention this, this ticket may be enough, but a note in the README, or release notes would be helpful. Or a mod to the installer to fail to to upgrade past the aws-sdk / client-s3 switch (if non-amazon s3 is detected), until firm directions are established.

care2DavidDPD avatar Nov 28 '22 17:11 care2DavidDPD