Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

Don't use file_cache_path for rsyncing provision #128

Closed
skyeagle opened this issue Oct 30, 2012 · 7 comments
Closed

Don't use file_cache_path for rsyncing provision #128

skyeagle opened this issue Oct 30, 2012 · 7 comments

Comments

@skyeagle
Copy link
Contributor

The rsync command use --delete option which deletes all files which are not in local machine. It is wrong behaviour because file_cache_path contains data created by chef under sudo and it maybe used by him later. It looks similar to this log output at the moment:

...
rsync: delete_file: rmdir(nginx-1.2.3/objs/src/os/win32) failed: Permission denied (13)
rsync: delete_file: unlink(nginx-1.2.3/objs/src/os/unix/ngx_writev_chain.o) failed: Permission denied (13)
rsync: delete_file: unlink(nginx-1.2.3/objs/src/os/unix/ngx_user.o) failed: Permission denied (13)
rsync: delete_file: unlink(nginx-1.2.3/objs/src/os/unix/ngx_udp_recv.o) failed: Permission denied (13)
...

It would be better use strict paths(cookbooks, data_bags, nodes, roles, encrypted_data_bag_secret) defined in Chef config.

@matschaffer
Copy link
Owner

Agreed. This is a behavior I wasn't aware of until recently. I'm inclined to say that using the file_cache_path for storage of the repo is the wrong move and we should just separate the concerns.

@matschaffer
Copy link
Owner

I wonder if we could use or create a new var in solo.rb to dictate where the kitchen should be transfered to without upsetting the chef-solo run itself.

@skyeagle
Copy link
Contributor Author

Wouldn't be the knife.rb better for this var?

@skyeagle
Copy link
Contributor Author

Sorry for that mistaken opinion.

@matschaffer
Copy link
Owner

The knife.rb param isn't bad I don't think. We'd just want to make this obvious for people just coming into the project. If we go that route it might also make sense to generate solo.rb when you run knife cook.

@matschaffer
Copy link
Owner

Should be fixed with #145

tmatilai added a commit that referenced this issue Apr 6, 2013
…-199

- Generate solo.rb from knife.rb settings. Fixes #86, #125, #128, #177, #197.
- Read protect the uploaded directory. Fixes #1.
- Convert chef-solo-search as a submodule and upgrade it to v0.4.0. Should fix #216.
@tmatilai
Copy link
Collaborator

Fixed by #199

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

No branches or pull requests

3 participants