-
Notifications
You must be signed in to change notification settings - Fork 24
Features: configurable database-hostname and allow insecure connection to database and minio #35
base: master
Are you sure you want to change the base?
Conversation
I don't think this will work as intended. That is, I don't think it will successfully trigger a backup when run from a remote host. Let's take a look at
Here, we trigger a rocksdb snapshot, which creates hardlinks in the I think it would be pretty challenging to support remote replica in a robust and maintainable way, and I'm doubtful that it's worthwhile because, as I understand, most people can run the strata diver on the replica host. I don't see a reason to support hardlink snapshot creation without backing up to remote storage. Let me know if I've misunderstood or missed anything. Thanks! |
It was not the goal to support remote replica backups! We let it run in our system and it works very good. I hope the explanation helps for understanding our problem! Thanks in advance. |
Sounds good, thanks! One thing: Can you rebase your changes on latest master to make them easier to review? This PR currently contains "Fixed List in MinioStorage" and "Use fixed path in miniostorage List", which have already been added to master. |
It is now possible to set a specific database hostname. The default database hostname is set to 'localhost'. Additionally removed the replica options in lrazureblobdriver.go and use replica options from lreplica_drivers/lrs3driver/lrs3driver.go, to have the same code base.
When the flags are set to true, the connection is made with a tls InsecureSkipVerify: true.
It should be now okay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good.
I'd like to avoid depending on lrs3driver
from code that isn't specific to local replica and S3 storage. I can think about this more next weekend if you don't see a straightforward fix.
Port int `long:"port" default:"27017" description:"Backup should look for a mongod instance that is listening on this port"` | ||
Username string `long:"username" description:"If auth is configured, specify the username with admin privileges here"` | ||
Password string `long:"password" description:"Password for the specified user."` | ||
DatabaseHostname string `long:"database-hostname" default:"localhost" description:"Database hostname can be override with a specific hostname in most cases localhost is sufficient"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a name like LocalHostname
would be better than DatabaseHostname
.
Do you think the following would description would make sense? 'localhost' or a hostname that is accessible on the local machine via e.g. kubernetes network
.
By the way, another reason to avoid the name DatabaseHostname
is that the MongoDB database might be distributed over multiple hosts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I have totally forgotten this PR, because I changed the company and moved to a new city. :(
I've implemented your requested changes.
Hi everyone
I made same changes so you can configure the database-hostname over a command flag, therefore it is not fixed to localhost. Also it was necessary for us to connect to a database and minio with a self signed cert and I made it so you can set that the verification of the cert ist skipped. For future use it would be better to tackle the ssl configuration again and solve it more accurate.
Best regards
Stefan