Upgade Gitlab version from 13.4.3 to 13.7.6

Hi there
this is my first post, sorry if this place is incorrect I am just trying to learn and ask for help.

I am trying to upgrade my gitlab version from 13.4.3 to 13.7.6 I am using the following command
sudo rpm -Uvh gitlab-ee-13.7.6-ee.0.el7.x86_64.rpm

I am using Centos 7

Everything went well except at the end, I am receiving this:

> There was an error running gitlab-ctl reconfigure:
*> *
> Multiple failures occurred:
> * Mixlib::ShellOut::ShellCommandFailed occurred in Chef Infra Client run: execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-13.5.0-gitlab-shell.pp] (gitlab::selinux line 32) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
> ---- Begin output of semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-13.5.0-gitlab-shell.pp ----
> STDOUT:
> STDERR: libsemanage.semanage_pipe_data: Child process /usr/libexec/selinux/hll/pp failed with code: 255. (No such file or directory).
> gitlab-13.5.0-gitlab-shell: libsepol.policydb_read: policydb module version 19 does not match my version range 4-17
> gitlab-13.5.0-gitlab-shell: libsepol.sepol_module_package_read: invalid module in module package (at section 0)
> gitlab-13.5.0-gitlab-shell: Failed to read policy package
> libsemanage.semanage_direct_commit: Failed to compile hll files into cil files.
> (No such file or directory).
> semodule: Failed!
> ---- End output of semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-13.5.0-gitlab-shell.pp ----
> Ran semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-13.5.0-gitlab-shell.pp returned 1
> * Mixlib::ShellOut::ShellCommandFailed occurred in delayed notification: bash[Set proper security context on ssh files for selinux] (gitlab::selinux line 40) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
> ---- Begin output of “bash” “/tmp/chef-script20210204-25747-19b2by5” ----
> STDOUT:
> STDERR: ValueError: Type gitlab_shell_t is invalid, must be a file or device type
> ValueError: Type gitlab_shell_t is invalid, must be a file or device type
> ValueError: Type gitlab_shell_t is invalid, must be a file or device type
> ValueError: Type gitlab_shell_t is invalid, must be a file or device type
> ValueError: Type gitlab_shell_t is invalid, must be a file or device type
> ---- End output of “bash” “/tmp/chef-script20210204-25747-19b2by5” ----
> Ran “bash” “/tmp/chef-script20210204-25747-19b2by5” returned 1
*> *
*> *
> Running handlers complete
> Chef Infra Client failed. 19 resources updated in 01 minutes 57 seconds
> ===
> There was an error running gitlab-ctl reconfigure. Please check the output above for more
> details.
> ===

seems like Gitlab is installed because I can access to the page but I am receiving that error about gitlab-ctl reconfigure

libsemanage-static libsemanage-devel policycoreutils are updated

can somebody help me please? thanks a lot!!!

Hi @MVII3IV , welcome to the GitLab Community Forum!

This snippet in the error message

libsepol.policydb_read: policydb module version 19 does not match my version range 4-17

indicates some problem with system dependencies.

This could be the result of an outdated incompatible version of a dependency, as was the case in this issue:

As you noted libsemanage and policycoreutils are updated, I suspect a selinux package may be outdated.

Are there any updates available for selinux-policy, libselinux, or libsepol-* on this system?

If updates are available, please update these packages, run gitlab-ctl reconfigure, and let us know if this fixed the problem.

If update are not available, can you verify what minor version of CentOS 7 you’re running? (7.x)

Thanks!

Hi @gitlab-greg
I have updated selinux-policy , libselinux , or libsepol-* as you told me, the error changed a little bit, this is the output:

There was an error running gitlab-ctl reconfigure:

execute[semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-13.5.0-gitlab-shell.pp] (gitlab::selinux line 32) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-13.5.0-gitlab-shell.pp ----
STDOUT:
STDERR: libsemanage.semanage_pipe_data: Child process /usr/libexec/selinux/hll/pp failed with code: 255. (No such file or directory).
gitlab-13.5.0-gitlab-shell: libsepol.policydb_read: policydb module version 19 does not match my version range 4-17
gitlab-13.5.0-gitlab-shell: libsepol.sepol_module_package_read: invalid module in module package (at section 0)
gitlab-13.5.0-gitlab-shell: Failed to read policy package
libsemanage.semanage_direct_commit: Failed to compile hll files into cil files.
(No such file or directory).
semodule: Failed!
---- End output of semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-13.5.0-gitlab-shell.pp ----
Ran semodule -i /opt/gitlab/embedded/selinux/rhel/7/gitlab-13.5.0-gitlab-shell.pp returned 1

probably this information can help!
System Info:
------------
chef_version=15.14.0
platform=redhat
platform_version=7.3
ruby=ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
program_name=/opt/gitlab/embedded/bin/chef-client
executable=/opt/gitlab/embedded/bin/chef-client

thanks a lot for your help

Thanks for clarifying.

I think in your case that upgrading CentOS’s minor version to 7.4 or newer would resolve this issue.

1 Like

Thanks for your help @gitlab-greg, I will discuss this with my team, thanks a lot for your time!

2 Likes