Skip to content
This repository was archived by the owner on Jul 14, 2021. It is now read-only.

policyfile export doesn't use chefignore #519

Closed
jtimberman opened this issue Sep 18, 2015 · 6 comments · Fixed by #606
Closed

policyfile export doesn't use chefignore #519

jtimberman opened this issue Sep 18, 2015 · 6 comments · Fixed by #606

Comments

@jtimberman
Copy link
Contributor

In the PolicyfileServices::ExportRepo.copy_cookbook method, it copies the entire content of the cookbook directory to the sandbox. When using VMware Fusion provider for Vagrant under Test Kitchen, the .kitchen directory will contain the copy of the VM running. This means we copy the VM into itself with the Policyfile export in the policyfile_zero provisioner. We should leverage the .chefignore handling for cookbooks to ensure that we don't have this in the export, or so this isn't present when doing chef push to a Chef Server.

@onlyhavecans
Copy link
Contributor

I am now hitting this bug with chefdk 0.9.0 and it's BRUTALLY destroying my test cycle and laptop's hard drive space

onlyhavecans added a commit to onlyhavecans/chef-dk that referenced this issue Oct 11, 2015
This could maybe be a bit more in depth. The way I did it automatically
excludes all dotfiles and only really checks the base level directories.
I'm not sure if we need to get any more in depth in the chefignore here.

Fixes chef-boneyard#519
@danielsdeleo
Copy link
Contributor

@tbunnyman you planning to contribute your patch? I'm gonna put it in my backlog if not.

@onlyhavecans
Copy link
Contributor

@danielsdeleo I am! I need to just fix tests and cleanup.
Things have been hectic since summit

@danielsdeleo
Copy link
Contributor

Understood, ping me if you need any help!

@trevorghess
Copy link

This issue also prevents running on Windows. When it tries to copy the .kitchen directories, the max path in Windows gets hit and causes a crash.

No such file or directory @ dir_s_mkdir - C:/Users/Trevor/AppData/Local/Temp/chefdk-export-1992-2015102421454320151024-1992-1kxai3x/cookbooks/policy-file-548708105180014
02.46719056435308981.175996024006786/.kitchen/kitchen-vagrant/kitchen-policy-file-default-ubuntu-1404/.vagrant/machines/default
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: [Failed to export policy (in D:/Repos/policytest/policy-file/Policyfile.rb) to C:/Users/Trevor/AppData/Local/Temp/de
fault-ubuntu-1404-sandbox-20151024-1992-1cfn8jv]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

I added @tbunnyman's changes and it fixes the issue.

danielsdeleo pushed a commit that referenced this issue Nov 16, 2015
This could maybe be a bit more in depth. The way I did it automatically
excludes all dotfiles and only really checks the base level directories.
I'm not sure if we need to get any more in depth in the chefignore here.

Fixes #519
@jkeiser
Copy link
Contributor

jkeiser commented Feb 9, 2016

Fixed by #606.

@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

5 participants