I’m not sure how to capture the output of ./launcher rebuild app
, but here’s what I’ve got.
It starts like this:
root@connect:/var/discourse# ./launcher rebuild app
Ensuring launcher is up to date
Fetching origin
Launcher is up-to-date
Stopping old container
+ /usr/bin/docker stop -t 60 app
app
cd /pups && git pull && git checkout v1.0.3 && /pups/bin/pups --stdin
From https://github.com/discourse/pups
17f04ec..e0ff889 master -> origin/master
* [new tag] v1.1.1 -> v1.1.1
* [new tag] v1.1.0 -> v1.1.0
Updating 17f04ec..e0ff889
Fast-forward
.github/workflows/ci.yml | 29 ++++++
.github/workflows/lint.yml | 27 +++++
.rubocop.yml | 3 +
Gemfile | 2 +
Guardfile | 4 +-
README.md | 21 ++++
Rakefile | 14 +--
bin/pups | 8 +-
lib/pups.rb | 32 ++++--
lib/pups/cli.rb | 92 ++++++++++-------
lib/pups/command.rb | 25 +++--
lib/pups/config.rb | 240 +++++++++++++++++++++++--------------------
lib/pups/docker.rb | 69 +++++++++++++
lib/pups/exec_command.rb | 182 ++++++++++++++++----------------
lib/pups/file_command.rb | 60 +++++------
lib/pups/merge_command.rb | 94 ++++++++---------
lib/pups/replace_command.rb | 70 +++++++------
lib/pups/runit.rb | 47 +++++----
lib/pups/version.rb | 4 +-
pups.gemspec | 37 ++++---
test/cli_test.rb | 102 +++++++++++++++---
test/config_test.rb | 215 ++++++++++++++++++++++++++++----------
test/docker_test.rb | 157 ++++++++++++++++++++++++++++
test/exec_command_test.rb | 62 ++++++-----
test/file_command_test.rb | 17 ++-
test/merge_command_test.rb | 64 ++++++------
test/replace_command_test.rb | 86 ++++++++--------
test/test_helper.rb | 2 +
28 files changed, 1158 insertions(+), 607 deletions(-)
create mode 100644 .github/workflows/ci.yml
create mode 100644 .github/workflows/lint.yml
create mode 100644 .rubocop.yml
create mode 100644 lib/pups/docker.rb
create mode 100644 test/docker_test.rb
Note: checking out 'v1.0.3'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at d1db030 cut a new version
I, [2021-10-19T05:37:44.995716 #1] INFO -- : Loading --stdin
I, [2021-10-19T05:37:45.001857 #1] INFO -- : > locale-gen $LANG && update-locale
I, [2021-10-19T05:37:45.031533 #1] INFO -- : Generating locales (this might take a while)...
Generation complete.
I, [2021-10-19T05:37:45.032260 #1] INFO -- : > mkdir -p /shared/postgres_run
I, [2021-10-19T05:37:45.037403 #1] INFO -- :
I, [2021-10-19T05:37:45.038002 #1] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2021-10-19T05:37:45.041480 #1] INFO -- :
I, [2021-10-19T05:37:45.041974 #1] INFO -- : > chmod 775 /shared/postgres_run
I, [2021-10-19T05:37:45.044313 #1] INFO -- :
I, [2021-10-19T05:37:45.044759 #1] INFO -- : > rm -fr /var/run/postgresql
I, [2021-10-19T05:37:45.047047 #1] INFO -- :
I, [2021-10-19T05:37:45.047605 #1] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2021-10-19T05:37:45.051062 #1] INFO -- :
I, [2021-10-19T05:37:45.051463 #1] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2021/10/19 05:37:45 socat[33] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2021-10-19T05:37:45.058669 #1] INFO -- :
I, [2021-10-19T05:37:45.058976 #1] INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2021-10-19T05:37:45.061427 #1] INFO -- :
I, [2021-10-19T05:37:45.061743 #1] INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2021-10-19T05:37:45.063969 #1] INFO -- :
I, [2021-10-19T05:37:45.064258 #1] INFO -- : > mkdir -p /shared/postgres_run/13-main.pg_stat_tmp
I, [2021-10-19T05:37:45.068148 #1] INFO -- :
I, [2021-10-19T05:37:45.068570 #1] INFO -- : > chown postgres:postgres /shared/postgres_run/13-main.pg_stat_tmp
I, [2021-10-19T05:37:45.070400 #1] INFO -- :
I, [2021-10-19T05:37:45.074243 #1] INFO -- : File > /etc/service/postgres/run chmod: +x chown:
I, [2021-10-19T05:37:45.077577 #1] INFO -- : File > /etc/service/postgres/log/run chmod: +x chown:
I, [2021-10-19T05:37:45.081084 #1] INFO -- : File > /etc/runit/3.d/99-postgres chmod: +x chown:
I, [2021-10-19T05:37:45.084463 #1] INFO -- : File > /root/upgrade_postgres chmod: +x chown:
I, [2021-10-19T05:37:45.084841 #1] INFO -- : > chown -R root /var/lib/postgresql/13/main
I, [2021-10-19T05:37:45.766251 #1] INFO -- :
I, [2021-10-19T05:37:45.766560 #1] INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/13/bin/initdb -D /shared/postgres_data || exit 0
I, [2021-10-19T05:37:45.769955 #1] INFO -- :
I, [2021-10-19T05:37:45.770597 #1] INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2021-10-19T05:37:45.841916 #1] INFO -- :
I, [2021-10-19T05:37:45.842605 #1] INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2021-10-19T05:37:45.845109 #1] INFO -- :
I, [2021-10-19T05:37:45.845574 #1] INFO -- : > /root/upgrade_postgres
initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
debconf: delaying package configuration, since apt-utils is not installed
Then it goes by too fast (with many lines in /shared/postgres_data/base/whatever
and ends like this:
/shared/postgres_data/base/16400/203028
/shared/postgres_data/base/16400/203045
/shared/postgres_data/base/16400/203047
/shared/postgres_data/base/16400/203049
/shared/postgres_data/base/16400/203050
/shared/postgres_data/base/13014/2613
/shared/postgres_data/base/13014/2683
/shared/postgres_data/base/1/2613
/shared/postgres_data/base/1/2683
ok
Setting next OID for new cluster ok
Sync data directory to disk ok
Creating script to analyze new cluster ok
Creating script to delete old cluster ok
Upgrade Complete
----------------
Optimizer statistics are not transferred by pg_upgrade so,
once you start the new server, consider running:
./analyze_new_cluster.sh
Running this script will delete the old cluster's data files:
./delete_old_cluster.sh
-------------------------------------------------------------------------------------
UPGRADE OF POSTGRES COMPLETE
Old 10 database is stored at /shared/postgres_data_old
To complete the upgrade, rebuild again using:
./launcher rebuild app
-------------------------------------------------------------------------------------
a68ed0b1b54e4a0e2dae2543dc27d87be02ca1f81738e0d2e43511a46524a980