{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef/issues/2962","labels_url":"https://api.github.com/repos/chef/chef/issues/2962/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef/issues/2962/comments","events_url":"https://api.github.com/repos/chef/chef/issues/2962/events","html_url":"https://github.com/chef/chef/issues/2962","id":58373239,"number":2962,"title":"chef_gem kills chef-client run when source does not have gem, but gem gets installed anyhow from rubygems.org","user":{"login":"pburkholder","id":1211146,"avatar_url":"https://avatars.githubusercontent.com/u/1211146?v=3","gravatar_id":"","url":"https://api.github.com/users/pburkholder","html_url":"https://github.com/pburkholder","followers_url":"https://api.github.com/users/pburkholder/followers","following_url":"https://api.github.com/users/pburkholder/following{/other_user}","gists_url":"https://api.github.com/users/pburkholder/gists{/gist_id}","starred_url":"https://api.github.com/users/pburkholder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pburkholder/subscriptions","organizations_url":"https://api.github.com/users/pburkholder/orgs","repos_url":"https://api.github.com/users/pburkholder/repos","events_url":"https://api.github.com/users/pburkholder/events{/privacy}","received_events_url":"https://api.github.com/users/pburkholder/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chef/chef/labels/Chef%20Core","name":"Chef Core","color":"c7def8"}],"state":"open","locked":false,"assignee":{"login":"pburkholder","id":1211146,"avatar_url":"https://avatars.githubusercontent.com/u/1211146?v=3","gravatar_id":"","url":"https://api.github.com/users/pburkholder","html_url":"https://github.com/pburkholder","followers_url":"https://api.github.com/users/pburkholder/followers","following_url":"https://api.github.com/users/pburkholder/following{/other_user}","gists_url":"https://api.github.com/users/pburkholder/gists{/gist_id}","starred_url":"https://api.github.com/users/pburkholder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pburkholder/subscriptions","organizations_url":"https://api.github.com/users/pburkholder/orgs","repos_url":"https://api.github.com/users/pburkholder/repos","events_url":"https://api.github.com/users/pburkholder/events{/privacy}","received_events_url":"https://api.github.com/users/pburkholder/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-02-20T16:09:53Z","updated_at":"2015-07-07T00:47:17Z","closed_at":null,"body":"This recipe:\r\n\r\n    chef_gem \"chef-vault\" do\r\n      source \"http://mirror.ops.rhcloud.com/mirror/ruby\" \r\n    end\r\n\r\nwith `kitchen converge` on centos-6.5 generates this: \r\n\r\n      Creating a new client identity for default-centos-65 using the validator key.\r\n       [2015-02-20T16:03:55+00:00] WARN: Child with name 'dna.json' found in multiple directories: /tmp/kitchen/dna.json and /tmp/kitchen/dna.json\r\n       [2015-02-20T16:03:55+00:00] WARN: Child with name 'dna.json' found in multiple directories: /tmp/kitchen/dna.json and /tmp/kitchen/dna.json\r\n       resolving cookbooks for run list: [\"chef_gem::default\"]\r\n       [2015-02-20T16:03:55+00:00] WARN: Child with name 'dna.json' found in multiple directories: /tmp/kitchen/dna.json and /tmp/kitchen/dna.json\r\n       Synchronizing Cookbooks:\r\n         - chef_gem\r\n       Compiling Cookbooks...\r\n       Recipe: chef_gem::default\r\n       [2015-02-20T16:03:56+00:00] WARN:  failed to find gem chef-vault (>= 0) from [http://mirror.ops.rhcloud.com/mirror/ruby]\r\n\r\n           - install version  of package chef-vault\r\n         Converging 1 resources\r\n\r\n\r\n           ================================================================================\r\n           Error executing action `install` on resource 'chef_gem[chef-vault]'\r\n           ================================================================================\r\n\r\n           Gem::Requirement::BadRequirementError\r\n           -------------------------------------\r\n           Illformed requirement [\"\"]\r\n\r\n           Resource Declaration:\r\n           ---------------------\r\n           # In /tmp/kitchen/cache/cookbooks/chef_gem/recipes/default.rb\r\n\r\n             8: chef_gem \"chef-vault\" do\r\n             9:  source \"http://mirror.ops.rhcloud.com/mirror/ruby\"\r\n            10: end\r\n\r\n           Compiled Resource:\r\n           ------------------\r\n           # Declared in /tmp/kitchen/cache/cookbooks/chef_gem/recipes/default.rb:8:in `from_file'\r\n\r\n           chef_gem(\"chef-vault\") do\r\n             action :install\r\n             updated true\r\n             retries 0\r\n             retry_delay 2\r\n             default_guard_interpreter :default\r\n             package_name \"chef-vault\"\r\n             source \"http://mirror.ops.rhcloud.com/mirror/ruby\"\r\n             timeout 900\r\n             gem_binary \"/opt/chef/embedded/bin/gem\"\r\n             declared_type :chef_gem\r\n             cookbook_name \"chef_gem\"\r\n             recipe_name \"default\"\r\n           end\r\n\r\n\r\n       Running handlers:\r\n       [2015-02-20T16:04:10+00:00] ERROR: Running exception handlers\r\n       Running handlers complete\r\n       [2015-02-20T16:04:10+00:00] ERROR: Exception handlers complete\r\n       [2015-02-20T16:04:10+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out\r\n       Chef Client failed. 1 resources updated in 16.209192275 seconds\r\n       [2015-02-20T16:04:10+00:00] ERROR: chef_gem[chef-vault] (chef_gem::default line 8) had an error: Gem::Requirement::BadRequirementError: Illformed requirement [\"\"]\r\n       [2015-02-20T16:04:11+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)\r\n>>>>>> Converge failed on instance <default-centos-65>.\r\n\r\n\r\nBut on the box itself the gem is installed:\r\n\r\n    gem list chef-vault\r\n\r\n    *** LOCAL GEMS ***\r\n\r\n    chef-vault (2.5.0)\r\n\r\nIf the source does not have the gem, the gem should not get installed.  Or, if the gem does get installed, then the run should not fail.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/chef/chef/issues/comments/119036384","html_url":"https://github.com/chef/chef/issues/2962#issuecomment-119036384","issue_url":"https://api.github.com/repos/chef/chef/issues/2962","id":119036384,"user":{"login":"afiune","id":5712253,"avatar_url":"https://avatars.githubusercontent.com/u/5712253?v=3","gravatar_id":"","url":"https://api.github.com/users/afiune","html_url":"https://github.com/afiune","followers_url":"https://api.github.com/users/afiune/followers","following_url":"https://api.github.com/users/afiune/following{/other_user}","gists_url":"https://api.github.com/users/afiune/gists{/gist_id}","starred_url":"https://api.github.com/users/afiune/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afiune/subscriptions","organizations_url":"https://api.github.com/users/afiune/orgs","repos_url":"https://api.github.com/users/afiune/repos","events_url":"https://api.github.com/users/afiune/events{/privacy}","received_events_url":"https://api.github.com/users/afiune/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T00:47:17Z","updated_at":"2015-07-07T00:47:17Z","body":"Alright guys... I couldn't replicate the issue, I was working with @jaym and he recommended to set the `compile` to `false` but apparently the issue is gone. :disappointed: \r\n\r\nThat is only telling me that this problem is with Rubygem API and not with Chef! Perhaps next time it happens I will try to debug on time. Thanks!\r\n\r\ncc/ @chef/delivery @chef/engineering-leads "}}