Commit 7c4db532ff246a9831a5decaaf031affeb1eb21d
Exists in
master
and in
4 other branches
Merge branch '6_0_update_troubleshooting' of /home/git/repositories/gitlab/gitlabhq
Showing
1 changed file
with
18 additions
and
0 deletions
Show diff stats
doc/update/5.4-to-6.0.md
@@ -111,3 +111,21 @@ To make sure you didn't miss anything run a more thorough check with: | @@ -111,3 +111,21 @@ To make sure you didn't miss anything run a more thorough check with: | ||
111 | sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | 111 | sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production |
112 | 112 | ||
113 | If all items are green, then congratulations upgrade complete! | 113 | If all items are green, then congratulations upgrade complete! |
114 | + | ||
115 | +### Troubleshooting | ||
116 | +The migrations in this update are very sensitive to incomplete or inconsistent data. If you have a long-running GitLab installation and some of the previous upgrades did not work out 100% correct this may bite you now. The following commands can be run in the rails console to look for 'bad' data. | ||
117 | + | ||
118 | +All project owners should have an owner | ||
119 | +``` | ||
120 | +Project.all.select { |project| project.owner.blank? } | ||
121 | +``` | ||
122 | + | ||
123 | +Every user should have a namespace | ||
124 | +``` | ||
125 | +User.all.select { |u| u.namespace.blank? } | ||
126 | +``` | ||
127 | + | ||
128 | +Projects in the global namespace should not conflict with projects in the owner namespace | ||
129 | +``` | ||
130 | +Project.where(namespace_id: nil).select { |p| Project.where(path: p.path, namespace_id: p.owner.try(:namespace).try(:id)).present? } | ||
131 | +``` |