{"action":"created","issue":{"url":"https://api.github.com/repos/bloomberg/bcpc/issues/747","labels_url":"https://api.github.com/repos/bloomberg/bcpc/issues/747/labels{/name}","comments_url":"https://api.github.com/repos/bloomberg/bcpc/issues/747/comments","events_url":"https://api.github.com/repos/bloomberg/bcpc/issues/747/events","html_url":"https://github.com/bloomberg/bcpc/pull/747","id":98064231,"number":747,"title":"Added support for AZs in compute","user":{"login":"caiush","id":750916,"avatar_url":"https://avatars.githubusercontent.com/u/750916?v=3","gravatar_id":"","url":"https://api.github.com/users/caiush","html_url":"https://github.com/caiush","followers_url":"https://api.github.com/users/caiush/followers","following_url":"https://api.github.com/users/caiush/following{/other_user}","gists_url":"https://api.github.com/users/caiush/gists{/gist_id}","starred_url":"https://api.github.com/users/caiush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caiush/subscriptions","organizations_url":"https://api.github.com/users/caiush/orgs","repos_url":"https://api.github.com/users/caiush/repos","events_url":"https://api.github.com/users/caiush/events{/privacy}","received_events_url":"https://api.github.com/users/caiush/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-30T01:31:05Z","updated_at":"2015-07-30T13:42:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bloomberg/bcpc/pulls/747","html_url":"https://github.com/bloomberg/bcpc/pull/747","diff_url":"https://github.com/bloomberg/bcpc/pull/747.diff","patch_url":"https://github.com/bloomberg/bcpc/pull/747.patch"},"body":"Currently users can use server groups to make sure they don't land on the same host. If however, you have a bigger failure domain, e.g. racks, there is no way to allow users to spread VMs over these. \r\n\r\nThis PR introduces availability zones (AZ). By default the AZ will be one per rack, however, you can create your own AZ by setting `node['bcpc']['availability_zone']`.\r\n\r\nIn the laptop environment we give each node its own AZ, just for fun. \r\n"},"comment":{"url":"https://api.github.com/repos/bloomberg/bcpc/issues/comments/126328487","html_url":"https://github.com/bloomberg/bcpc/pull/747#issuecomment-126328487","issue_url":"https://api.github.com/repos/bloomberg/bcpc/issues/747","id":126328487,"user":{"login":"erhudy","id":1065271,"avatar_url":"https://avatars.githubusercontent.com/u/1065271?v=3","gravatar_id":"","url":"https://api.github.com/users/erhudy","html_url":"https://github.com/erhudy","followers_url":"https://api.github.com/users/erhudy/followers","following_url":"https://api.github.com/users/erhudy/following{/other_user}","gists_url":"https://api.github.com/users/erhudy/gists{/gist_id}","starred_url":"https://api.github.com/users/erhudy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erhudy/subscriptions","organizations_url":"https://api.github.com/users/erhudy/orgs","repos_url":"https://api.github.com/users/erhudy/repos","events_url":"https://api.github.com/users/erhudy/events{/privacy}","received_events_url":"https://api.github.com/users/erhudy/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T13:42:48Z","updated_at":"2015-07-30T13:42:48Z","body":"This detonated during recipe compilation. It looks like it would be good to set a default value for `['bcpc']['availability_zone']` in the cookbook attributes:\r\n```\r\n192.168.194.45 ================================================================================\r\n192.168.194.45 Recipe Compile Error in /var/chef/cache/cookbooks/bcpc/recipes/host-aggregates.rb\r\n192.168.194.45 ================================================================================\r\n192.168.194.45 \r\n192.168.194.45 TypeError\r\n192.168.194.45 ---------\r\n192.168.194.45 no implicit conversion of nil into String\r\n192.168.194.45 \r\n192.168.194.45 Cookbook Trace:\r\n192.168.194.45 ---------------\r\n192.168.194.45   /var/chef/cache/cookbooks/bcpc/recipes/host-aggregates.rb:20:in `+'\r\n192.168.194.45   /var/chef/cache/cookbooks/bcpc/recipes/host-aggregates.rb:20:in `from_file'\r\n192.168.194.45 \r\n192.168.194.45 Relevant File Content:\r\n192.168.194.45 ----------------------\r\n192.168.194.45 /var/chef/cache/cookbooks/bcpc/recipes/host-aggregates.rb:\r\n192.168.194.45 \r\n192.168.194.45  13:  # distributed under the License is distributed on an \"AS IS\" BASIS,\r\n192.168.194.45  14:  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n192.168.194.45  15:  # See the License for the specific language governing permissions and\r\n192.168.194.45  16:  # limitations under the License.\r\n192.168.194.45  17:  #\r\n192.168.194.45  18:  \r\n192.168.194.45  19:  az_number = (node['hostname'] =~ /bcpc\\-vm/) ? node['bcpc']['node_number'] : node['bcpc']['rack']\r\n192.168.194.45  20>> availability_zone = (node['bcpc']['availability_zone'].nil? ) ? node['bcpc']['region_name'] + \"-\" + az_number : node['bcpc']['availability_zone']\r\n192.168.194.45  21:  \r\n192.168.194.45  22:  node['bcpc']['host_aggregates'].each do |name, properties| \r\n192.168.194.45  23:    bcpc_host_aggregate name do\r\n192.168.194.45  24:      metadata properties\r\n192.168.194.45  25:    end\r\n192.168.194.45  26:  end \r\n192.168.194.45  27:  \r\n192.168.194.45  28:  node['bcpc']['aggregate_membership'].each do |name| \r\n192.168.194.45  29:      bcpc_host_aggregate name do\r\n192.168.194.45 \r\n```"}}