summaryrefslogtreecommitdiff
path: root/doc/administration/troubleshooting
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-19 09:08:42 +0000
commitb76ae638462ab0f673e5915986070518dd3f9ad3 (patch)
treebdab0533383b52873be0ec0eb4d3c66598ff8b91 /doc/administration/troubleshooting
parent434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff)
downloadgitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'doc/administration/troubleshooting')
-rw-r--r--doc/administration/troubleshooting/debug.md6
-rw-r--r--doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md23
-rw-r--r--doc/administration/troubleshooting/kubernetes_cheat_sheet.md2
-rw-r--r--doc/administration/troubleshooting/log_parsing.md2
-rw-r--r--doc/administration/troubleshooting/navigating_gitlab_via_rails_console.md2
-rw-r--r--doc/administration/troubleshooting/ssl.md2
6 files changed, 26 insertions, 11 deletions
diff --git a/doc/administration/troubleshooting/debug.md b/doc/administration/troubleshooting/debug.md
index 031f44b1f9f..aea891b8a77 100644
--- a/doc/administration/troubleshooting/debug.md
+++ b/doc/administration/troubleshooting/debug.md
@@ -45,7 +45,7 @@ session by running:
ActiveRecord::Base.connection.execute('SET statement_timeout TO 0')
```
-Note that this change only affects the current Rails console session and will
+This change only affects the current Rails console session and will
not be persisted in the GitLab production environment or in the next Rails
console session.
@@ -213,7 +213,7 @@ downtime. Otherwise skip to the next section.
exit
```
-Note that if the Puma process terminates before you are able to run these
+If the Puma process terminates before you are able to run these
commands, GDB will report an error. To buy more time, you can always raise the
Puma worker timeout. For omnibus users, you can edit `/etc/gitlab/gitlab.rb` and
increase it from 60 seconds to 600:
@@ -285,5 +285,5 @@ The output in `/tmp/puma.txt` may help diagnose the root cause.
## More information
-- [Debugging Stuck Ruby Processes](https://newrelic.com/blog/engineering/debugging-stuck-ruby-processes-what-to-do-before-you-kill-9/)
+- [Debugging Stuck Ruby Processes](https://newrelic.com/blog/best-practices/debugging-stuck-ruby-processes-what-to-do-before-you-kill-9)
- [Cheat sheet of using GDB and Ruby processes](gdb-stuck-ruby.txt)
diff --git a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
index 08755dd3285..c55efe78216 100644
--- a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
+++ b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
@@ -16,13 +16,13 @@ and your [support options](https://about.gitlab.com/support/), before attempting
this information.
WARNING:
-Please note that some of these scripts could be damaging if not run correctly,
+Some of these scripts could be damaging if not run correctly,
or under the right conditions. We highly recommend running them under the
guidance of a Support Engineer, or running them in a test environment with a
backup of the instance ready to be restored, just in case.
WARNING:
-Please also note that as GitLab changes, changes to the code are inevitable,
+As GitLab changes, changes to the code are inevitable,
and so some scripts may not work as they once used to. These are not kept
up-to-date as these scripts/commands were added as they were found/needed. As
mentioned above, we recommend running these scripts under the supervision of a
@@ -466,7 +466,7 @@ sudo gitlab-rake cache:clear
### Export a repository
-It's typically recommended to export a project through [the web interface](../../user/project/settings/import_export.md#exporting-a-project-and-its-data) or through [the API](../../api/project_import_export.md). In situations where this is not working as expected, it may be preferable to export a project directly via the Rails console:
+It's typically recommended to export a project through [the web interface](../../user/project/settings/import_export.md#export-a-project-and-its-data) or through [the API](../../api/project_import_export.md). In situations where this is not working as expected, it may be preferable to export a project directly via the Rails console:
```ruby
user = User.find_by_username('USERNAME')
@@ -554,13 +554,28 @@ end
## Users
+### Create new user
+
+```ruby
+u = User.new(username: 'test_user', email: 'test@example.com', name: 'Test User', password: 'password', password_confirmation: 'password')
+u.skip_confirmation! # Use it only if you wish user to be automatically confirmed. If skipped, user will recieve confirmation e-mail
+u.save!
+```
+
### Skip reconfirmation
```ruby
-user = User.find_by_username '<username>'
+user = User.find_by_username('<username>')
user.skip_reconfirmation!
```
+### Disable 2fa for single user
+
+```ruby
+user = User.find_by_username('<username>')
+user.disable_two_factor!
+```
+
### Active users & Historical users
```ruby
diff --git a/doc/administration/troubleshooting/kubernetes_cheat_sheet.md b/doc/administration/troubleshooting/kubernetes_cheat_sheet.md
index bb0287df596..abeba514e4b 100644
--- a/doc/administration/troubleshooting/kubernetes_cheat_sheet.md
+++ b/doc/administration/troubleshooting/kubernetes_cheat_sheet.md
@@ -135,7 +135,7 @@ and they will assist you with any issues you are having.
# source-style commands should also work
cd /srv/gitlab && bundle exec rake gitlab:check RAILS_ENV=production
- # run GitLab check. Note that the output can be confusing and invalid because of the specific structure of GitLab installed via helm chart
+ # run GitLab check. The output can be confusing and invalid because of the specific structure of GitLab installed via helm chart
/usr/local/bin/gitlab-rake gitlab:check
# open console without entering pod
diff --git a/doc/administration/troubleshooting/log_parsing.md b/doc/administration/troubleshooting/log_parsing.md
index c16302dd251..0a73c61ae94 100644
--- a/doc/administration/troubleshooting/log_parsing.md
+++ b/doc/administration/troubleshooting/log_parsing.md
@@ -60,7 +60,7 @@ zcat some_json.log.25.gz | (head -1; tail -1) | jq '.time'
#### Find all requests with a 5XX status code
```shell
-jq 'select(status >= 500)' <FILE>
+jq 'select(.status >= 500)' <FILE>
```
#### Top 10 slowest requests
diff --git a/doc/administration/troubleshooting/navigating_gitlab_via_rails_console.md b/doc/administration/troubleshooting/navigating_gitlab_via_rails_console.md
index e55118d7309..57d64a2323e 100644
--- a/doc/administration/troubleshooting/navigating_gitlab_via_rails_console.md
+++ b/doc/administration/troubleshooting/navigating_gitlab_via_rails_console.md
@@ -265,7 +265,7 @@ user.save!(validate: false)
This is not recommended, as validations are usually put in place to ensure the
integrity and consistency of user-provided data.
-Note that a validation error will prevent the entire object from being saved to
+A validation error will prevent the entire object from being saved to
the database. We'll see a little of this in the next section. If you're getting
a mysterious red banner in the GitLab UI when submitting a form, this can often
be the fastest way to get to the root of the problem.
diff --git a/doc/administration/troubleshooting/ssl.md b/doc/administration/troubleshooting/ssl.md
index 5ce4c7f0fb2..80be30a6509 100644
--- a/doc/administration/troubleshooting/ssl.md
+++ b/doc/administration/troubleshooting/ssl.md
@@ -199,7 +199,7 @@ To fix this problem:
git config --global http.sslCAInfo ~/.ssl/gitlab.domain.tld.crt
```
- - Disable SSL verification in your Git client. Note that this intended as a
+ - Disable SSL verification in your Git client. This is intended as a
temporary measure, as it could be considered a security risk.
```shell