Ubuntu VM를 22에서 24로 업그레이드 중 discourse 도커 유지

Ubuntu에서 discourse 인스턴스를 실행 중입니다. 한동안 시스템에 로그인하지 않았는데, do-release-upgrade를 통한 업그레이드가 필요했습니다.

업그레이드는 정상적으로 수행된 것으로 보이지만, 재부팅 후 discourse가 작동하지 않았습니다. systemctl restart docker와 journalctl을 실행해 확인해 보니 다음과 같은 로그가 나타났습니다.

Nov 07 16:53:58 discourse systemd[1]: docker.service: Scheduled restart job, restart counter is at 2.
Nov 07 16:53:58 discourse systemd[1]: Starting docker.service - Docker Application Container Engine...
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.855938951-05:00" level=info msg="systemd-resolved is running, so using resolvconf: /run/systemd/resolve/resolv.conf"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.858965305-05:00" level=info msg="parsed scheme: \"unix\"" module=grpc
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.859013907-05:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.859094653-05:00" level=info msg="parsed scheme: \"unix\"" module=grpc
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.859114038-05:00" level=info msg="scheme \"unix\" not registered, fallback to default scheme" module=grpc
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.864502036-05:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871019185-05:00" level=info msg="Graph migration to content-addressability took 0.00 seconds"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871656775-05:00" level=warning msg="Your kernel does not support cgroup memory limit"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871680667-05:00" level=warning msg="Unable to find cpu cgroup in mounts"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871693302-05:00" level=warning msg="Unable to find blkio cgroup in mounts"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871704545-05:00" level=warning msg="Unable to find cpuset cgroup in mounts"
Nov 07 16:53:58 discourse dockerd[1566]: time="2024-11-07T16:53:58.871760062-05:00" level=warning msg="mountpoint for pids not found"
Nov 07 16:53:58 discourse dockerd[1566]: Error starting daemon: Devices cgroup isn't mounted
root@discourse:/var/discourse# uname -r
6.8.0-48-generic
root@discourse:/var/discourse# cat /etc/os-release 
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

위 내용을 깨닫게 해준 것은 rebuild 과정이었습니다.

root@discourse:~# cd /var/discourse
root@discourse:/var/discourse# ./launcher rebuild app
Device "docker0" does not exist.
Cannot connect to the docker daemon - verify it is running and you have access


이것이 정말 커널 문제인가요? 어떻게 진행해야 할지 모르겠고, 물론 do-release-upgrade를 입력할 때 discourse DB 백업을 하지 않았습니다. 최근 중요한 노트를 몇 개 작성했는데, 그걸 되찾고 싶습니다 :face_with_peeking_eye:

앱을 이미 다시 빌드하셨나요?

@omarfilip
죄송합니다. 처음에 그걸 추가하는 걸 깜빡했네요. 이 부분이 도커가 처음부터 실행되지 않는 이유를 조사하게 된 계기였습니다

root@discourse:~# cd /var/discourse
root@discourse:/var/discourse# ./launcher rebuild app
Device "docker0" does not exist.
Cannot connect to the docker daemon - verify it is running and you have access

이것이 아이디어를 줄 수 있는지 확인해 보세요:

do-release-upgrade를 실행해야 필수라는 뜻이 아니라, 그것을 권장한 것입니다.

제안대로, docker가 깨져 있습니다. 이를 수정해야 합니다. 작동할 수도 있고 안 될 수도 있는 방법 중 하나는 다음과 같습니다.

curl https://get.docker.com | sh

몇 가지 경고가 표시되지만, 최근 제가 직접 사용해 본 적이 있습니다.

그 후 이 명령이 성공하는지 확인해 보세요:

docker run hello-world