-
Notifications
You must be signed in to change notification settings - Fork 213
Run rsync with --rsync-path="rsync sudo"
flag
#125
Run rsync with --rsync-path="rsync sudo"
flag
#125
Conversation
I think this will break CentOS (maybe RHEL too). Those systems don't typically come with sudo installed. You can use https://github.com/myplanetdigital/knife-solo/blob/2ef57cf738edce0031a55261831cc6acbf32f43e/lib/knife-solo/ssh_command.rb#L165 to check that, but what happens if the user needs a password to sudo? We compensate for that in https://github.com/myplanetdigital/knife-solo/blob/2ef57cf738edce0031a55261831cc6acbf32f43e/lib/knife-solo/ssh_command.rb#L172 and https://github.com/myplanetdigital/knife-solo/blob/2ef57cf738edce0031a55261831cc6acbf32f43e/lib/knife-solo/ssh_command.rb#L214, but I'm not sure it would work in this case. |
Small correction, the minimal builds of CentOS and RHEL don't have sudo. A regular install does but often the cloud images are a "no package" install which skips sudo. |
Ah... gotcha. Could we ensure sudo is installed during the bootstraps to run during And as for password, perhaps we could add a |
I sorta liked sudo being a detected thing. If you have to specify it it gets us that much closer to just being My plan to get cookbooks transfered as sudo was to "prime" it using the method described at http://linuxexchange.org/questions/411/rsync-backups-using-sudo-instead-of-root (see #1 for some more info) |
Hm. Ok... was trying to wrap my mind around |
I would like knife-solo UI being as close to the |
If it helps, my intent for "prepare" was to make a command that would discover system params and try to do the right thing for the 80% case. Using knife bootstrap to cover the other 20% is pretty easy as is mentioned in the Readme. I've often wondered if a "discover" command that could then power knife bootstrap was a good idea, but I tend to get tripped up on how to get info between the two parts and how to transfer the cookbooks et al. |
@patcon following the above comment would a bootstrap template like in the Readme be easier for you than a fork? |
Conflicts: lib/chef/knife/cook.rb
Hey @patcon, in the course or working on #1 I found out that this would either require passwordless sudo or tty_tickets to be set up which I didn't feel right depending on. So instead I did #145. Separating the file cache path from the sudo path should avoid the sudo/non-sudo build issues that people have been seeing. Let me know if this isn't the case. |
Awesome. I'll follow that sucker. Thanks! |
knife-solo
might be used first as the root user, and then as a another user after the first run creates it and locks down root login.Can use
--rsync-path
to allow rsync to delete the files in the cache path as needed.See: http://crashingdaily.wordpress.com/2007/06/29/rsync-and-sudo-over-ssh/