Commit e65a26a8 authored by Ben Prescott @bprescott_↙ ☺'s avatar Ben Prescott @bprescott_↙ ☺ Committed by Marcia Ramos

Rails dbconsole requires --database from 14.2, AWS S3 changes from 14.3

parent d7d41291
...@@ -723,17 +723,31 @@ If you disabled a secondary node, either with the [replication pause task](../in ...@@ -723,17 +723,31 @@ If you disabled a secondary node, either with the [replication pause task](../in
(13.2) or by using the user interface (13.1 and earlier), you must first (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. re-enable the node before you can continue. This is fixed in 13.4.
Run the following command, replacing `https://<secondary url>/` with the URL This can be fixed in the database.
for your secondary server, using either `http` or `https`, and ensuring that you
end the URL with a slash (`/`):
```shell 1. Start a database console:
sudo gitlab-rails dbconsole
UPDATE geo_nodes SET enabled = true WHERE url = 'https://<secondary url>/' AND enabled = false;" In [GitLab 14.2 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/341210):
```
```shell
sudo gitlab-rails dbconsole --database main
```
In GitLab 14.1 and earlier:
```shell
sudo gitlab-rails dbconsole
```
1. Run the following command, replacing `https://<secondary url>/` with the URL
for your secondary server. You can use either `http` or `https`, but ensure that you
end the URL with a slash (`/`):
```sql
UPDATE geo_nodes SET enabled = true WHERE url = 'https://<secondary url>/' AND enabled = false;"
```
This should update 1 row. This should update 1 row.
### Message: ``NoMethodError: undefined method `secondary?' for nil:NilClass`` ### Message: ``NoMethodError: undefined method `secondary?' for nil:NilClass``
......
...@@ -165,8 +165,16 @@ and they will assist you with any issues you are having. ...@@ -165,8 +165,16 @@ and they will assist you with any issues you are having.
- How to connect to a GitLab PostgreSQL database: - How to connect to a GitLab PostgreSQL database:
In GitLab 14.2 (chart 5.2) and later:
```shell
kubectl exec -it <task-runner-pod-name> -- /srv/gitlab/bin/rails dbconsole --include-password --database main
```
In GitLab 14.1 (chart 5.1) and earlier:
```shell ```shell
kubectl exec -it <task-runner-pod-name> -- /srv/gitlab/bin/rails dbconsole -p kubectl exec -it <task-runner-pod-name> -- /srv/gitlab/bin/rails dbconsole --include-password
``` ```
- How to get information about Helm installation status: - How to get information about Helm installation status:
......
...@@ -409,6 +409,8 @@ For Omnibus GitLab packages: ...@@ -409,6 +409,8 @@ For Omnibus GitLab packages:
##### S3 Encrypted Buckets ##### S3 Encrypted Buckets
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/64765) in GitLab 14.3.
AWS supports these [modes for server side encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/serv-side-encryption.html): AWS supports these [modes for server side encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/serv-side-encryption.html):
- Amazon S3-Managed Keys (SSE-S3) - Amazon S3-Managed Keys (SSE-S3)
...@@ -1377,18 +1379,30 @@ after which users must reactivate 2FA. ...@@ -1377,18 +1379,30 @@ after which users must reactivate 2FA.
1. Enter the database console: 1. Enter the database console:
For Omnibus GitLab packages: For Omnibus GitLab 14.1 and earlier:
```shell ```shell
sudo gitlab-rails dbconsole sudo gitlab-rails dbconsole
``` ```
For installations from source: For Omnibus GitLab 14.2 and later:
```shell
sudo gitlab-rails dbconsole --database main
```
For installations from source, GitLab 14.1 and earlier:
```shell ```shell
sudo -u git -H bundle exec rails dbconsole -e production sudo -u git -H bundle exec rails dbconsole -e production
``` ```
For installations from source, GitLab 14.2 and later:
```shell
sudo -u git -H bundle exec rails dbconsole -e production --database main
```
1. Examine the `ci_group_variables` and `ci_variables` tables: 1. Examine the `ci_group_variables` and `ci_variables` tables:
```sql ```sql
...@@ -1411,18 +1425,30 @@ You may need to reconfigure or restart GitLab for the changes to take effect. ...@@ -1411,18 +1425,30 @@ You may need to reconfigure or restart GitLab for the changes to take effect.
1. Enter the database console: 1. Enter the database console:
For Omnibus GitLab packages: For Omnibus GitLab 14.1 and earlier:
```shell ```shell
sudo gitlab-rails dbconsole sudo gitlab-rails dbconsole
``` ```
For installations from source: For Omnibus GitLab 14.2 and later:
```shell
sudo gitlab-rails dbconsole --database main
```
For installations from source, GitLab 14.1 and earlier:
```shell ```shell
sudo -u git -H bundle exec rails dbconsole -e production sudo -u git -H bundle exec rails dbconsole -e production
``` ```
For installations from source, GitLab 14.2 and later:
```shell
sudo -u git -H bundle exec rails dbconsole -e production --database main
```
1. Clear all tokens for projects, groups, and the entire instance: 1. Clear all tokens for projects, groups, and the entire instance:
WARNING: WARNING:
...@@ -1448,18 +1474,30 @@ You may need to reconfigure or restart GitLab for the changes to take effect. ...@@ -1448,18 +1474,30 @@ You may need to reconfigure or restart GitLab for the changes to take effect.
1. Enter the database console: 1. Enter the database console:
For Omnibus GitLab packages: For Omnibus GitLab 14.1 and earlier:
```shell ```shell
sudo gitlab-rails dbconsole sudo gitlab-rails dbconsole
``` ```
For installations from source: For Omnibus GitLab 14.2 and later:
```shell
sudo gitlab-rails dbconsole --database main
```
For installations from source, GitLab 14.1 and earlier:
```shell ```shell
sudo -u git -H bundle exec rails dbconsole -e production sudo -u git -H bundle exec rails dbconsole -e production
``` ```
For installations from source, GitLab 14.2 and later:
```shell
sudo -u git -H bundle exec rails dbconsole -e production --database main
```
1. Clear all the tokens for pending jobs: 1. Clear all the tokens for pending jobs:
```sql ```sql
...@@ -1480,18 +1518,30 @@ The fix is to truncate the `web_hooks` table: ...@@ -1480,18 +1518,30 @@ The fix is to truncate the `web_hooks` table:
1. Enter the database console: 1. Enter the database console:
For Omnibus GitLab packages: For Omnibus GitLab 14.1 and earlier:
```shell ```shell
sudo gitlab-rails dbconsole sudo gitlab-rails dbconsole
``` ```
For installations from source: For Omnibus GitLab 14.2 and later:
```shell
sudo gitlab-rails dbconsole --database main
```
For installations from source, GitLab 14.1 and earlier:
```shell ```shell
sudo -u git -H bundle exec rails dbconsole -e production sudo -u git -H bundle exec rails dbconsole -e production
``` ```
For installations from source, GitLab 14.2 and later:
```shell
sudo -u git -H bundle exec rails dbconsole -e production --database main
```
1. Truncate the table: 1. Truncate the table:
```sql ```sql
......
...@@ -262,21 +262,36 @@ unable to add the `commit_message_regex_change` column. ...@@ -262,21 +262,36 @@ unable to add the `commit_message_regex_change` column.
This results in the [backport migration of EE tables](https://gitlab.com/gitlab-org/gitlab/-/blob/cf00e431024018ddd82158f8a9210f113d0f4dbc/db/migrate/20190402150158_backport_enterprise_schema.rb#L1619) not working correctly. This results in the [backport migration of EE tables](https://gitlab.com/gitlab-org/gitlab/-/blob/cf00e431024018ddd82158f8a9210f113d0f4dbc/db/migrate/20190402150158_backport_enterprise_schema.rb#L1619) not working correctly.
The backport migration assumes that certain tables in the database do not exist when running CE. The backport migration assumes that certain tables in the database do not exist when running CE.
To fix this issue, manually add the missing `commit_message_negative_regex` column and restart GitLab: To fix this issue:
```shell 1. Start a database console:
# Access psql
sudo gitlab-rails dbconsole
# Add the missing column In GitLab 14.2 and later:
ALTER TABLE push_rules ADD COLUMN commit_message_negative_regex VARCHAR;
# Exit psql ```shell
\q sudo gitlab-rails dbconsole --database main
```
# Restart GitLab In GitLab 14.1 and earlier:
sudo gitlab-ctl restart
``` ```shell
sudo gitlab-rails dbconsole
```
1. Manually add the missing `commit_message_negative_regex` column:
```sql
ALTER TABLE push_rules ADD COLUMN commit_message_negative_regex VARCHAR;
# Exit psql
\q
```
1. Restart GitLab:
```shell
sudo gitlab-ctl restart
```
### Error `Failed to connect to the internal GitLab API` on a separate GitLab Pages server ### Error `Failed to connect to the internal GitLab API` on a separate GitLab Pages server
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment