chef / chef/chef-server

embedded knife commands show warnings

Open
#3,329 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Aspect: Packaging Status: move to jira Triage: Confirmed
Dominant language
Erlang
Stars
303
Forks
211
Avg merge
1d 8h
Merged PRs (30d)
5

Description

Chef Server Version

v14.13.42

Running any knife command on CIS 14.13.42+ outputs warnings. Let's make it not do that. It looks like we have two versions of chef-vault shipping (4.1.5, 4.1.4) and they are managing to both get loaded.

knife node list
/opt/opscode/embedded/lib/ruby/gems/2.7.0/gems/chef-vault-4.1.5/lib/chef-vault/version.rb:18: warning: already initialized constant ChefVault::VERSION
/opt/opscode/embedded/lib/ruby/gems/2.7.0/gems/chef-vault-4.1.4/lib/chef-vault/version.rb:18: warning: previous definition of VERSION was here
/opt/opscode/embedded/lib/ruby/gems/2.7.0/gems/chef-vault-4.1.5/lib/chef-vault/version.rb:19: warning: already initialized constant ChefVault::MAJOR
/opt/opscode/embedded/lib/ruby/gems/2.7.0/gems/chef-vault-4.1.4/lib/chef-vault/version.rb:19: warning: previous definition of MAJOR was here
/opt/opscode/embedded/lib/ruby/gems/2.7.0/gems/chef-vault-4.1.5/lib/chef-vault/version.rb:19: warning: already initialized constant ChefVault::MINOR
/opt/opscode/embedded/lib/ruby/gems/2.7.0/gems/chef-vault-4.1.4/lib/chef-vault/version.rb:19: warning: previous definition of MINOR was here
/opt/opscode/embedded/lib/ruby/gems/2.7.0/gems/chef-vault-4.1.5/lib/chef-vault/version.rb:19: warning: already initialized constant ChefVault::TINY
/opt/opscode/embedded/lib/ruby/gems/2.7.0/gems/chef-vault-4.1.4/lib/chef-vault/version.rb:19: warning: previous definition of TINY was here

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

Start with the embedded knife command path shown by knife node list and inspect how chef-vault versions 4.1.5 and 4.1.4 are packaged or loaded. Verify the fix by running a knife command against the embedded Chef Server and confirming that no duplicate constant warnings appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.