{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/comments/46301767","id":46301767,"diff_hunk":"@@ -0,0 +1,57 @@\n+#\n+# Cookbook Name:: updater\n+# Recipe:: upgrade\n+#\n+# Copyright 2013-2015, SUSE LINUX Products GmbH\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+\n+# Disable openstack services\n+# We don't know which openstack services are enabled on the node and\n+# collecting that information via the attributes provided by chef is\n+# is rather complicated. So instead we fall back to a simple bash hack\n+\n+if !node[:updater].has_key?(:upgrade_one_shot_run) || !node[:updater][:upgrade_one_shot_run]\n+\n+  node[:updater][:upgrade_one_shot_run] = true\n+  node.save\n+\n+\n+  bash \"disable_openstack_services\" do\n+    code <<-EOF\n+      for i in /etc/init.d/openstack-* /etc/init.d/openvswitch-switch /etc/init.d/ovs-usurp-config-* /etc/init.d/drbd /etc/init.d/openais;\n+      do\n+        if test -e $i\n+        then\n+          initscript=`basename $i`\n+          insserv -r $initscript\n+        fi\n+      done\n+    EOF\n+    only_if { node[:platform] == \"suse\" }\n+  end","path":"chef/cookbooks/updater/recipes/upgrade.rb","position":44,"original_position":44,"commit_id":"31ddbf395af24228c61bc529281323979b62880c","original_commit_id":"31ddbf395af24228c61bc529281323979b62880c","user":{"login":"jsuchome","id":910000,"avatar_url":"https://avatars.githubusercontent.com/u/910000?v=3","gravatar_id":"","url":"https://api.github.com/users/jsuchome","html_url":"https://github.com/jsuchome","followers_url":"https://api.github.com/users/jsuchome/followers","following_url":"https://api.github.com/users/jsuchome/following{/other_user}","gists_url":"https://api.github.com/users/jsuchome/gists{/gist_id}","starred_url":"https://api.github.com/users/jsuchome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsuchome/subscriptions","organizations_url":"https://api.github.com/users/jsuchome/orgs","repos_url":"https://api.github.com/users/jsuchome/repos","events_url":"https://api.github.com/users/jsuchome/events{/privacy}","received_events_url":"https://api.github.com/users/jsuchome/received_events","type":"User","site_admin":false},"body":"HA parts are needed as well: \r\n- put HA nodes in maintenance mode\r\n- disable corosync\r\n\r\n(code for this should be in the 4-5 upgrade script)\r\n","created_at":"2015-12-01T16:35:55Z","updated_at":"2015-12-01T16:35:55Z","html_url":"https://github.com/crowbar/barclamp-updater/pull/11#discussion_r46301767","pull_request_url":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/comments/46301767"},"html":{"href":"https://github.com/crowbar/barclamp-updater/pull/11#discussion_r46301767"},"pull_request":{"href":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/11","id":51198809,"html_url":"https://github.com/crowbar/barclamp-updater/pull/11","diff_url":"https://github.com/crowbar/barclamp-updater/pull/11.diff","patch_url":"https://github.com/crowbar/barclamp-updater/pull/11.patch","issue_url":"https://api.github.com/repos/crowbar/barclamp-updater/issues/11","number":11,"state":"open","locked":false,"title":"Draft to implement upgrade state/disable services","user":{"login":"nkrinner","id":975758,"avatar_url":"https://avatars.githubusercontent.com/u/975758?v=3","gravatar_id":"","url":"https://api.github.com/users/nkrinner","html_url":"https://github.com/nkrinner","followers_url":"https://api.github.com/users/nkrinner/followers","following_url":"https://api.github.com/users/nkrinner/following{/other_user}","gists_url":"https://api.github.com/users/nkrinner/gists{/gist_id}","starred_url":"https://api.github.com/users/nkrinner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkrinner/subscriptions","organizations_url":"https://api.github.com/users/nkrinner/orgs","repos_url":"https://api.github.com/users/nkrinner/repos","events_url":"https://api.github.com/users/nkrinner/events{/privacy}","received_events_url":"https://api.github.com/users/nkrinner/received_events","type":"User","site_admin":false},"body":"Add a role to the updater barclamp that allows to disable\r\nall openstack services and crowbar_join and disables and\r\nstops chef-client","created_at":"2015-11-19T09:35:12Z","updated_at":"2015-12-01T16:35:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b0bca1d2f74316354206d50c0c12d6320b672a4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/11/commits","review_comments_url":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/11/comments","review_comment_url":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/barclamp-updater/issues/11/comments","statuses_url":"https://api.github.com/repos/crowbar/barclamp-updater/statuses/31ddbf395af24228c61bc529281323979b62880c","head":{"label":"nkrinner:upgrade-cloud6","ref":"upgrade-cloud6","sha":"31ddbf395af24228c61bc529281323979b62880c","user":{"login":"nkrinner","id":975758,"avatar_url":"https://avatars.githubusercontent.com/u/975758?v=3","gravatar_id":"","url":"https://api.github.com/users/nkrinner","html_url":"https://github.com/nkrinner","followers_url":"https://api.github.com/users/nkrinner/followers","following_url":"https://api.github.com/users/nkrinner/following{/other_user}","gists_url":"https://api.github.com/users/nkrinner/gists{/gist_id}","starred_url":"https://api.github.com/users/nkrinner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkrinner/subscriptions","organizations_url":"https://api.github.com/users/nkrinner/orgs","repos_url":"https://api.github.com/users/nkrinner/repos","events_url":"https://api.github.com/users/nkrinner/events{/privacy}","received_events_url":"https://api.github.com/users/nkrinner/received_events","type":"User","site_admin":false},"repo":{"id":22285581,"name":"barclamp-updater","full_name":"nkrinner/barclamp-updater","owner":{"login":"nkrinner","id":975758,"avatar_url":"https://avatars.githubusercontent.com/u/975758?v=3","gravatar_id":"","url":"https://api.github.com/users/nkrinner","html_url":"https://github.com/nkrinner","followers_url":"https://api.github.com/users/nkrinner/followers","following_url":"https://api.github.com/users/nkrinner/following{/other_user}","gists_url":"https://api.github.com/users/nkrinner/gists{/gist_id}","starred_url":"https://api.github.com/users/nkrinner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nkrinner/subscriptions","organizations_url":"https://api.github.com/users/nkrinner/orgs","repos_url":"https://api.github.com/users/nkrinner/repos","events_url":"https://api.github.com/users/nkrinner/events{/privacy}","received_events_url":"https://api.github.com/users/nkrinner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nkrinner/barclamp-updater","description":"Crowbar Updater: Update System Packages","fork":true,"url":"https://api.github.com/repos/nkrinner/barclamp-updater","forks_url":"https://api.github.com/repos/nkrinner/barclamp-updater/forks","keys_url":"https://api.github.com/repos/nkrinner/barclamp-updater/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nkrinner/barclamp-updater/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nkrinner/barclamp-updater/teams","hooks_url":"https://api.github.com/repos/nkrinner/barclamp-updater/hooks","issue_events_url":"https://api.github.com/repos/nkrinner/barclamp-updater/issues/events{/number}","events_url":"https://api.github.com/repos/nkrinner/barclamp-updater/events","assignees_url":"https://api.github.com/repos/nkrinner/barclamp-updater/assignees{/user}","branches_url":"https://api.github.com/repos/nkrinner/barclamp-updater/branches{/branch}","tags_url":"https://api.github.com/repos/nkrinner/barclamp-updater/tags","blobs_url":"https://api.github.com/repos/nkrinner/barclamp-updater/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nkrinner/barclamp-updater/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nkrinner/barclamp-updater/git/refs{/sha}","trees_url":"https://api.github.com/repos/nkrinner/barclamp-updater/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nkrinner/barclamp-updater/statuses/{sha}","languages_url":"https://api.github.com/repos/nkrinner/barclamp-updater/languages","stargazers_url":"https://api.github.com/repos/nkrinner/barclamp-updater/stargazers","contributors_url":"https://api.github.com/repos/nkrinner/barclamp-updater/contributors","subscribers_url":"https://api.github.com/repos/nkrinner/barclamp-updater/subscribers","subscription_url":"https://api.github.com/repos/nkrinner/barclamp-updater/subscription","commits_url":"https://api.github.com/repos/nkrinner/barclamp-updater/commits{/sha}","git_commits_url":"https://api.github.com/repos/nkrinner/barclamp-updater/git/commits{/sha}","comments_url":"https://api.github.com/repos/nkrinner/barclamp-updater/comments{/number}","issue_comment_url":"https://api.github.com/repos/nkrinner/barclamp-updater/issues/comments{/number}","contents_url":"https://api.github.com/repos/nkrinner/barclamp-updater/contents/{+path}","compare_url":"https://api.github.com/repos/nkrinner/barclamp-updater/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nkrinner/barclamp-updater/merges","archive_url":"https://api.github.com/repos/nkrinner/barclamp-updater/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nkrinner/barclamp-updater/downloads","issues_url":"https://api.github.com/repos/nkrinner/barclamp-updater/issues{/number}","pulls_url":"https://api.github.com/repos/nkrinner/barclamp-updater/pulls{/number}","milestones_url":"https://api.github.com/repos/nkrinner/barclamp-updater/milestones{/number}","notifications_url":"https://api.github.com/repos/nkrinner/barclamp-updater/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nkrinner/barclamp-updater/labels{/name}","releases_url":"https://api.github.com/repos/nkrinner/barclamp-updater/releases{/id}","created_at":"2014-07-26T11:52:37Z","updated_at":"2014-06-30T11:43:24Z","pushed_at":"2015-11-27T12:52:52Z","git_url":"git://github.com/nkrinner/barclamp-updater.git","ssh_url":"git@github.com:nkrinner/barclamp-updater.git","clone_url":"https://github.com/nkrinner/barclamp-updater.git","svn_url":"https://github.com/nkrinner/barclamp-updater","homepage":"https://github.com/crowbar/crowbar","size":73,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"crowbar:release/tex/master","ref":"release/tex/master","sha":"64dab97c42f99c2c64c2fc0f2823146750607185","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":21348151,"name":"barclamp-updater","full_name":"crowbar/barclamp-updater","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/barclamp-updater","description":"Crowbar Updater: Update System Packages","fork":true,"url":"https://api.github.com/repos/crowbar/barclamp-updater","forks_url":"https://api.github.com/repos/crowbar/barclamp-updater/forks","keys_url":"https://api.github.com/repos/crowbar/barclamp-updater/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/barclamp-updater/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/barclamp-updater/teams","hooks_url":"https://api.github.com/repos/crowbar/barclamp-updater/hooks","issue_events_url":"https://api.github.com/repos/crowbar/barclamp-updater/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/barclamp-updater/events","assignees_url":"https://api.github.com/repos/crowbar/barclamp-updater/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/barclamp-updater/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/barclamp-updater/tags","blobs_url":"https://api.github.com/repos/crowbar/barclamp-updater/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/barclamp-updater/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/barclamp-updater/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/barclamp-updater/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/barclamp-updater/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/barclamp-updater/languages","stargazers_url":"https://api.github.com/repos/crowbar/barclamp-updater/stargazers","contributors_url":"https://api.github.com/repos/crowbar/barclamp-updater/contributors","subscribers_url":"https://api.github.com/repos/crowbar/barclamp-updater/subscribers","subscription_url":"https://api.github.com/repos/crowbar/barclamp-updater/subscription","commits_url":"https://api.github.com/repos/crowbar/barclamp-updater/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/barclamp-updater/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/barclamp-updater/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/barclamp-updater/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/barclamp-updater/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/barclamp-updater/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/barclamp-updater/merges","archive_url":"https://api.github.com/repos/crowbar/barclamp-updater/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/barclamp-updater/downloads","issues_url":"https://api.github.com/repos/crowbar/barclamp-updater/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/barclamp-updater/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/barclamp-updater/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/barclamp-updater/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/barclamp-updater/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/barclamp-updater/releases{/id}","created_at":"2014-06-30T10:58:15Z","updated_at":"2015-08-20T13:37:49Z","pushed_at":"2015-11-27T12:52:52Z","git_url":"git://github.com/crowbar/barclamp-updater.git","ssh_url":"git@github.com:crowbar/barclamp-updater.git","clone_url":"https://github.com/crowbar/barclamp-updater.git","svn_url":"https://github.com/crowbar/barclamp-updater","homepage":"https://github.com/crowbar/crowbar","size":253,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":1,"forks":10,"open_issues":1,"watchers":0,"default_branch":"release/tex/master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/11"},"html":{"href":"https://github.com/crowbar/barclamp-updater/pull/11"},"issue":{"href":"https://api.github.com/repos/crowbar/barclamp-updater/issues/11"},"comments":{"href":"https://api.github.com/repos/crowbar/barclamp-updater/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/barclamp-updater/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/barclamp-updater/statuses/31ddbf395af24228c61bc529281323979b62880c"}}}}