{"action":"created","issue":{"url":"https://api.github.com/repos/shortdudey123/chef-gluster/issues/60","repository_url":"https://api.github.com/repos/shortdudey123/chef-gluster","labels_url":"https://api.github.com/repos/shortdudey123/chef-gluster/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/shortdudey123/chef-gluster/issues/60/comments","events_url":"https://api.github.com/repos/shortdudey123/chef-gluster/issues/60/events","html_url":"https://github.com/shortdudey123/chef-gluster/issues/60","id":156786856,"number":60,"title":"bricks_waiting_to_join - undefined method `empty?' for nil:NilClass","user":{"login":"dpattmann","id":12241781,"avatar_url":"https://avatars.githubusercontent.com/u/12241781?v=3","gravatar_id":"","url":"https://api.github.com/users/dpattmann","html_url":"https://github.com/dpattmann","followers_url":"https://api.github.com/users/dpattmann/followers","following_url":"https://api.github.com/users/dpattmann/following{/other_user}","gists_url":"https://api.github.com/users/dpattmann/gists{/gist_id}","starred_url":"https://api.github.com/users/dpattmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpattmann/subscriptions","organizations_url":"https://api.github.com/users/dpattmann/orgs","repos_url":"https://api.github.com/users/dpattmann/repos","events_url":"https://api.github.com/users/dpattmann/events{/privacy}","received_events_url":"https://api.github.com/users/dpattmann/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/shortdudey123/chef-gluster/labels/Bug","name":"Bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-05-25T15:55:50Z","updated_at":"2016-06-14T08:36:39Z","closed_at":null,"body":"Hi,\r\n\r\nafter the first chef-run I get this error message from my chef-client. (12.7.2)\r\n\r\n```bash\r\n  ================================================================================\r\n  Recipe Compile Error in /var/chef/cache/cookbooks/gluster/recipes/server.rb\r\n  ================================================================================\r\n  \r\n  NoMethodError\r\n  -------------\r\n  undefined method `empty?' for nil:NilClass\r\n  \r\n  Cookbook Trace:\r\n  ---------------\r\n    /var/chef/cache/cookbooks/gluster/recipes/server_extend.rb:40:in `block in from_file'\r\n    /var/chef/cache/cookbooks/gluster/recipes/server_extend.rb:1:in `each'\r\n    /var/chef/cache/cookbooks/gluster/recipes/server_extend.rb:1:in `from_file'\r\n    /var/chef/cache/cookbooks/gluster/recipes/server.rb:24:in `from_file'\r\n  \r\n  Relevant File Content:\r\n  ----------------------\r\n  /var/chef/cache/cookbooks/gluster/recipes/server_extend.rb:\r\n  \r\n   33:        unless brick_in_volume?(peer_name, brick, volume_name)\r\n   34:          node.default['gluster']['server']['volumes'][volume_name]['bricks_waiting_to_join'] << \" #{peer_name}:#{brick}\"\r\n   35:        end\r\n   36:      end\r\n   37:    end\r\n   38:  \r\n   39:    replica_count = volume_values['replica_count']\r\n   40>>   next if node['gluster']['server']['volumes'][volume_name]['bricks_waiting_to_join'].empty?\r\n   41:    # The number of bricks in bricks_waiting_to_join has to be a modulus of the replica_count we are using for our gluster volume\r\n   42:    if (brick_count % replica_count) == 0\r\n   43:      Chef::Log.info(\"Attempting to add new bricks into volume #{volume_name}\")\r\n   44:      execute \"gluster volume add-brick #{volume_name} #{node['gluster']['server']['volumes'][volume_name]['bricks_waiting_to_join']}\" do\r\n   45:        action :run\r\n   46:      end\r\n   47:      node.set['gluster']['server']['volumes'][volume_name]['bricks_waiting_to_join'] = ''\r\n   48:    elsif volume_values['volume_type'] == 'striped'\r\n   49:      Chef::Log.warn(\"#{volume_name} is a striped volume, adjusting replica count to match new number of bricks\")\r\n  \r\n  \r\n  Running handlers:\r\n[2016-05-25T15:43:08+00:00] ERROR: Running exception handlers\r\n  Running handlers complete\r\n[2016-05-25T15:43:08+00:00] ERROR: Exception handlers complete\r\n  Chef Client failed. 1 resources updated in 07 seconds\r\n[2016-05-25T15:43:08+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out\r\n[2016-05-25T15:43:08+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report\r\n[2016-05-25T15:43:08+00:00] ERROR: undefined method `empty?' for nil:NilClass\r\n[2016-05-25T15:43:09+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)\r\n```\r\n\r\nI fixed this error by setting ```bricks_waiting_to_join``` for each volume to```''```, but it looks like a bug :bug: "},"comment":{"url":"https://api.github.com/repos/shortdudey123/chef-gluster/issues/comments/225815498","html_url":"https://github.com/shortdudey123/chef-gluster/issues/60#issuecomment-225815498","issue_url":"https://api.github.com/repos/shortdudey123/chef-gluster/issues/60","id":225815498,"user":{"login":"dpattmann","id":12241781,"avatar_url":"https://avatars.githubusercontent.com/u/12241781?v=3","gravatar_id":"","url":"https://api.github.com/users/dpattmann","html_url":"https://github.com/dpattmann","followers_url":"https://api.github.com/users/dpattmann/followers","following_url":"https://api.github.com/users/dpattmann/following{/other_user}","gists_url":"https://api.github.com/users/dpattmann/gists{/gist_id}","starred_url":"https://api.github.com/users/dpattmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpattmann/subscriptions","organizations_url":"https://api.github.com/users/dpattmann/orgs","repos_url":"https://api.github.com/users/dpattmann/repos","events_url":"https://api.github.com/users/dpattmann/events{/privacy}","received_events_url":"https://api.github.com/users/dpattmann/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T08:36:39Z","updated_at":"2016-06-14T08:36:39Z","body":"Any updates here. :-)"}}
{"actor":{"display_login":"dpattmann"}}