Skip to content

gitlab init: postgres unused client(s) uninstall fails #3065

Open
@xaviersand

Description

@xaviersand

Hi,

i could successfully run a gitlab selfhosted on my local computer.
when i try to run the docker-compose.yml on my proxmox 8.1 hypervisor. (i have a LXC contain running other docker containers)
I encounter this error in the gitlab container.

gitlab-1         | 15 postgresql:5432 gitlabhq_production
gitlab-1         | + gitlab_uninstall_unused_database_client
gitlab-1         | + [[ -f /home/git/.postgresqlrc ]]
gitlab-1         | ++ awk '/^[^#]/ {printf("\|-%s",$1)}' /home/git/.postgresqlrc
gitlab-1         | + DB_CLIENT_VERSIONS_IN_USE='\|-15'
gitlab-1         | + REGEX_DB_CLIENT_VERSIONS_IN_USE='-common\|-15'
gitlab-1         | ++ grep -v -e '-common\|-15'
gitlab-1         | ++ apt-cache pkgnames postgresql-client
gitlab-1         | + UNUSED_DB_CLIENTS='postgresql-client-13
gitlab-1         | postgresql-client-14
gitlab-1         | postgresql-client-16
gitlab-1         | postgresql-client-17'
gitlab-1         | + [[ postgresql-client-13
gitlab-1         | postgresql-client-14
gitlab-1         | postgresql-client-16
gitlab-1         | postgresql-client-17 == '' ]]
gitlab-1         | ++ echo postgresql-client-13 postgresql-client-14 postgresql-client-16 postgresql-client-17
gitlab-1         | ++ tr '\n' ' '
gitlab-1         | + UNUSED_DB_CLIENTS='postgresql-client-13 postgresql-client-14 postgresql-client-16 postgresql-client-17 '
gitlab-1         | + echo '- Uninstalling unused client(s): postgresql-client-13 postgresql-client-14 postgresql-client-16 postgresql-client-17 '
gitlab-1         | + DEBIAN_FRONTEND=noninteractive
gitlab-1         | + apt-get -qq -y purge -- postgresql-client-13 postgresql-client-14 postgresql-client-16 postgresql-client-17
gitlab-1         | - Uninstalling unused client(s): postgresql-client-13 postgresql-client-14 postgresql-client-16 postgresql-client-17
gitlab-1         | E: Sub-process /usr/bin/dpkg returned an error code (1)

I started the gitlab container with a bash console and tried to delete these to have a better error message:

(Reading database ... 22245 files and directories currently installed.)
Removing postgresql-contrib (17+267.pgdg22.04+1) ...
dpkg: error processing package postgresql-contrib (--remove):
 cannot remove '/usr/share/doc/postgresql-contrib': Invalid argument
dpkg: too many errors, stopping
Errors were encountered while processing:
 postgresql-contrib
Processing was halted because there were too many errors.

it looks like it's trying to delete '/usr/share/doc/postgresql-contrib' , i don't know if it should or not (i'm not a postgres expert), but i can't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions