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

Chef fails with inspec 6.6 #14096

Open
valodzka opened this issue Nov 28, 2023 · 1 comment
Open

Chef fails with inspec 6.6 #14096

valodzka opened this issue Nov 28, 2023 · 1 comment
Labels
Status: Untriaged An issue that has yet to be triaged.

Comments

@valodzka
Copy link

valodzka commented Nov 28, 2023

Description

chef-client run fails with inspec 6.6 (works with 5.22.3 version).

Chef Version

18.3

Platform Version

debian stable

Replication Case

install chef (gem install chef-bin), run chef-client --local-mode

Client Output

ffi-libarchive could not be loaded, libarchive is probably not installed on system, archive_file will not be available
[2023-11-28T14:31:18+01:00] WARN: No config file found or specified on command line. Using command line options instead.
Chef Infra Client, version 18.3.0
Patents: https://www.chef.io/patents
Infra Phase starting
Resolving cookbooks for run list: [...]
Synchronizing cookbooks:...
Installing cookbook gem dependencies:
Compiling cookbooks...

Running handlers:
[2023-11-28T14:31:19+01:00] ERROR: Running exception handlers
Running handlers complete
[2023-11-28T14:31:19+01:00] ERROR: Exception handlers complete
Infra Phase failed. 0 resources updated in 01 seconds
[2023-11-28T14:31:19+01:00] FATAL: LoadError: cannot load such file -- ast

Stacktrace

[2023-11-28T14:31:19+01:00] FATAL: LoadError: cannot load such file -- ast
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
/var/lib/gems/3.1.0/gems/inspec-core-6.6.0/lib/inspec/utils/profile_ast_helpers.rb:1:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
/var/lib/gems/3.1.0/gems/inspec-core-6.6.0/lib/inspec/profile.rb:18:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
/var/lib/gems/3.1.0/gems/inspec-core-6.6.0/lib/inspec.rb:10:in `<top (required)>'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/compliance/runner.rb:26:in `enabled?'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/compliance/runner.rb:81:in `run_failed'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/event_dispatch/dispatcher.rb:78:in `call'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/event_dispatch/dispatcher.rb:78:in `block in call_subscribers'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/event_dispatch/dispatcher.rb:68:in `each'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/event_dispatch/dispatcher.rb:68:in `call_subscribers'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/event_dispatch/dispatcher.rb:91:in `process_events_until_done'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/event_dispatch/dispatcher.rb:38:in `enqueue'
(eval):2:in `run_failed'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/client.rb:321:in `rescue in run'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/client.rb:312:in `run'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/application.rb:305:in `run_with_graceful_exit_option'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/application.rb:281:in `block in run_chef_client'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/local_mode.rb:42:in `with_server_connectivity'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/application.rb:264:in `run_chef_client'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/application/base.rb:354:in `run_application'
/var/lib/gems/3.1.0/gems/chef-18.3.0/lib/chef/application.rb:67:in `run'
/var/lib/gems/3.1.0/gems/chef-bin-18.3.0/bin/chef-client:25:in `<top (required)>'
/usr/local/bin/chef-client:25:in `load'
/usr/local/bin/chef-client:25:in `<main>
@valodzka valodzka added the Status: Untriaged An issue that has yet to be triaged. label Nov 28, 2023
@e100
Copy link

e100 commented Jan 22, 2024

Experienced same issue on OpenBSD 7.4.
Both inspec-core 6.6 and 5.22.36 caused this error.

Using 5.22.29 seems to work without issue.

@valodzka valodzka changed the title Chef fails with inspect 6.6 Chef fails with inspec 6.6 Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants