summaryrefslogtreecommitdiff
path: root/doc/administration/geo/replication/troubleshooting.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/administration/geo/replication/troubleshooting.md')
-rw-r--r--doc/administration/geo/replication/troubleshooting.md57
1 files changed, 19 insertions, 38 deletions
diff --git a/doc/administration/geo/replication/troubleshooting.md b/doc/administration/geo/replication/troubleshooting.md
index f6d6f39fb19..b62c5c6f460 100644
--- a/doc/administration/geo/replication/troubleshooting.md
+++ b/doc/administration/geo/replication/troubleshooting.md
@@ -386,6 +386,15 @@ This happens when you have added IP addresses without a subnet mask in `postgres
To fix this, add the subnet mask in `/etc/gitlab/gitlab.rb` under `postgresql['md5_auth_cidr_addresses']`
to respect the CIDR format (i.e. `1.2.3.4/32`).
+### Message: `Found data in the gitlabhq_production database!` when running `gitlab-ctl replicate-geo-database`
+
+This happens if data is detected in the `projects` table. When one or more projects are detected, the operation
+is aborted to prevent accidental data loss. To bypass this message, pass the `--force` option to the command.
+
+In GitLab 13.4, a seed project is added when GitLab is first installed. This makes it necessary to pass `--force` even
+on a new Geo secondary node. There is an [issue to account for seed projects](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5618)
+when checking the database.
+
### Very large repositories never successfully synchronize on the **secondary** node
GitLab places a timeout on all repository clones, including project imports
@@ -483,8 +492,8 @@ to start again from scratch, there are a few steps that can help you:
gitlab-ctl start geo-postgresql
```
- Reconfigure in order to recreate the folders and make sure permissions and ownership
- are correctly
+ Reconfigure to recreate the folders and make sure permissions and ownership
+ are correct:
```shell
gitlab-ctl reconfigure
@@ -605,46 +614,18 @@ or `gitlab-ctl promote-to-primary-node`, either:
### Message: ActiveRecord::RecordInvalid: Validation failed: Enabled Geo primary node cannot be disabled
-This error may occur if you have paused replication from the original primary node before attempting to promote this node.
-To double check this, you can do the following:
-
-- Get the current secondary node's ID using:
-
- ```shell
- sudo gitlab-rails runner 'puts GeoNode.current_node.id'
- ```
-
-- Double check that the node is active through the database by running the following
- on the secondary node, replacing `ID_FROM_ABOVE`:
-
- ```shell
- sudo gitlab-rails dbconsole
-
- SELECT enabled FROM geo_nodes WHERE id = ID_FROM_ABOVE;
- ```
-
-- If the above returned `f` it means that the replication was paused.
- You can re-enable it through an `UPDATE` statement in the database:
-
- ```shell
- sudo gitlab-rails dbconsole
-
- UPDATE geo_nodes SET enabled = 't' WHERE id = ID_FROM_ABOVE;
- ```
-
-### While Promoting the secondary, I got an error `ActiveRecord::RecordInvalid`
-
If you disabled a secondary node, either with the [replication pause task](../index.md#pausing-and-resuming-replication)
-(13.2) or via the UI (13.1 and earlier), you must first re-enable the
-node before you can continue. This is fixed in 13.4.
+(13.2) or by using the user interface (13.1 and earlier), you must first
+re-enable the node before you can continue. This is fixed in 13.4.
-From `gitlab-psql`, execute the following, replacing `<your secondary url>`
-with the URL for your secondary server starting with `http` or `https` and ending with a `/`.
+Run the following command, replacing `https://<secondary url>/` with the URL
+for your secondary server, using either `http` or `https`, and ensuring that you
+end the URL with a slash (`/`):
```shell
-SECONDARY_URL="https://<secondary url>/"
-DATABASE_NAME="gitlabhq_production"
-sudo gitlab-psql -d "$DATABASE_NAME" -c "UPDATE geo_nodes SET enabled = true WHERE url = '$SECONDARY_URL';"
+sudo gitlab-rails dbconsole
+
+UPDATE geo_nodes SET enabled = true WHERE url = 'https://<secondary url>/' AND enabled = false;"
```
This should update 1 row.