Skip to content
Snippets Groups Projects
Commit 12bd6baa authored by DJ Mountney's avatar DJ Mountney
Browse files

Merge branch '3485-gitlab-psql-default-database' into 'master'

Resolve "Fix gitlab-psql and gitlab-geo-psql to default to known database based in Omnibus config"

Closes #3485

See merge request gitlab-org/omnibus-gitlab!2491
parents 1c9d4c81 b34d7775
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -23,6 +23,7 @@ omnibus-gitlab repository.
- Bump rsync to 3.1.3 f539aa946
- Patch bzip2 against CVE-2016-3189 552730bfa
- Fix pgbouncer recipe to use the correct user for standalone instances
- Commands `gitlab-psql` and `gitlab-geo-psql` will use respective GitLab databases by default. #3485
 
10.7.3
 
Loading
Loading
Loading
Loading
@@ -54,7 +54,7 @@ else
privilege_drop="-u ${psql_user}"
fi
 
exec /opt/gitlab/embedded/bin/chpst ${privilege_drop} -U ${psql_user} /opt/gitlab/embedded/bin/psql -p ${psql_port} -h ${psql_host} "$@"
cd /tmp; exec /opt/gitlab/embedded/bin/chpst ${privilege_drop} -U ${psql_user} /opt/gitlab/embedded/bin/psql -p ${psql_port} -h ${psql_host} -d ${psql_dbname} "$@"
EOH
end
end
Loading
Loading
Loading
Loading
@@ -54,7 +54,7 @@ else
privilege_drop="-u ${psql_user}"
fi
 
exec /opt/gitlab/embedded/bin/chpst ${privilege_drop} -U ${psql_user} /opt/gitlab/embedded/bin/psql -p ${psql_port} -h ${psql_host} "$@"
cd /tmp; exec /opt/gitlab/embedded/bin/chpst ${privilege_drop} -U ${psql_user} /opt/gitlab/embedded/bin/psql -p ${psql_port} -h ${psql_host} -d ${psql_dbname} "$@"
EOH
end
end
Loading
Loading
Loading
Loading
@@ -101,15 +101,6 @@ least once. The `gitlab-psql` command cannot be used to connect to a
remote Postgres server, nor to connect to a local non-Omnibus Postgres
server.
 
If you start gitlab-psql from a directory that is not world-readable
(like /root) then `psql` will print a warning message:
```
could not change directory to "/root"
```
This is normal behavior and it can be ignored.
#### Starting a Postgres superuser psql session in Geo tracking database
 
Similar to the previous command, if you need superuser access to the bundled
Loading
Loading
psql_user='<%= node['gitlab']['postgresql']['username'] %>'
psql_host='<%= node['gitlab']['geo-postgresql']['unix_socket_directory'] %>'
psql_port='<%= node['gitlab']['geo-postgresql']['port'] %>'
psql_dbname='<%= node['gitlab']['geo-secondary']['db_database'] %>'
psql_user='<%= node['gitlab']['postgresql']['username'] %>'
psql_host='<%= node['gitlab']['postgresql']['unix_socket_directory'] %>'
psql_port='<%= node['gitlab']['postgresql']['port'] %>'
psql_dbname='<%= node['gitlab']['gitlab-rails']['db_database'] %>'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment