@@ -19,7 +19,7 @@ function failed_pg_upgrade() {
19
19
20
20
function clean_stale_pids() {
21
21
# cleanup known pid/socket files
22
- for x in /opt/gitlab/sv /run $( ls -d /tmp/gitaly-ruby * 2> /dev/null ) ; do
22
+ for x in /opt/gitlab/sv /run ; do
23
23
# find
24
24
# - any (s)ocket or regular (f)ile
25
25
# - by the name of "*.pid" or "socket.?"
@@ -54,7 +54,7 @@ function unmigrated_data_check() {
54
54
if [ $? -ne 0 ]; then
55
55
echo " Upgrade failed. Could not check for unmigrated data on legacy storage."
56
56
echo " "
57
- echo $output
57
+ echo $found
58
58
echo " "
59
59
echo " "
60
60
echo " If you would like to restart the instance without performing this"
@@ -112,7 +112,7 @@ if old_version=$(cat /var/opt/gitlab/gitlab-rails/VERSION)
112
112
then
113
113
GITLAB_UPGRADE=' true'
114
114
new_version=$( awk ' /^gitlab-(ce|ee|jh)/ {print $NF}' /opt/gitlab/version-manifest.txt)
115
- MIN_VERSION=" 15.0 " gitlab-ctl upgrade-check " ${old_version} " " ${new_version} "
115
+ MIN_VERSION=" 15.11 " gitlab-ctl upgrade-check " ${old_version} " " ${new_version} "
116
116
fi
117
117
118
118
# Copy gitlab.rb for the first time
@@ -128,16 +128,28 @@ if [[ ! -f /etc/gitlab/ssh_host_rsa_key ]]; then
128
128
ssh-keygen -f /etc/gitlab/ssh_host_rsa_key -N ' ' -t rsa
129
129
chmod 0600 /etc/gitlab/ssh_host_rsa_key
130
130
fi
131
+ # sshd loads the keys from /etc/gitlab, but the GitLab backend looks for keys
132
+ # from within /etc/ssh
133
+ ln -fs /etc/gitlab/ssh_host_rsa_key.pub /etc/ssh/ssh_host_rsa_key.pub
134
+
131
135
if [[ ! -f /etc/gitlab/ssh_host_ecdsa_key ]]; then
132
136
echo " Generating ssh_host_ecdsa_key..."
133
137
ssh-keygen -f /etc/gitlab/ssh_host_ecdsa_key -N ' ' -t ecdsa
134
138
chmod 0600 /etc/gitlab/ssh_host_ecdsa_key
135
139
fi
140
+ # sshd loads the keys from /etc/gitlab, but the GitLab backend looks for keys
141
+ # from within /etc/ssh
142
+ ln -fs /etc/gitlab/ssh_host_ecdsa_key.pub /etc/ssh/ssh_host_ecdsa_key.pub
143
+
136
144
if [[ ! -f /etc/gitlab/ssh_host_ed25519_key ]]; then
137
145
echo " Generating ssh_host_ed25519_key..."
138
146
ssh-keygen -f /etc/gitlab/ssh_host_ed25519_key -N ' ' -t ed25519
139
147
chmod 0600 /etc/gitlab/ssh_host_ed25519_key
140
148
fi
149
+ # sshd loads the keys from /etc/gitlab, but the GitLab backend looks for keys
150
+ # from within /etc/ssh
151
+ ln -fs /etc/gitlab/ssh_host_ed25519_key.pub /etc/ssh/ssh_host_ed25519_key.pub
152
+
141
153
142
154
# Remove all services, the reconfigure will create them
143
155
echo " Preparing services..."
@@ -148,6 +160,11 @@ mkdir -p /var/run/sshd
148
160
mkdir -p /var/log/gitlab/sshd
149
161
mkdir -p /var/log/gitlab/reconfigure
150
162
163
+ if [ -n " ${GITLAB_PRE_RECONFIGURE_SCRIPT+x} " ]; then
164
+ echo " Running Pre Reconfigure Script..."
165
+ eval " ${GITLAB_PRE_RECONFIGURE_SCRIPT} "
166
+ fi
167
+
151
168
# Start service manager
152
169
echo " Starting services..."
153
170
GITLAB_OMNIBUS_CONFIG= /opt/gitlab/embedded/bin/runsvdir-start &
0 commit comments