You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run kitchen converge icinga-ubuntu-2204 I got the following error:
-----> Creating <icinga-ubuntu-2204>...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>> Failed to complete#create action: [undefined method `each' for nil:NilClass] on icinga-ubuntu-2204
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all`for configuration
After checking that everything was well configured I tried the debug option kitchen converge --debug icinga-ubuntu-2204
In the ~/.kitchen/logs/kitchen.log file I found the following error:
E, [2022-10-25T14:54:47.745961 #68914] ERROR -- Kitchen: -Composite Exception--
E, [2022-10-25T14:54:47.745965 #68914] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2022-10-25T14:54:47.745970 #68914] ERROR -- Kitchen: Message: Failed to complete #create action: [undefined method `each' for nil:NilClass] on icinga-ubuntu-2204
E, [2022-10-25T14:54:47.745974 #68914] ERROR -- Kitchen: ----------------------
E, [2022-10-25T14:54:47.745979 #68914] ERROR -- Kitchen: ------Backtrace-------
E, [2022-10-25T14:54:47.745983 #68914] ERROR -- Kitchen: /opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/kitchen-dokken-2.17.3/lib/kitchen/driver/dokken.rb:440:in `docker_config_creds'
By opening the gems file I found the following code:
defdocker_config_credsreturn@docker_config_credsif@docker_config_creds@docker_config_creds={}config_file= ::File.join(::Dir.home,".docker","config.json")if ::File.exist?(config_file)JSON.load_file!(config_file)["auths"].eachdo |k,v|
nextifv["auth"].nil?username,password=Base64.decode64(v["auth"]).split(":")@docker_config_creds[k]={serveraddress: k,username: username,password: password}endelsedebug("~/.docker/config.json does not exist")end@docker_config_credsend
As you can see the loop tries to iterate an "auths" key in ~/.docker/config.json that doesn't exist.
In order to fix the bug, the user must run docker login -u your_docker_username "https://index.docker.io/v1/" or manually add the following "auths" content:
#Chef
Chef Workstation version: 22.10.1013
Chef CLI version: 5.6.1
Chef Habitat version: 1.6.521
Test Kitchen version: 3.3.2
Cookstyle version: 7.32.1
#Gems
Chef Infra Client version: 17.10.0
kitchen-azurerm (1.10.5)
kitchen-digitalocean (0.14.2)
kitchen-dokken (2.17.3)
kitchen-ec2 (3.13.0)
kitchen-google (2.3.0)
kitchen-hyperv (0.7.1)
kitchen-inspec (2.6.1)
kitchen-openstack (6.2.0)
kitchen-vagrant (1.12.1)
kitchen-vcenter (2.11.13)
kitchen-vra (3.2.0)
test-kitchen (3.3.2)
Environment
Model Name: MacBook Pro
Model Identifier: Mac14,7
Chip: Apple M2
Total Number of Cores: 8 (4 performance and 4 efficiency)
Memory: 16 GB
System Firmware Version: 7459.141.1
OS Loader Version: 7459.141.1
Serial Number (system): *********
Hardware UUID: B******
Provisioning UDID: ********
Activation Lock Status: Enabled
Scenario
Run kitchen converge and kitchen login in a docker's fresh installation
Steps to Reproduce
Fresh install docker, kitchen and try to run a cookbook.
Expected Result
Docker container up and running
Actual Result
Error
The text was updated successfully, but these errors were encountered:
👻 Issues with kitchen and Docker integration
When trying to run
kitchen converge icinga-ubuntu-2204
I got the following error:After checking that everything was well configured I tried the debug option
kitchen converge --debug icinga-ubuntu-2204
In the
~/.kitchen/logs/kitchen.log
file I found the following error:By opening the gems file I found the following code:
As you can see the loop tries to iterate an "auths" key in
~/.docker/config.json
that doesn't exist.In order to fix the bug, the user must run
docker login -u your_docker_username "https://index.docker.io/v1/"
or manually add the following "auths" content:Version
Environment
Scenario
Run kitchen converge and kitchen login in a docker's fresh installation
Steps to Reproduce
Fresh install docker, kitchen and try to run a cookbook.
Expected Result
Docker container up and running
Actual Result
Error
The text was updated successfully, but these errors were encountered: