{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments/52612470","id":52612470,"diff_hunk":"@@ -60,6 +60,52 @@\n   only_if { !ha_enabled || CrowbarPacemakerHelper.is_cluster_founder?(node) }\n end\n \n+# if we're upgrading from juno, we first need to upgrade to the kilo state,\n+# then run nova-manage db migrate_flavor_data and after that, run the rest\n+# of the db migrations.\n+db_version_cmd = \"nova-manage db version\"\n+last_juno_migration = 254\n+last_kilo_migration = 290\n+\n+execute \"nova-manage db sync (kilo migrations)\" do\n+  user node[:nova][:user]\n+  group node[:nova][:group]\n+  command \"nova-manage db sync --version #{last_kilo_migration}\"\n+  action :run\n+  # We only do the sync the first time, and only if we're not doing HA or if we\n+  # are the founder of the HA cluster (so that it's really only done once).\n+  only_if do\n+    if !node[:nova][:db_synced] &&\n+        (!node[:nova][:ha][:enabled] || CrowbarPacemakerHelper.is_cluster_founder?(node))\n+      cmd = Mixlib::ShellOut.new(db_version_cmd,\n+                                 user: node[:nova][:user],\n+                                 group: node[:nova][:group] )","path":"chef/cookbooks/nova/recipes/database.rb","position":23,"original_position":23,"commit_id":"2b13aecc91fb298c8a247378b66fc236916183c2","original_commit_id":"2b13aecc91fb298c8a247378b66fc236916183c2","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Style/SpaceInsideParens: Space inside parentheses detected. (https://github.com/bbatsov/ruby-style-guide#no-spaces-braces)","created_at":"2016-02-11T15:04:36Z","updated_at":"2016-02-11T15:04:36Z","html_url":"https://github.com/crowbar/crowbar-openstack/pull/276#discussion_r52612470","pull_request_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/276","_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments/52612470"},"html":{"href":"https://github.com/crowbar/crowbar-openstack/pull/276#discussion_r52612470"},"pull_request":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/276"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/276","id":58941756,"html_url":"https://github.com/crowbar/crowbar-openstack/pull/276","diff_url":"https://github.com/crowbar/crowbar-openstack/pull/276.diff","patch_url":"https://github.com/crowbar/crowbar-openstack/pull/276.patch","issue_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/276","number":276,"state":"open","locked":false,"title":"Run flavor migration tool when upgrading from juno","user":{"login":"rhafer","id":373399,"avatar_url":"https://avatars.githubusercontent.com/u/373399?v=3","gravatar_id":"","url":"https://api.github.com/users/rhafer","html_url":"https://github.com/rhafer","followers_url":"https://api.github.com/users/rhafer/followers","following_url":"https://api.github.com/users/rhafer/following{/other_user}","gists_url":"https://api.github.com/users/rhafer/gists{/gist_id}","starred_url":"https://api.github.com/users/rhafer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhafer/subscriptions","organizations_url":"https://api.github.com/users/rhafer/orgs","repos_url":"https://api.github.com/users/rhafer/repos","events_url":"https://api.github.com/users/rhafer/events{/privacy}","received_events_url":"https://api.github.com/users/rhafer/received_events","type":"User","site_admin":false},"body":"When upgrading from juno to kilo, after running the db migrations the flavor\r\ninformation for instance had be migrated using the \"nova-manage db\r\nmigrate_flavor_data\" tool. As we're upgrading directly from juno to liberty we\r\nneed execute this step else. Because of this the actually db migration step is\r\nnow split into three steps:\r\n1. Run db migrations up to kilo\r\n2. run flavor migration tool\r\n3. Run the rest of the db migrations\r\n\r\nTo have this working a patched nova is needed (migrate_flavor_data forward\r\nported from kilo to juno).","created_at":"2016-02-10T19:37:50Z","updated_at":"2016-02-11T15:04:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"441e0090b1f126e3addead50f9eaf3f9de774b18","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/276/commits","review_comments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/276/comments","review_comment_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/276/comments","statuses_url":"https://api.github.com/repos/crowbar/crowbar-openstack/statuses/2b13aecc91fb298c8a247378b66fc236916183c2","head":{"label":"rhafer:nova-flavor-migrate","ref":"nova-flavor-migrate","sha":"2b13aecc91fb298c8a247378b66fc236916183c2","user":{"login":"rhafer","id":373399,"avatar_url":"https://avatars.githubusercontent.com/u/373399?v=3","gravatar_id":"","url":"https://api.github.com/users/rhafer","html_url":"https://github.com/rhafer","followers_url":"https://api.github.com/users/rhafer/followers","following_url":"https://api.github.com/users/rhafer/following{/other_user}","gists_url":"https://api.github.com/users/rhafer/gists{/gist_id}","starred_url":"https://api.github.com/users/rhafer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhafer/subscriptions","organizations_url":"https://api.github.com/users/rhafer/orgs","repos_url":"https://api.github.com/users/rhafer/repos","events_url":"https://api.github.com/users/rhafer/events{/privacy}","received_events_url":"https://api.github.com/users/rhafer/received_events","type":"User","site_admin":false},"repo":{"id":41904088,"name":"crowbar-openstack","full_name":"rhafer/crowbar-openstack","owner":{"login":"rhafer","id":373399,"avatar_url":"https://avatars.githubusercontent.com/u/373399?v=3","gravatar_id":"","url":"https://api.github.com/users/rhafer","html_url":"https://github.com/rhafer","followers_url":"https://api.github.com/users/rhafer/followers","following_url":"https://api.github.com/users/rhafer/following{/other_user}","gists_url":"https://api.github.com/users/rhafer/gists{/gist_id}","starred_url":"https://api.github.com/users/rhafer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhafer/subscriptions","organizations_url":"https://api.github.com/users/rhafer/orgs","repos_url":"https://api.github.com/users/rhafer/repos","events_url":"https://api.github.com/users/rhafer/events{/privacy}","received_events_url":"https://api.github.com/users/rhafer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rhafer/crowbar-openstack","description":"Openstack deployment for Crowbar","fork":true,"url":"https://api.github.com/repos/rhafer/crowbar-openstack","forks_url":"https://api.github.com/repos/rhafer/crowbar-openstack/forks","keys_url":"https://api.github.com/repos/rhafer/crowbar-openstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhafer/crowbar-openstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhafer/crowbar-openstack/teams","hooks_url":"https://api.github.com/repos/rhafer/crowbar-openstack/hooks","issue_events_url":"https://api.github.com/repos/rhafer/crowbar-openstack/issues/events{/number}","events_url":"https://api.github.com/repos/rhafer/crowbar-openstack/events","assignees_url":"https://api.github.com/repos/rhafer/crowbar-openstack/assignees{/user}","branches_url":"https://api.github.com/repos/rhafer/crowbar-openstack/branches{/branch}","tags_url":"https://api.github.com/repos/rhafer/crowbar-openstack/tags","blobs_url":"https://api.github.com/repos/rhafer/crowbar-openstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhafer/crowbar-openstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhafer/crowbar-openstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhafer/crowbar-openstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhafer/crowbar-openstack/statuses/{sha}","languages_url":"https://api.github.com/repos/rhafer/crowbar-openstack/languages","stargazers_url":"https://api.github.com/repos/rhafer/crowbar-openstack/stargazers","contributors_url":"https://api.github.com/repos/rhafer/crowbar-openstack/contributors","subscribers_url":"https://api.github.com/repos/rhafer/crowbar-openstack/subscribers","subscription_url":"https://api.github.com/repos/rhafer/crowbar-openstack/subscription","commits_url":"https://api.github.com/repos/rhafer/crowbar-openstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhafer/crowbar-openstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhafer/crowbar-openstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhafer/crowbar-openstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhafer/crowbar-openstack/contents/{+path}","compare_url":"https://api.github.com/repos/rhafer/crowbar-openstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhafer/crowbar-openstack/merges","archive_url":"https://api.github.com/repos/rhafer/crowbar-openstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhafer/crowbar-openstack/downloads","issues_url":"https://api.github.com/repos/rhafer/crowbar-openstack/issues{/number}","pulls_url":"https://api.github.com/repos/rhafer/crowbar-openstack/pulls{/number}","milestones_url":"https://api.github.com/repos/rhafer/crowbar-openstack/milestones{/number}","notifications_url":"https://api.github.com/repos/rhafer/crowbar-openstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhafer/crowbar-openstack/labels{/name}","releases_url":"https://api.github.com/repos/rhafer/crowbar-openstack/releases{/id}","deployments_url":"https://api.github.com/repos/rhafer/crowbar-openstack/deployments","created_at":"2015-09-04T07:52:08Z","updated_at":"2015-09-04T07:52:09Z","pushed_at":"2016-02-11T15:04:30Z","git_url":"git://github.com/rhafer/crowbar-openstack.git","ssh_url":"git@github.com:rhafer/crowbar-openstack.git","clone_url":"https://github.com/rhafer/crowbar-openstack.git","svn_url":"https://github.com/rhafer/crowbar-openstack","homepage":null,"size":16283,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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:master","ref":"master","sha":"4d6d6bd314fc27b62ad65ebd466430b2ac4b94c4","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":39006903,"name":"crowbar-openstack","full_name":"crowbar/crowbar-openstack","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/crowbar-openstack","description":"Openstack deployment for Crowbar","fork":false,"url":"https://api.github.com/repos/crowbar/crowbar-openstack","forks_url":"https://api.github.com/repos/crowbar/crowbar-openstack/forks","keys_url":"https://api.github.com/repos/crowbar/crowbar-openstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/crowbar-openstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/crowbar-openstack/teams","hooks_url":"https://api.github.com/repos/crowbar/crowbar-openstack/hooks","issue_events_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/crowbar-openstack/events","assignees_url":"https://api.github.com/repos/crowbar/crowbar-openstack/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/crowbar-openstack/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/crowbar-openstack/tags","blobs_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/crowbar-openstack/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/crowbar-openstack/languages","stargazers_url":"https://api.github.com/repos/crowbar/crowbar-openstack/stargazers","contributors_url":"https://api.github.com/repos/crowbar/crowbar-openstack/contributors","subscribers_url":"https://api.github.com/repos/crowbar/crowbar-openstack/subscribers","subscription_url":"https://api.github.com/repos/crowbar/crowbar-openstack/subscription","commits_url":"https://api.github.com/repos/crowbar/crowbar-openstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/crowbar-openstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/crowbar-openstack/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/crowbar-openstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/crowbar-openstack/merges","archive_url":"https://api.github.com/repos/crowbar/crowbar-openstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/crowbar-openstack/downloads","issues_url":"https://api.github.com/repos/crowbar/crowbar-openstack/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/crowbar-openstack/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/crowbar-openstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/crowbar-openstack/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/crowbar-openstack/releases{/id}","deployments_url":"https://api.github.com/repos/crowbar/crowbar-openstack/deployments","created_at":"2015-07-13T10:55:33Z","updated_at":"2016-01-11T12:29:07Z","pushed_at":"2016-02-11T15:04:31Z","git_url":"git://github.com/crowbar/crowbar-openstack.git","ssh_url":"git@github.com:crowbar/crowbar-openstack.git","clone_url":"https://github.com/crowbar/crowbar-openstack.git","svn_url":"https://github.com/crowbar/crowbar-openstack","homepage":null,"size":16575,"stargazers_count":2,"watchers_count":2,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":22,"forks":21,"open_issues":22,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/276"},"html":{"href":"https://github.com/crowbar/crowbar-openstack/pull/276"},"issue":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/276"},"comments":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/issues/276/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/276/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/pulls/276/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/crowbar-openstack/statuses/2b13aecc91fb298c8a247378b66fc236916183c2"}}}}