DB 마이그레이션 시 리빌드 업그레이드 실패 (Postgres 문제?)

여러분,

db migrate 문제로 인해 리빌드(rebuild)가 실패하고 있습니다. 이 인스톨에서 수년 동안 계속 리빌드를 해왔기 때문에 뭔가 너무 오래된 것이 있는지 궁금합니다.

annoying 님이 빌드 로그의 끝부분에서 어떤 정보를 추출할 수 있는지, 아니면 더 상위 로그를 봐야 하는지 알려주실 수 있을까요?

도움 주시면 감사하겠습니다!

I, [2022-11-30T10:15:55.248687 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
[discourse-signatures] Handlebars templates can no longer be included via `register_asset`.
Any hbs files under `assets/javascripts` will be automatically compiled and included."
/var/www/discourse/lib/plugin/instance.rb:590:in `register_asset'
/var/www/discourse/plugins/discourse-signatures/plugin.rb:48:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:677:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:677:in `activate!'
/var/www/discourse/lib/discourse.rb:314:in `block in activate_plugins!'
/var/www/discourse/lib/discourse.rb:311:in `each'
/var/www/discourse/lib/discourse.rb:311:in `activate_plugins!'
/var/www/discourse/config/application.rb:212:in `block in <class:Application>'
/var/www/discourse/lib/plugin.rb:6:in `initialization_guard'
/var/www/discourse/config/application.rb:211:in `<class:Application>'
/var/www/discourse/config/application.rb:82:in `<module:Discourse>'
/var/www/discourse/config/application.rb:81:in `<top (required)>'
/var/www/discourse/Rakefile:7:in `require'
/var/www/discourse/Rakefile:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
(See full trace by running task with --trace)
I, [2022-11-30T10:15:56.291184 #1]  INFO -- : 
I, [2022-11-30T10:15:56.292222 #1]  INFO -- : Terminating async processes
I, [2022-11-30T10:15:56.292556 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 41
I, [2022-11-30T10:15:56.292812 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 102
2022-11-30 10:15:56.293 UTC [41] LOG:  received fast shutdown request
102:signal-handler (1669803356) Received SIGTERM scheduling shutdown...
2022-11-30 10:15:56.300 UTC [41] LOG:  aborting any active transactions
2022-11-30 10:15:56.306 UTC [41] LOG:  background worker "logical replication launcher" (PID 50) exited with exit code 1
2022-11-30 10:15:56.308 UTC [45] LOG:  shutting down
2022-11-30 10:15:56.340 UTC [41] LOG:  database system is shut down
102:M 30 Nov 2022 10:15:56.383 # User requested shutdown...
102:M 30 Nov 2022 10:15:56.384 * Saving the final RDB snapshot before exiting.
102:M 30 Nov 2022 10:15:56.481 * DB saved on disk
102:M 30 Nov 2022 10:15:56.482 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1433 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap failed with exit code 1

일단 상단 줄 때문에 discourse-signatures 관련 문제일 수도 있겠다고 조심스럽게 말씀드리고 싶어요. 해당 플러그인을 제외하고 다시 빌드해 보시면 될까요?

실제로, 며칠 전 비슷한 상황을 떠올랐어요:

다시 한 번 빌드를 시도해 보시고, 일시적인 오류인지 확인해 주실 수 있을까요?

실제로 전에 3번 시도해 봤어요 … 서명 플러그인을 주석 처리하고 다시 시도해 볼 수 있겠네요.

결과를 보고드릴게요.

@JammyDodger님, 감사합니다!

플러그인을 주석 처리했는데, 재구성이 성공적으로 완료되었습니다.

다른 스레드에서는 수정안이 제출된 것 같은데 … 아마 aml 파일에서 해당 플러그인을 다시 활성화하고 다시 시도하면 작동할까요?

그렇지 않다면, 당분간 해당 플러그인 없이 진행하겠습니다.

해당 문제는 discourse-signatures의 최신 버전에서 수정되어야 합니다. 플러그인의 다른 브랜치/포크를 사용 중이신가요? :thinking: app.yml의 signatures 라인을 공유해 주실 수 있을까요?

오래전에 추가한 것이라 정확히 얼마나 오래되었는지, 어떤 포크인지는 잘 모르겠지만, 여기 있습니다:

#- git clone https://github.com/xfalcox/discourse-signatures.git

아, 그렇군요. 해당 주소를 공식 https://github.com/discourse/discourse-signatures로 업데이트하면 훨씬 더 잘 작동할 것입니다.

@Falco 공식 저장소로 마이그레이션하는 것을 돕기 위해 무언가를 해야 할 것 같습니다. GitHub에 원래 저장소 복사본을 공식 저장소로 리다이렉트하도록 요청할 수 있을까요? 아니면 그렇게 할 수 없다면, 다음과 같은 조치를 취할 수도 있습니다.

정말 멋진 일이에요.

(당시) 포럼에 추가했던 가장 최신 기능 중 일부는 이후 안정화되어 메인 릴리스에 포함되었을 수 있고, 앞으로는 그 기능들이 같은 역할을 수행할 수도 있어요.

빠른 대응에 감사드립니다!