-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
knife-ec-backup Node Export Failure #75
Comments
@sean-horn Are you able to reproduce this with just cheffs? I.e. via knife download at all? |
@stevendanna No, it seems to work fine with I checked and I am using the original cheffs code, before my workaround to do the following
|
Encounter the same issue since updating to Chef server 12.2. |
Thanks for the confirmation. I'll take a look. |
Just to make sure that is a issue with versions, I tested it with 2 different knife versions: |
How to roll back to version 12.4.1... /opt/opscode/embedded/bin/gem uninstall -aIx chef chef-config ohai /opt/opscode/embedded/bin/gem install chef --version=12.4.1 |
I've found the root cause and am working on determining the right fix in ChefFS. This will be fixed in the next version of chef-server. Notably, this is failing on certain "root_files" in the backup (invitations.json, org.json, members.json) whose parent is the root of the directory and whose grandparent is nil (since in ChefFS the parent of the root directory is nil). |
I believe this ChefFS fix will address the root cause. chef/chef#4091 |
Now that the above PR is merged, how do we get it into |
@sdelano I believe for chef-server, the latest nightlies should pick it up and use it automatically. Once there is a release of chef with that fix, I'll also pin the gem dependencies. |
@stevendanna looks like it shipped in 12.6.0. |
Using the knife-ec-backup 2.0.6 and chef_fs that ships with Chef Server 12.2.0, I am unable to do a successful knife-ec-backup of a system having 4 cookbooks, the _default environment, and a single node created with
I have confirmed that the supplied example customer node also works fine after a workaround.
This issue may have the same root cause as #74 as the failure stack trace is identical. Everything goes swimmingly up to the point where knife-ec-backup attempts to export the node and write it to the local filesystem.
I'll show the issue first, then a workaround that seems to work for this limited case.
Issue
Workaround
If I make the following change to the
exists?
method in/opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.0.current.0/lib/chef/chef_fs/file_system/file_system_entry.rb
, the export completes successfully, not failing on the export of the single node,kitchen_node
as shown above.The text was updated successfully, but these errors were encountered: