tbarbugli / cassandra_snapshotter

A tool to backup cassandra nodes using snapshots and incremental backups on S3
Other
222 stars 122 forks source link

added ssh key file option to connect to hosts with #39

Closed willejs closed 8 years ago

willejs commented 9 years ago

Add the ability to use ssh keys to auth with hosts.

nilstoedtmann commented 9 years ago

See also https://github.com/DemandLogic/cassandra_snapshotter/commit/da96b0f34775dccc752faf11394705bc074624f5

willejs commented 9 years ago

@nilstoedtmann I don't mind which one gets merged! @tbarbugli can you merge either my pull request or the other patch?

tbarbugli commented 9 years ago

This seems like a great addition. Perhaps a super solution to this specific problem is to have a mechanism that allows us to send optional args straight to fabric. (eg. send every arg that starts with --fabric- to fabric option parser to configure it). what do you guys think about it?

nilstoedtmann commented 9 years ago

i dont mind either

@tbarbugli Have a look at other options we added, maybe some of it is interesting to others as well: https://github.com/DemandLogic/cassandra_snapshotter/commits/master

(I've been to busy/lazy to file pull requests yet)

nilstoedtmann commented 9 years ago

+1 to the generic "--fabric-*" idea

willejs commented 9 years ago

@tbarbugli seems like a better idea really. could just loop through the args, and match on 'fabric-.*', then strip it and have a 1:1 mapping of args to options, then call getattr on them with the value as the argument?

tbarbugli commented 9 years ago

yes, i was thinking about something like that. It would be great to send the list of options to fabric option parser so that we don't do to touch fab's env ourselves.

On Wed, Jan 28, 2015 at 10:33 AM, Will Salt notifications@github.com wrote:

@tbarbugli https://github.com/tbarbugli seems like a better idea really. could just loop through the args, and match on 'fabric-.*', then strip it and have a 1:1 mapping of args to options, then call getattr on them with the value as the argument?

— Reply to this email directly or view it on GitHub https://github.com/tbarbugli/cassandra_snapshotter/pull/39#issuecomment-71854125 .

willejs commented 9 years ago

@tbarbugli I hadnt read the code properly when making my previous assumptions. When you use the API it imports the env dictionary which is populated with defaults it seems. You cant set the options anywhere else, apart from with settings, which isnt appropriate. Therefore looping through the dictionary and checking existence of the keys before setting and warning if they don't exist is perhaps better? Lets merge this now, and in a separate pr include netter fabric options.

ajhoffma commented 9 years ago

is this pull request still active? Or @nilstoedtmann do you plan on pull-requesting your changes?

tbarbugli commented 8 years ago

added support for this with a newer PR, sorry for the long wait!