Unable To Restore From Backup Due To Ruby Error
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 32
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Describe the problem
I am getting a generic ruby syntax error when attempting a restore from a backup. Below is a snippet of the restore log with the failure message. I have also attached more of the log further down
``
Copying /cookbook_artifacts
FATAL: Cookbook file recipes/filebeat.rb has a ruby syntax error:
I checked the backup and there are 530 instances of recipes/filebeat.rb.
[root@chef-server backup]# find -name filebeat.rb | wc -l
530
I would think that it wouldn't let me do a `knife ec backup` if there is a ruby error that won't let me import via `knife ec restore`
## Software Version
[root@chef-server backup]# chef -v
ChefDK version: 4.10.0
Chef Infra Client version: 15.13.8
Chef InSpec version: 4.22.1
Test Kitchen version: 2.5.4
Foodcritic version: 16.3.0
Cookstyle version: 5.23.0
[root@chef-server backup]# chef-server-ctl version
13.2.0
## Stacktrace
Copying /acls/containers
Copying /acls/environments
Copying /acls/organization.json
Copying /groups/admins.json
Copying /groups/billing-admins.json
Copying /groups/public_key_read_access.json
Restoring organization[dfs-qa]
/root/.chefdk/gem/ruby/2.6.0/gems/knife-ec-backup-2.4.7/lib/chef/knife/ec_restore.rb:75: warning: constant Net::HTTPServerException is deprecated
/root/.chefdk/gem/ruby/2.6.0/gems/knife-ec-backup-2.4.7/lib/chef/knife/ec_restore.rb:105: warning: constant Net::HTTPServerException is deprecated
Restoring org admin data
Copying /groups/admins.json
Copying /groups/billing-admins.json
Copying /groups/public_key_read_access.json
Copying /acls/groups/billing-admins.json
Copying /acls/groups/public_key_read_access.json
Restoring the rest of the org
Copying /clients
Copying /containers
Copying /cookbook_artifacts
FATAL: Cookbook file recipes/filebeat.rb has a ruby syntax error:
/root/.chefdk/gem/ruby/2.6.0/gems/knife-ec-backup-2.4.7/lib/chef/knife/ec_restore.rb:320: warning: constant Net::HTTPServerException is deprecated
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the restore failure reported at lib/chef/knife/ec_restore.rb:320 and reproduce the knife ec restore operation using the backup and restore log details in the issue. Determine why recipes/filebeat.rb is rejected during restore even though the backup completed; done means the affected backup can be restored without the reported Ruby syntax error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100