Skip to content

Commit

Permalink
Merge branch 'master' into 16.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jubilee2 committed May 24, 2024
2 parents 94d476a + d13da8b commit f55a7a0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 53 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ RUN apt-get update -q \
busybox \
ca-certificates \
openssh-server \
wget \
tzdata \
wget \
libatomic1 \
perl \
&& rm -rf /var/lib/apt/lists/*
Expand Down
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PACKAGECLOUD_REPO=raspberry-pi2
RELEASE_PACKAGE=gitlab-ce
RELEASE_VERSION=16.3.7-ce.0
RELEASE_VERSION=16.6.0-ce.0
DOWNLOAD_URL=https://packages.gitlab.com/gitlab/${PACKAGECLOUD_REPO}/packages/raspbian/buster/${RELEASE_PACKAGE}_${RELEASE_VERSION}_armhf.deb/download.deb
2 changes: 0 additions & 2 deletions assets/update-permissions
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ if id -u gitlab-prometheus; then
chown_if_exists gitlab-prometheus /var/log/gitlab/prometheus
chown_if_exists -R gitlab-prometheus:gitlab-prometheus /var/opt/gitlab/alertmanager
chown_if_exists gitlab-prometheus /var/log/gitlab/alertmanager
chown_if_exists -R gitlab-prometheus:gitlab-prometheus /var/opt/gitlab/grafana
chown_if_exists gitlab-prometheus /var/log/gitlab/grafana
fi

# Fix redis storage and logs
Expand Down
51 changes: 2 additions & 49 deletions assets/wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function failed_pg_upgrade() {

function clean_stale_pids() {
# cleanup known pid/socket files
for x in /opt/gitlab/sv /run ; do
for x in /opt/gitlab/sv /run /var/opt/gitlab ; do
# find
# - any (s)ocket or regular (f)ile
# - by the name of "*.pid" or "socket.?"
Expand All @@ -44,38 +44,6 @@ function detect_unclean_start() {
set -e
}

# Make sure that there is no unmigrated data to hashed storage.
function unmigrated_data_check() {
set +e

echo "Checking for unmigrated data on legacy storage"
found=$(MAX_DATABASE_CONNECTION_CHECKS=5 gitlab-rake gitlab:storage:legacy_attachments gitlab:storage:legacy_projects 2>&1);

if [ $? -ne 0 ]; then
echo "Upgrade failed. Could not check for unmigrated data on legacy storage."
echo ""
echo $found
echo ""
echo ""
echo "If you would like to restart the instance without performing this"
echo "check, add the following to your docker command:"
echo "-e GITLAB_SKIP_UNMIGRATED_DATA_CHECK=true"
echo ""
exit 1
fi

if ! (echo $found | grep 'Found 0 attachments' && echo $found | grep 'Found 0 projects') > /dev/null 2>&1; then
echo
echo "Legacy storage is no longer supported. Please migrate your data to hashed storage."
echo "Check https://docs.gitlab.com/ee/administration/raketasks/storage.html#migrate-to-hashed-storage for details."
echo ""
echo "Upgrade failed. Retry the upgrade after migrating your data to hashed storage."
exit 1
fi

set -e
}

trap "sigterm_handler; exit" TERM

source /RELEASE
Expand Down Expand Up @@ -119,7 +87,7 @@ if old_version=$(cat /var/opt/gitlab/gitlab-rails/VERSION)
then
GITLAB_UPGRADE='true'
new_version=$(awk '/^gitlab-(ce|ee|jh)/ {print $NF}' /opt/gitlab/version-manifest.txt)
MIN_VERSION="15.11" gitlab-ctl upgrade-check "${old_version}" "${new_version}"
gitlab-ctl upgrade-check "${old_version}" "${new_version}"
fi

# Copy gitlab.rb for the first time
Expand Down Expand Up @@ -179,21 +147,6 @@ GITLAB_OMNIBUS_CONFIG= /opt/gitlab/embedded/bin/runsvdir-start &
echo "Configuring GitLab..."
gitlab-ctl reconfigure

# Skip unmigrated data check if Puma and Sidekiq is not running
if [ ! -d /opt/gitlab/service/puma ] && [ ! -d /opt/gitlab/service/sidekiq ]; then
echo
echo "This node does not appear to be running puma and/or sidekiq services"
echo "Skipping unmigrated data check, if you think this is an error exit now"
echo

GITLAB_SKIP_UNMIGRATED_DATA_CHECK='true'
fi

# Check if there are no unmigrated data to hashed storage if it is an upgrade
if [ "${GITLAB_UPGRADE}" == 'true' -a "${GITLAB_SKIP_UNMIGRATED_DATA_CHECK}" != 'true' ]; then
unmigrated_data_check
fi

# This must be false when the opt-in PostgreSQL version is the default for pg-upgrade,
# otherwise it must be true.
ATTEMPT_AUTO_PG_UPGRADE='false'
Expand Down

0 comments on commit f55a7a0

Please sign in to comment.