chef / chef/knife-ec-backup

KeyError : KeyNotFound

Open
#62 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
32
Forks
28
PR merge metrics
No merged PRs in 30d

Description

I am running a knife ec restore command and I see the below error. Anyone knows why this could be happening

DEBUG: No chefignore file found at /home/xyzuser/server_backup/organizations/xyz/chefignore no files will be ignored
/opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/knife-ec-backup-2.0.1/lib/chef/tsorter.rb:17:in fetch': key not found: "000000000000f5e4fe07d6a9c5953a09" (KeyError) from /opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/knife-ec-backup-2.0.1/lib/chef/tsorter.rb:17:intsort_each_child'
from /opt/opscode/embedded/lib/ruby/1.9.1/tsort.rb:203:in each_strongly_connected_component_from' from /opt/opscode/embedded/lib/ruby/1.9.1/tsort.rb:209:inblock in each_strongly_connected_component_from'
from /opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/knife-ec-backup-2.0.1/lib/chef/tsorter.rb:17:in each' from /opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/knife-ec-backup-2.0.1/lib/chef/tsorter.rb:17:intsort_each_child'
from /opt/opscode/embedded/lib/ruby/1.9.1/tsort.rb:203:in each_strongly_connected_component_from' from /opt/opscode/embedded/lib/ruby/1.9.1/tsort.rb:182:inblock in each_strongly_connected_component'
from /opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/knife-ec-backup-2.0.1/lib/chef/tsorter.rb:13:in each_key' from /opt/opscode/embedded/lib/ruby/gems/1.9.1/gems/knife-ec-backup-2.0.1/lib/chef/tsorter.rb:13:intsort_each_node'
from /opt/opscode/embedded/lib/ruby/1.9.1/tsort.rb:180:in each_strongly_connected_component' from /opt/opscode/embedded/lib/ruby/1.9.1/tsort.rb:148:intsort_each'
from /opt/opscode/embedded/lib/ruby/1.9.1/tsort.rb:135:in `tsort'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the knife ec restore command, then inspect lib/chef/tsorter.rb at line 17 and the surrounding restore path. Trace why the referenced key is absent during topological sorting; done means the restore no longer raises this KeyError for the reported backup and the behavior is covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.