GitHub PullRequestReviewCommentEvent at 2014-03-11 15:59:51
Repository: barclamp-ceilometer
Actor: aspiers
Payload: {"comment":{"url":"https://api.github.com/repos/crowbar/barclamp-ceilometer/pulls/comments/10480036","id":10480036,"diff_hunk":"@@ -0,0 +1,46 @@\n+# Copyright 2014 SUSE\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+#\n+\n+if node[:ceilometer][:ha][:central][:enabled]\n+\n+  service_name = \"ceilometer-agent-central-service\"\n+\n+  # Allow one retry, to avoid races where two nodes create the primitive at the\n+  # same time when it wasn't created yet (only one can obviously succeed)\n+  pacemaker_primitive service_name do\n+    agent node[:ceilometer][:ha][:central][:agent]\n+    op node[:ceilometer][:ha][:central][:op]\n+    params ({\n+      \"user\"    => node[:ceilometer][:user],\n+      \"binary\"  => \"/usr/bin/ceilometer-agent-central\"\n+    })\n+    action :create\n+    retries 1\n+    retry_delay 5\n+  end\n+\n+  # Allow one retry, to avoid races where two nodes create the primitive at the\n+  # same time when it wasn't created yet (only one can obviously succeed)\n+  pacemaker_group \"ceilometer-agent-central-group\" do","path":"chef/cookbooks/ceilometer/recipes/central_ha.rb","position":47,"original_position":36,"commit_id":"c3db76fd53e507c64ab7e1215760628bce9d1326","original_commit_id":"72d30bd9982cec3a3a147fde2b681d16ad2c48b0","user":{"login":"aspiers","id":100738,"avatar_url":"https://gravatar.com/avatar/e46b43cae79fc30df748cf5cfe0c0e99?d=https%3A%2F%2Fidenticons.github.com%2F9b374323cdadb4c132167991f41f9d12.png&r=x","gravatar_id":"e46b43cae79fc30df748cf5cfe0c0e99","url":"https://api.github.com/users/aspiers","html_url":"https://github.com/aspiers","followers_url":"https://api.github.com/users/aspiers/followers","following_url":"https://api.github.com/users/aspiers/following{/other_user}","gists_url":"https://api.github.com/users/aspiers/gists{/gist_id}","starred_url":"https://api.github.com/users/aspiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspiers/subscriptions","organizations_url":"https://api.github.com/users/aspiers/orgs","repos_url":"https://api.github.com/users/aspiers/repos","events_url":"https://api.github.com/users/aspiers/events{/privacy}","received_events_url":"https://api.github.com/users/aspiers/received_events","type":"User","site_admin":false},"body":"There may be unwanted side effects of abusing groups like this, because groups were never intended for wrapping singleton members.  I would much prefer we only use groups when we need them.","created_at":"2014-03-11T15:59:51Z","updated_at":"2014-03-11T15:59:51Z","html_url":"https://github.com/crowbar/barclamp-ceilometer/pull/97#discussion_r10480036","pull_request_url":"https://api.github.com/repos/crowbar/barclamp-ceilometer/pulls/97","_links":{"self":{"href":"https://api.github.com/repos/crowbar/barclamp-ceilometer/pulls/comments/10480036"},"html":{"href":"https://github.com/crowbar/barclamp-ceilometer/pull/97#discussion_r10480036"},"pull_request":{"href":"https://api.github.com/repos/crowbar/barclamp-ceilometer/pulls/97"}}}}