Projekt

Allgemein

Profil

Aktionen

Aufgabe #1132

offen

(Überprüfung und) Durchführung Aktualisierung GitLab 2022-03

Von PaulRiegel vor etwa 2 Jahren hinzugefügt. Vor etwa 2 Jahren aktualisiert.

Status:
Gelöst
Priorität:
Normal
Kategorie:
-
Beginn:
09.03.2022
Abgabedatum:
% erledigt:

0%

Geschätzter Aufwand:

Beschreibung

apt-get update

Hit:1 http://security.debian.org buster/updates InRelease
Hit:2 http://deb.debian.org/debian buster InRelease                                                   
Ign:3 http://archive.turnkeylinux.org/debian buster-security InRelease                                
Ign:4 http://archive.turnkeylinux.org/debian buster InRelease                   
Hit:5 http://archive.turnkeylinux.org/debian buster-security Release
Hit:7 http://archive.turnkeylinux.org/debian buster Release                     
Hit:9 https://packages.gitlab.com/gitlab/gitlab-ce/debian buster InRelease      
Err:9 https://packages.gitlab.com/gitlab/gitlab-ce/debian buster InRelease
  The following signatures were invalid: EXPKEYSIG 3F01618A51312F3F GitLab B.V. (package repository signing key) <packages@gitlab.com>
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.gitlab.com/gitlab/gitlab-ce/debian buster InRelease: The following signatures were invalid: EXPKEYSIG 3F01618A51312F3F GitLab B.V. (package repository signing key) <packages@gitlab.com>
W: Failed to fetch https://packages.gitlab.com/gitlab/gitlab-ce/debian/dists/buster/InRelease  The following signatures were invalid: EXPKEYSIG 3F01618A51312F3F GitLab B.V. (package repository signing key) <packages@gitlab.com>
W: Some index files failed to download. They have been ignored, or old ones used instead.

awk '/deb \[signed-by=/{
pubkey = $2;
sub(/\[signed-by=/, "", pubkey);
sub(/\]$/, "", pubkey);
print pubkey
}' /etc/apt/sources.list.d/gitlab-ce.list | \
while read line; do
curl -s "https://packages.gitlab.com/gpg.key" | gpg --dearmor > $line
done

Aktionen #1

Von PaulRiegel vor etwa 2 Jahren aktualisiert

Aktionen #2

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

im tmux

apt update && upgrade -y

übrigens war wirklich nur gitlab-ce

<prev>
erl: warning: Falling back to a fallback locale ("en_US.UTF-8").
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 111097 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_14.8.2-ce.0_amd64.deb ...
Malformed configuration JSON file found at /opt/gitlab/embedded/nodes/gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden.cluster.json.
This usually happens when your last run of `gitlab-ctl reconfigure` didn't complete successfully.
This file is used to check if any of the unsupported configurations are enabled,
and hence require a working reconfigure before upgrading.
Please run `sudo gitlab-ctl reconfigure` to fix it and try again.
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_14.8.2-ce.0_amd64.deb (--unpack):
new gitlab-ce package pre-installation script subprocess returned error exit status 1

</prev>

Aktionen #3

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

gitlab-ctl reconfigure

<prev> * directory[/opt/gitlab/service] action create (up to date) * link[/opt/gitlab/service/grafana] action create (up to date) * ruby_block[wait for grafana service socket] action run (skipped due to not_if)
(up to date)
Recipe: gitlab::database_reindexing_disable * crond_job[database-reindexing] action delete * file[/var/opt/gitlab/crond/database-reindexing] action delete (up to date)
(up to date)

Running handlers:
Running handlers complete
Chef Infra Client finished, 5/832 resources updated in 42 seconds
gitlab Reconfigured!
root@gitlab---aufgabe
</prev>

Aktionen #4

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

Running handlers:
There was an error running gitlab-ctl reconfigure:

redis_service[redis] (redis::enable line 19) had an error: RuntimeError: ruby_block[warn pending redis restart] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/redis/resources/service.rb line 65) had an error: RuntimeError: Execution of the command `/opt/gitlab/embedded/bin/redis-cli -s /var/opt/gitlab/redis/redis.socket INFO` failed with a non-zero exit code (1)
stdout:
stderr: Could not connect to Redis at /var/opt/gitlab/redis/redis.socket: No such file or directory

Running handlers complete
Chef Infra Client failed. 17 resources updated in 03 minutes 38 seconds ===
There was an error running gitlab-ctl reconfigure. Please check the output above for more
details. ===

dpkg: error processing package gitlab-ce (--configure):
installed gitlab-ce package post-installation script subprocess returned error
exit status 1
Errors were encountered while processing:
gitlab-ce
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:

Aktionen #5

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

apt-get install --reinstall locales

Setting up locales (2.28-10) ...
Generating locales (this might take a while)...
en_US.UTF-8... done
Generation complete.
Setting up gitlab-ce (14.8.2-ce.0) ...

-->
ist direkt in den gitlab upgrade prozess wieder rein gesprungen

Aktionen #6

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

systemctl status nginx -->bin failed weil adresse bereits genutzt

nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-03-09 22:44:23 UTC; 14s ago
Docs: man:nginx(8)
Process: 5934 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 5935 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=1/FAILURE)
CPU: 38ms

Mar 09 22:44:21 gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden nginx5935: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Mar 09 22:44:21 gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden nginx5935: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Mar 09 22:44:22 gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden nginx5935: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Mar 09 22:44:22 gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden nginx5935: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Mar 09 22:44:23 gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden nginx5935: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
Mar 09 22:44:23 gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden nginx5935: nginx: [emerg] still could not bind()
Mar 09 22:44:23 gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden systemd1: nginx.service: Control process exited, code=exited, status=1/FAILURE
Mar 09 22:44:23 gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden systemd1: nginx.service: Failed with result 'exit-code'.
Mar 09 22:44:23 gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden systemd1: Failed to start A high performance web server and a reverse proxy server.
Mar 09 22:44:23 gitlab---aufgabenverwaltung-dateiverwaltung---stu-htw-dresden systemd1: nginx.service: Consumed 38ms CPU time.

nginx -t

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

systemctl start nginx

Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.

Aktionen #7

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

confconsole wartet auf das stoppen von nginx allerding läuft der service garnicht. dehalb haben wir einen loop bei "confconsole" get certificate

2022-03-09 22:50:28] dehydrated-wrapper: INFO: started
[2022-03-09 22:50:30] dehydrated-wrapper: INFO: found nginx listening on port 80
[2022-03-09 22:50:30] dehydrated-wrapper: INFO: stopping nginx
[2022-03-09 22:50:32] dehydrated-wrapper: INFO: waiting 1 second for nginx to stop
[2022-03-09 22:50:33] dehydrated-wrapper: INFO: waiting 1 second for nginx to stop
[2022-03-09 22:50:34] dehydrated-wrapper: INFO: waiting 1 second for nginx to stop
[2022-03-09 22:50:35] dehydrated-wrapper: INFO: waiting 1 second for nginx to stop
[2022-03-09 22:50:36] dehydrated-wrapper: INFO: waiting 1 second for nginx to stop

Aktionen #8

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

also reboot hilft um das nginx lässt sich nicht starten problem zu lösen.

allerdings in der confconsole taucht immer ein fehler bei "Get certificate" auf, der mit nginx zu tun hat.

ich habe mal einen dns eintrag für "development.stu..." gemacht hilft leider auch nichts

ein tipp hierfür soll angeblich sein aus zu kommentieren pid /var/run/nginx.pid; --> hilft nichts

https://stackoverflow.com/questions/15983050/restarting-nginx-nginxnginx-emerg-bind-to-0-0-0-080-failed-98-address-a

ein weiertere tipp ist direkt im gitlab mal die adresse zu ändern + einen neuen port anzugeben --> hilft auch nichts
https://stackoverflow.com/questions/25393370/gitlab-nginx-problems-nginx-emerg-bind-to-0-0-0-080-failed-98-address

--wieder zurück gebaut

Aktionen #9

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

Fehler behoben in gitlab-ctl conf ist eine externe url angegeben. dahinter stand prt 80 was aber für ssl quatsch war. deswegen "https://dev.dat...:443"

-- hat den feheler behoben

gitlab-ctl reconfigure

und dann reboot.

es dauert ca. 12 min bis alle services starten

Aktionen #10

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

  • Status wurde von Neu zu Feedback geändert
  • Zugewiesen an wurde auf Bereich Administration Rechentechnik gesetzt
  • Priorität wurde von Dringend zu Normal geändert
Aktionen #11

Von PaulRiegel vor etwa 2 Jahren aktualisiert

  • Status wurde von Feedback zu In Bearbeitung geändert

testweise einträge - etwa in der datei /etc/gitlab/gitlab.rb - müssen noch "zurückgesetzt" (oder geeignet dokumentiert werden.

Aktionen #12

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

  • Status wurde von In Bearbeitung zu Feedback geändert

Also ich habe jetzt nochmal die Änderungen rausgenommen. Dabei ist mir irgendwie aufgefallen, dass scheinbar nich die Änderung bei der "externen URL" entscheiden ist sondern vielmehr die Zeile "nginx redirect" (rund Zeile 1000) in der gitlab-ctl

Entweder war mir das nicht so bewusst oder man schaut sich das doch nochmal genauer an. Deswegen stelle ich das nochmal auf Feedback aber prinzipiell erstmal ok.

Aktionen #13

Von PaulRiegel vor etwa 2 Jahren aktualisiert

Uns stellt sich ja die Frage was den Unterschied bei der ermittelten (berichtigenden) Konfiguration (vom vermeintlichen Deaktivieren durch den Wert nginx['redirect_http_to_https']) für gitlab ausmacht.


$EDITOR /etc/gitlab/gitlab.rb
gitlab-ctl reconfigure

cp /etc/gitlab/gitlab.rb /tmp/gitlab.rb_failing
cp /var/opt/gitlab/nginx/conf/gitlab-http.conf /tmp/gitlab-http.conf_failing

$EDITOR /etc/gitlab/gitlab.rb
gitlab-ctl reconfigure

cp /etc/gitlab/gitlab.rb /tmp/gitlab.rb_working
cp /var/opt/gitlab/nginx/conf/gitlab-http.conf /tmp/gitlab-http.conf_working


diff /tmp/gitlab.rb_failing /tmp/gitlab.rb_working

1185c1185
< # nginx['redirect_http_to_https'] = false
---
> nginx['redirect_http_to_https'] = false

diff /tmp/gitlab-http.conf_failing /tmp/gitlab-http.conf_working

33,53d32
< ## Redirects all HTTP traffic to the HTTPS host
< server {
<   listen *:80;
< 
<   server_name dev.dat.stu.htw.stura-dresden.de;
<   server_tokens off; ## Don't show the nginx version number, a security best practice
< 
<   location /.well-known {
<     root /var/opt/gitlab/nginx/www/;
<   }
< 
<   location / {
<     return 301 https://dev.dat.stu.htw.stura-dresden.de:443$request_uri;
<   }
< 
<   # health checks configuration
<   include /var/opt/gitlab/nginx/conf/gitlab-health.conf;
< 
<   access_log  /var/log/gitlab/nginx/gitlab_access.log gitlab_access;
<   error_log   /var/log/gitlab/nginx/gitlab_error.log error;
< }

Aktionen #14

Von PaulRiegel vor etwa 2 Jahren aktualisiert

  • Thema wurde von Überprüfung Aktualisierung GitLab 2022-03 zu (Überprüfung und) Durchführung Aktualisierung GitLab 2022-03 geändert
  • Zugewiesen an wurde von Bereich Administration Rechentechnik zu MichaelLeopold geändert

Also eigentlich muss nur noch dokumentiert werden. Oder? (Bei Fragen dazu gern Bescheid geben.)

Aktionen #15

Von PaulRiegel vor etwa 2 Jahren aktualisiert


     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/

Upgrade complete! If your GitLab server is misbehaving try running
  sudo gitlab-ctl restart
before anything else.
If you need to roll back to the previous version you can use the database
backup made during the upgrade (scroll up for the filename).

[master 14cb5a4] committing changes in /etc made by "apt -y upgrade" 
 2 files changed, 1 insertion(+)
 create mode 100644 gitlab/config_backup/gitlab_config_1647616383_2022_03_18.tar
Enumerating objects: 1554, done.
Counting objects: 100% (1554/1554), done.
Delta compression using up to 4 threads
Compressing objects: 100% (911/911), done.
Writing objects: 100% (1554/1554), done.
Total 1554 (delta 219), reused 1541 (delta 211)
W: Operation was interrupted before it could finish
Aktionen #16

Von MichaelLeopold vor etwa 2 Jahren aktualisiert

  • Status wurde von Feedback zu Gelöst geändert
  • Zugewiesen an wurde von MichaelLeopold zu Bereich Administration Rechentechnik geändert
Aktionen

Auch abrufbar als: Atom PDF