Skip to content
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

(edge case bug) backup fails if no nodes are present #74

Open
vinyar opened this issue Sep 11, 2015 · 1 comment
Open

(edge case bug) backup fails if no nodes are present #74

vinyar opened this issue Sep 11, 2015 · 1 comment
Labels
Type: Bug Does not work as expected.

Comments

@vinyar
Copy link

vinyar commented Sep 11, 2015

knife.rb

log_level :info
log_location STDOUT
ssl_verify_mode :verify_none

output:

/opt/opscode/embedded/bin/knife ec backup chef_server_backup_knife_ec
Downloading organization object for xxxxxxx from https://localhost/organizations/xxxxxxx
Created /acls
Created /acls/groups
Created /acls/groups/billing-admins.json
Created /groups
Created /groups/billing-admins.json
Created /groups/admins.json
Created /clients
Created /clients/chef-webui.json
Created /clients/chef-validator.json
Created /clients/ooyala-validator.json
Created /containers
Created /containers/groups.json
Created /containers/containers.json
Created /containers/cookbook_artifacts.json
Created /containers/clients.json
Created /containers/nodes.json
Created /containers/data.json
Created /containers/cookbooks.json
Created /containers/environments.json
Created /containers/policies.json
Created /containers/policy_groups.json
Created /containers/sandboxes.json
Created /containers/roles.json
Created /cookbooks
Created /data_bags
Created /environments
Created /environments/_default.json
Created /invitations.json
Created /members.json
Created /nodes
ERROR: knife encountered an unexpected error
This may be a bug in the 'ec backup' knife command or plugin
Please collect the output of this command with the `-VV` option before filing a bug report.
Exception: NoMethodError: undefined method `can_have_child?' for nil:NilClass

debug snippet

DEBUG: Initiating GET to https://localhost/organizations/my_sandwitch/environments/_default
DEBUG: ---- HTTP Request Header Data: ----
DEBUG: Accept: application/json
DEBUG: Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
DEBUG: X-OPS-SIGN: algorithm=sha1;version=1.0;
DEBUG: X-OPS-USERID: admin
DEBUG: X-OPS-TIMESTAMP: 2015-09-11T09:48:43Z
DEBUG: X-OPS-CONTENT-HASH: 2jmj7l5rSw0yVb/vlWAYkK/YBwk=
DEBUG: X-OPS-AUTHORIZATION-1: qbZ2JJ2bTzPpTRBro8UfBwErb+7YB09VYApNh5uyL82q6bYiaJZk9l6tQJzz
DEBUG: X-OPS-AUTHORIZATION-2: IM6Ck+HagKLtQXLzkjihsXN8f7TKHlmv1Wi2bNCaQT/8oOVPhCHjqBOS7wre
DEBUG: X-OPS-AUTHORIZATION-3: r5/yIZUWPxuNPLuZQDkej+NnCfwXh1snvp3SLNd/AvF6s6MIbG4EFWMxa9HP
DEBUG: X-OPS-AUTHORIZATION-4: twhaKPX11zrHOt4SA03UhpIAtMUyQka5mcNE5qlSEWFo9aUqR4/NLr8N4H0h
DEBUG: X-OPS-AUTHORIZATION-5: 0+nvBhjzJFeB4V3dulyJXyssE9wBlYA0nLTNmpi7Qv+qjf+lMJhMFRKuSahW
DEBUG: X-OPS-AUTHORIZATION-6: ENn6yevgXthRrQoj5QT/CXvFKpW0EDiQau+m+C3e2w==
DEBUG: HOST: localhost:443
DEBUG: X-Ops-Server-API-Version: 0
DEBUG: X-REMOTE-REQUEST-ID: c1706c06-8258-4934-a3b8-285cd8e3265b
DEBUG: x-ops-request-source: web
DEBUG: ---- End HTTP Request Header Data ----
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 200 OK
DEBUG: server: openresty/1.7.10.1
DEBUG: date: Fri, 11 Sep 2015 09:48:43 GMT
DEBUG: content-type: application/json
DEBUG: transfer-encoding: chunked
DEBUG: connection: close
DEBUG: x-ops-server-api-version: {"min_version":"0","max_version":"1","request_version":"0","response_version":"0"}
DEBUG: x-ops-api-info: flavor=cs;version=12.0.0;oc_erchef=12.2.0
DEBUG: content-encoding: gzip
DEBUG: ---- End HTTP Status/Header Data ----
DEBUG: Chef::HTTP calling Chef::HTTP::RemoteRequestID#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Authenticator#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::Decompressor#handle_response
DEBUG: decompressing gzip response
DEBUG: Chef::HTTP calling Chef::HTTP::CookieManager#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONOutput#handle_response
DEBUG: Chef::HTTP calling Chef::HTTP::JSONInput#handle_response
/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:86:in `exists?': undefined method `can_have_child?' for nil:NilClass (NoMethodError)
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.0.current.0/lib/chef/chef_fs/file_system.rb:411:in `get_or_create_parent'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.0.current.0/lib/chef/chef_fs/file_system.rb:144:in `block in copy_to'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.0.current.0/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:267:in `call'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.0.current.0/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:267:in `process_input'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.0.current.0/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb:257:in `process_one'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.0.current.0/lib/chef/chef_fs/parallelizer.rb:93:in `call'
    from /opt/opscode/embedded/lib/ruby/gems/2.1.0/gems/chef-12.5.0.current.0/lib/chef/chef_fs/parallelizer.rb:93:in `worker_loop'
[root@ip-172-31-42-91 tmp]#
@stevendanna
Copy link
Contributor

I think this ChefFS fix will address the root cause: chef/chef#4091

@vinyar vinyar added the bug label Aug 4, 2016
@tas50 tas50 added Type: Bug Does not work as expected. and removed bug labels Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

3 participants