Update proxmox

apt-get update; apt-get -y upgrade; apt-get -y dist-upgrade; # apt-get autoremove

Do patch on initramfs before reboot! Look at this article if you want boot on LVM after update!

Proxmox fail to boot. LVM

You do this:

apt-get update ; apt-get upgrade

after proxmox fail to boot!
It is ok. Proxmox is shit!

Use this magic shell command from root:

patch -p0 -d / <<EOF
--- /usr/share/initramfs-tools/scripts/local-top/lvm2 2009-08-17 21:28:09.000000000 +0400
+++ /usr/share/initramfs-tools/scripts/local-top/lvm2 2018-07-03 17:33:50.112702809 +0300
@@ -60,6 +60,8 @@

 modprobe -q dm-mod

+vgchange -ay
+
 activate_vg "\$ROOT"
 activate_vg "\$resume"
EOF
update-initramfs -k all -u

profit

Юзаем ZMODEM


yum install -y lrzsz

Отправляем файлы с сервера (скачиваем)

sz myfile

достаём файлик из папки “Загрузки”

Загружаем файл на сервер (заливаем)

rz

выбираем файлы из диалога

GOCD – Basic user password login and API (authentication)

1. generate password hash
$ php -r 'echo base64_encode(sha1("badger", true));'
ThmbShxAtJepX80c2JY1FzOEmUk=

2. create password file
sudo -u go touch /etc/go/passwd
echo "<username>:<password hash>" > /etc/go/passwd

3. enable password file
Admin -> Server Configuration -> User Management -> Password File Settings -> Password File Path -> /etc/go/passwd -> Save

used links:
https://docs.go.cd/current/configuration/dev_authentication.html

Clean GOCD history

On GOCD server.
Stop go-server
Run this:

java -cp "/var/lib/go-server/work/jetty-0.0.0.0-8153-cruise.war-_go-any-/webapp/WEB-INF/lib/*:/var/lib/go-server/work/jett0.0.0.0-8153-cruise.war-_go-any-/webapp/WEB-INF/classes/" org.h2.tools.Console

Navigate to http://localhost:8082/
connect to jdbc:h2:/var/lib/go-server/db/h2db/cruise
Erase all data from database.
Run this several times:

DROP TRIGGER PUBLIC.LASTTRANSITIONEDTIMEUPDATE;
DELETE FROM PIPELINEMATERIALREVISIONS;
DELETE FROM MODIFICATIONS;
DELETE FROM MODIFIEDFILES;
DELETE FROM BUILDSTATETRANSITIONS;
DELETE FROM BUILDS;
DELETE FROM PROPERTIES;
DELETE FROM ENVIRONMENTVARIABLES;
DELETE FROM STAGES;
DELETE FROM PIPELINES;
UPDATE PIPELINELABELCOUNTS SET LABELCOUNT=0;
CREATE FORCE TRIGGER PUBLIC.LASTTRANSITIONEDTIMEUPDATE AFTER INSERT ON PUBLIC.BUILDSTATETRANSITIONS FOR EACH ROW QUEUE 1024 CALL "com.thoughtworks.go.server.sqlmigration.Migration_230007";

Send Ctrl-C to java … h2.Console. Or go-server will fail to start.
Erase all history files

rm -rf /var/lib/go-server/artifacts/pipelines/*/*
rm -rf /var/lib/go-server/pipelines/flyweight/*