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 install requires .rb file present #1292

Closed
mattray opened this issue Jun 26, 2020 · 2 comments
Closed

chef install requires .rb file present #1292

mattray opened this issue Jun 26, 2020 · 2 comments
Labels

Comments

@mattray
Copy link

mattray commented Jun 26, 2020

Description

chef install CLI output "You can use the lockfile to install the locked cookbooks on another machine."

If you copy a lock.json to another system, you get output like this:

$ chef install base.lock.json
Error: Policyfile not found at path /home/mattray/base.rb
$ chef export base.lock.json --archive .
Error: Invalid lockfile data
Reason: (ChefCLI::CachedCookbookNotFound) Cookbook `audit' not found at expected cache location `audit-9.4.0-supermarket.chef.io' (full path: `/home/mattray/.chef-workstation/cache/cookbooks/audit-9.4.0-supermarket.chef.io')

But if you just create an empty file, it works.

$ touch base.rb
$ chef install base.lock.json
Installing cookbooks from lock
Installing audit       9.4.0 
Installing chef-client 11.5.0
Installing cron        6.3.1 
Installing iptables    7.1.0 
Installing logrotate   2.2.3 
Installing openssh     2.8.1 
$ chef export base.lock.json --archive .
Exported policy 'base' to /home/mattray/base-f2263ceeb4cc1ddd9ea2dd0eb70718bb1e63cdbec1c9686b4340c3ab8c372824.tgz

Chef Workstation Version

Workstation 20.6.62 on

Platform Version

MacOS 14 and Debian 10

Aha! Link: https://chef.aha.io/features/SH-2414

@mattray mattray added the Status: Untriaged An issue that has yet to be triaged. label Jun 26, 2020
@tyler-ball
Copy link
Contributor

Thanks for the repro example Matt, getting this triaged

@tyler-ball tyler-ball added Triage: Confirmed Indicates and issue has been confirmed as described. Type: Bug Does not work as expected. and removed Status: Untriaged An issue that has yet to be triaged. labels Jul 22, 2020
@jonsmorrow jonsmorrow added Epic and removed Triage: Confirmed Indicates and issue has been confirmed as described. Type: Bug Does not work as expected. labels Nov 2, 2020
@tas50
Copy link
Contributor

tas50 commented Nov 11, 2020

Fixed chef/chef-cli#131

@tas50 tas50 closed this as completed Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants