chef / chef/chef-cli

chef install ignores chef_server source

Open
#152 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Waiting on Contributor
Dominant language
Ruby
Stars
18
Forks
23
Avg merge
5d 17h
Merged PRs (30d)
1

Description

The policyfile lock.json contains the following

      "origin": "https://api.chef.server.xyz/organizations/org_cookbooks",
      "source_options": {
        "chef_server": "https://api.chef.server.xyz/organizations/org_cookbooks",
        "version": "11.5.0"

but when chef install is called against the lock file it goes to the chef_server_url from the knife.rb (https://api.chef.server.xyz/organizations/testing). In this case the user had access to both orgs, but the cookbook was not at the one in the knife.rb

$ chef -v
ChefDK version: 4.7.73
Chef Infra Client version: 15.7.32
Chef InSpec version: 4.18.51
Test Kitchen version: 2.3.4
Foodcritic version: 16.2.0
Cookstyle version: 5.20.0

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 issue with the provided lock.json, knife.rb, and chef install command, then trace how the CLI reads the lock file's source_options.chef_server. Done means chef install uses the cookbook source recorded in lock.json rather than the organization configured in knife.rb.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.