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-solo: Unable to locate config file #8714

Open
vsingh-msys opened this issue Jul 4, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@vsingh-msys
Copy link
Contributor

commented Jul 4, 2019

Description

Unable to locate config file for chef-solo -c or --config option

Reference: https://stackoverflow.com/questions/56745844/unable-to-locate-config-files-when-i-tried-to-run-chef-solo

Chef Version

15.0.300 & latest 15.1.37

Platform Version

Windows & Ubuntu

Replication Case

chef-solo -c solo.rb

Client Output

Ubuntu

[2019-07-04T14:41:28+05:30] WARN: *****************************************
[2019-07-04T14:41:28+05:30] WARN: Did not find config file: /solo.rb. Using command line options instead.
[2019-07-04T14:41:28+05:30] WARN: *****************************************
[2019-07-04T14:41:28+05:30] WARN: No cookbooks directory found at or above current directory.  Assuming /var/chef.
[2019-07-04T14:41:28+05:30] DEBUG: Reading products and relationships...
[2019-07-04T14:41:28+05:30] DEBUG: Successfully read products and relationships

Windows

[2019-07-04T13:56:13-07:00] WARN: *****************************************
[2019-07-04T13:56:13-07:00] WARN: Did not find config file: C:/solo.rb. Using command line options instead.
[2019-07-04T13:56:13-07:00] WARN: *****************************************
[2019-07-04T13:56:13-07:00] WARN: No cookbooks directory found at or above current directory.  Assuming C:/Users/vsingh-msys\.chef.
[2019-07-04T13:56:13-07:00] WARN: *****************************************
[2019-07-04T13:56:13-07:00] WARN: Did not find config file: C:/solo.rb. Using command line options instead.
[2019-07-04T13:56:13-07:00] WARN: *****************************************

Stacktrace

@lamont-granquist

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

The important point from this one is likely that relative paths aren't being expanded so there needs to be some File.expand_path() rubbed on some of these variables somewhere.

@lamont-granquist

This comment has been minimized.

Copy link
Contributor

commented Jul 5, 2019

This is also likely a dup

@vsingh-msys

This comment has been minimized.

Copy link
Contributor Author

commented Jul 6, 2019

Yes, the path is being reset by setup_application method before reconfiguration.

def run(enforce_license: false)
setup_signal_handlers
setup_application
reconfigure
check_license_acceptance if enforce_license

Here we need to call reconfigure then setup_application.

@vsingh-msys vsingh-msys referenced this issue Jul 6, 2019

Closed

chef-solo: Unable to locate config file #8716

2 of 10 tasks complete
@lamont-granquist

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2019

This is related to: #8138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.