Pg-upgrade 9.6.11 -> 10.7

Hi All,

Hopefully this is an easy one. I am running gitlab-ce 11.11.0 currently and am working through upgrading it to the latest. At this stage I would like to upgrade postgresql from 9.6.11 -> 10.7. I am trying to run the gitlab-ctl pg-upgrade command but it keeps failing with the error below.

Creating temporary data directory:Error creating new directory: /var/opt/gitlab/postgresql/data.10
STDOUT:
STDERR: Password: su: incorrect password
Creating temporary data directory: NOT OK
== Fatal error ==

The command was run as root.

Does anyone have any ideas about how to fix this. It is a very basic install of omnibus with very little option select in the gitlab.rb file.

I don’t know if this needs to be run as another user at all.

Any help would be much appreciated.

Cheers,
Alan.

What Linux distribution do you run your GitLab CE on?
How did you become root?

Hi Grove,

It is a CentOS 6.10 server.

I have tried running sudo gitlab-ctl pg-upgrade as a user.
Also logging straight into the server as root and just running gitlab-ctl pg-upgrade.
Also logging in as a user and doing su - to switch to root and running gitlab-ctl pg-upgrade.

They all result in the same error.

Cheers,
Alan

Solved it,

Thanks Grove for the reply. You prompted me to look into something I had forgotten about. Our servers builds are done via kickstart scripts and we have a section to remove the ability of users to run the su command on our servers. Just did a bit of back peddling in the changes made by the script and ran the command again as a user and it worked first time.

One for me to remember for the future.

Cheers,
Alan.