Discourse build is broken due to removed file?

Got an error when rebuilding (without any changes in app.yml):

I, [2017-10-12T10:23:27.710239 #13]  INFO -- : > cd /var/www/discourse && chown -R discourse /var/www/discourse
chown: cannot access '/var/www/discourse/config/initializers/000-rails-master-polyfills.rb': No such file or directory
chown: cannot access '/var/www/discourse/config/initializers/100-rails3_ar_after_commit_tests.rb': No such file or directory
155:signal-handler (1507803822) Received SIGTERM scheduling shutdown...

Saw this commit https://github.com/discourse/discourse/commit/630f7bfba2e5521b0ddf15db5af6809538d94ebe#diff-67813f286af146a5e0defcc312d07726

Seems like the file removed by @tgxworld isnā€™t as unused as it seems?

[edit] removed support tag, I succesfully downgraded to the Beta branch, will be using that from now on; have been bitten a bit too much by suddenly broken builds.

Do you have the full logs? Based on the current log and the commands that were run, Iā€™m unable to tell why chown -R will even be aware of missing files.

No, afraid thatā€™s lost now, sorry

Just tried again on tests-passed. Hereā€™s the log @tgxworld :slight_smile:

[basvl@col-be-disc1 ~]$ sudo /var/discourse/launcher rebuild app
flag provided but not defined: --format
See '/usr/bin/docker-current info --help'.
Ensuring launcher is up to date
Fetching origin
fatal: ambiguous argument '@': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Not a valid object name @
/var/discourse/launcher: line 661: [: @: unary operator expected
/var/discourse/launcher: line 671: [: 0998a7c802006dfec5724c030131e7885c3e5d19: unary operator expected
Launcher has diverged source, this is only expected in Dev mode
Stopping old container
+ /bin/docker.io stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
Already up-to-date.
I, [2017-10-16T07:57:53.780345 #13]  INFO -- : Loading --stdin
I, [2017-10-16T07:57:53.784977 #13]  INFO -- : > mkdir -p /shared/postgres_run
I, [2017-10-16T07:57:53.799083 #13]  INFO -- : 
I, [2017-10-16T07:57:53.799206 #13]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2017-10-16T07:57:53.804886 #13]  INFO -- : 
I, [2017-10-16T07:57:53.804986 #13]  INFO -- : > chmod 775 /shared/postgres_run
I, [2017-10-16T07:57:53.806186 #13]  INFO -- : 
I, [2017-10-16T07:57:53.806288 #13]  INFO -- : > rm -fr /var/run/postgresql
I, [2017-10-16T07:57:53.808115 #13]  INFO -- : 
I, [2017-10-16T07:57:53.808216 #13]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2017-10-16T07:57:53.815178 #13]  INFO -- : 
I, [2017-10-16T07:57:53.815279 #13]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2017/10/16 07:57:53 socat[21] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2017-10-16T07:57:53.850665 #13]  INFO -- : 
I, [2017-10-16T07:57:53.850767 #13]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2017-10-16T07:57:53.852488 #13]  INFO -- : 
I, [2017-10-16T07:57:53.852592 #13]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2017-10-16T07:57:53.854273 #13]  INFO -- : 
I, [2017-10-16T07:57:53.854379 #13]  INFO -- : > mkdir -p /shared/postgres_run/9.5-main.pg_stat_tmp
I, [2017-10-16T07:57:53.855830 #13]  INFO -- : 
I, [2017-10-16T07:57:53.855936 #13]  INFO -- : > chown postgres:postgres /shared/postgres_run/9.5-main.pg_stat_tmp
I, [2017-10-16T07:57:53.857455 #13]  INFO -- : 
I, [2017-10-16T07:57:53.860567 #13]  INFO -- : File > /etc/service/postgres/run  chmod: +x
I, [2017-10-16T07:57:53.863517 #13]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x
I, [2017-10-16T07:57:53.866497 #13]  INFO -- : File > /root/upgrade_postgres  chmod: +x
I, [2017-10-16T07:57:53.866679 #13]  INFO -- : > chown -R root /var/lib/postgresql/9.5/main
I, [2017-10-16T07:57:55.151214 #13]  INFO -- : 
I, [2017-10-16T07:57:55.151329 #13]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/9.5/bin/initdb -D /shared/postgres_data || exit 0
I, [2017-10-16T07:57:55.152973 #13]  INFO -- : 
I, [2017-10-16T07:57:55.153047 #13]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2017-10-16T07:57:55.164112 #13]  INFO -- : 
I, [2017-10-16T07:57:55.164172 #13]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2017-10-16T07:57:55.165732 #13]  INFO -- : 
I, [2017-10-16T07:57:55.165850 #13]  INFO -- : > /root/upgrade_postgres
I, [2017-10-16T07:57:55.169202 #13]  INFO -- : 
I, [2017-10-16T07:57:55.169314 #13]  INFO -- : > rm /root/upgrade_postgres
I, [2017-10-16T07:57:55.170617 #13]  INFO -- : 
I, [2017-10-16T07:57:55.179954 #13]  INFO -- : Replacing data_directory = '/var/lib/postgresql/9.5/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.180381 #13]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.180654 #13]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.181277 #13]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.181845 #13]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.184299 #13]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.184859 #13]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2017-10-16T07:57:55.192862 #13]  INFO -- : 
I, [2017-10-16T07:57:55.193021 #13]  INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.193336 #13]  INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.194349 #13]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.194906 #13]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.195503 #13]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T07:57:55.197823 #13]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/9.5/main/pg_hba.conf
I, [2017-10-16T07:57:55.198054 #13]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/9.5/main/pg_hba.conf
I, [2017-10-16T07:57:55.198281 #13]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main
I, [2017-10-16T07:57:55.199614 #13]  INFO -- : > sleep 5
2017-10-16 07:57:55.318 UTC [45] LOG:  database system was shut down at 2017-10-16 07:55:33 UTC
2017-10-16 07:57:55.328 UTC [45] LOG:  MultiXact member wraparound protections are now enabled
2017-10-16 07:57:55.330 UTC [42] LOG:  database system is ready to accept connections
2017-10-16 07:57:55.331 UTC [49] LOG:  autovacuum launcher started
I, [2017-10-16T07:58:00.201031 #13]  INFO -- : 
I, [2017-10-16T07:58:00.201235 #13]  INFO -- : > su postgres -c 'createdb discourse' || true
2017-10-16 07:58:00.487 UTC [54] postgres@postgres ERROR:  database "discourse" already exists
2017-10-16 07:58:00.487 UTC [54] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: database creation failed: ERROR:  database "discourse" already exists
I, [2017-10-16T07:58:00.488951 #13]  INFO -- : 
I, [2017-10-16T07:58:00.489140 #13]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2017-10-16 07:58:00.620 UTC [65] postgres@discourse ERROR:  role "discourse" already exists
2017-10-16 07:58:00.620 UTC [65] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2017-10-16T07:58:00.621587 #13]  INFO -- : 
I, [2017-10-16T07:58:00.621738 #13]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2017-10-16T07:58:00.673120 #13]  INFO -- : GRANT

I, [2017-10-16T07:58:00.673240 #13]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2017-10-16T07:58:00.734128 #13]  INFO -- : ALTER SCHEMA

I, [2017-10-16T07:58:00.734246 #13]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2017-10-16T07:58:00.815536 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T07:58:00.815673 #13]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2017-10-16T07:58:00.866904 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T07:58:00.867029 #13]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2017-10-16T07:58:00.919912 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T07:58:00.920033 #13]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2017-10-16T07:58:00.969559 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T07:58:00.969720 #13]  INFO -- : > sudo -u postgres psql discourse
I, [2017-10-16T07:58:00.979365 #13]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2017-10-16T07:58:01.103770 #13]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x
I, [2017-10-16T07:58:01.105520 #13]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod: 
I, [2017-10-16T07:58:01.105606 #13]  INFO -- : > echo postgres installed!
I, [2017-10-16T07:58:01.106829 #13]  INFO -- : postgres installed!

I, [2017-10-16T07:58:01.109770 #13]  INFO -- : File > /etc/service/redis/run  chmod: +x
I, [2017-10-16T07:58:01.112693 #13]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x
I, [2017-10-16T07:58:01.119073 #13]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2017-10-16T07:58:01.119407 #13]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2017-10-16T07:58:01.119639 #13]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2017-10-16T07:58:01.121555 #13]  INFO -- : 
I, [2017-10-16T07:58:01.121708 #13]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2017-10-16T07:58:01.121976 #13]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2017-10-16T07:58:01.122668 #13]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2017-10-16T07:58:01.123834 #13]  INFO -- : > echo redis installed
I, [2017-10-16T07:58:01.125028 #13]  INFO -- : redis installed

I, [2017-10-16T07:58:01.125139 #13]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2017-10-16T07:58:01.128039 #13]  INFO -- : logfile ""

I, [2017-10-16T07:58:01.128160 #13]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2017-10-16T07:58:01.130066 #13]  INFO -- : > sleep 10
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 155
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

155:M 16 Oct 07:58:01.149 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
155:M 16 Oct 07:58:01.149 # Server started, Redis version 3.0.6
155:M 16 Oct 07:58:01.149 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
155:M 16 Oct 07:58:01.149 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
155:M 16 Oct 07:58:01.153 * DB loaded from disk: 0.004 seconds
155:M 16 Oct 07:58:01.153 * The server is now ready to accept connections on port 6379
I, [2017-10-16T07:58:11.131402 #13]  INFO -- : 
I, [2017-10-16T07:58:11.139429 #13]  INFO -- : Replacing <policymap> with <policymap>
  <policy domain="coder" rights="none" pattern="EPHEMERAL" />
  <policy domain="coder" rights="none" pattern="URL" />
  <policy domain="coder" rights="none" pattern="HTTPS" />
  <policy domain="coder" rights="none" pattern="MVG" />
  <policy domain="coder" rights="none" pattern="MSL" />
  <policy domain="coder" rights="none" pattern="TEXT" />
  <policy domain="coder" rights="none" pattern="SHOW" />
  <policy domain="coder" rights="none" pattern="WIN" />
  <policy domain="coder" rights="none" pattern="PLT" />
 in /usr/local/etc/ImageMagick-6/policy.xml
I, [2017-10-16T07:58:11.139783 #13]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
I, [2017-10-16T07:58:11.183970 #13]  INFO -- : 
I, [2017-10-16T07:58:11.184111 #13]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2017-10-16T07:58:11.226386 #13]  INFO -- : 
I, [2017-10-16T07:58:11.226506 #13]  INFO -- : > chown -R discourse /home/discourse
I, [2017-10-16T07:58:11.241644 #13]  INFO -- : 
I, [2017-10-16T07:58:11.241743 #13]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2017-10-16T07:58:11.243069 #13]  INFO -- : 
I, [2017-10-16T07:58:11.245433 #13]  INFO -- : File > /etc/cron.d/anacron  chmod: 
I, [2017-10-16T07:58:11.248443 #13]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x
I, [2017-10-16T07:58:11.251500 #13]  INFO -- : File > /etc/runit/1.d/enable-brotli  chmod: +x
I, [2017-10-16T07:58:11.254540 #13]  INFO -- : File > /etc/service/unicorn/run  chmod: +x
I, [2017-10-16T07:58:11.257775 #13]  INFO -- : File > /etc/service/nginx/run  chmod: +x
I, [2017-10-16T07:58:11.260796 #13]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x
I, [2017-10-16T07:58:11.263873 #13]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x
I, [2017-10-16T07:58:11.263958 #13]  INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2017-10-16T07:58:11.264175 #13]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2017-10-16T07:58:11.266703 #13]  INFO -- : > cd /var/www/discourse && git reset --hard
181:M 16 Oct 07:58:11.269 # Creating Server TCP listening socket *:6379: bind: Address already in use
Checking out files: 100% (24608/24608), done.
I, [2017-10-16T07:58:14.430493 #13]  INFO -- : HEAD is now at 4da4f98 FIX: Clicking on quote button was tricky

I, [2017-10-16T07:58:14.430597 #13]  INFO -- : > cd /var/www/discourse && git clean -f
I, [2017-10-16T07:58:14.582190 #13]  INFO -- : 
I, [2017-10-16T07:58:14.582298 #13]  INFO -- : > cd /var/www/discourse && git remote set-branches --add origin master
I, [2017-10-16T07:58:14.588793 #13]  INFO -- : 
I, [2017-10-16T07:58:14.588856 #13]  INFO -- : > cd /var/www/discourse && git pull
From https://github.com/discourse/discourse
   4da4f98..229a10e  master     -> origin/master
   5f0249f..744e061  beta       -> origin/beta
 * [new branch]      jomaxro-patch-1 -> origin/jomaxro-patch-1
   70bb2aa..a8b4255  s3_refactor -> origin/s3_refactor
   834eef7..3fd7f69  stable     -> origin/stable
   4da4f98..229a10e  tests-passed -> origin/tests-passed
 * [new tag]         v1.8.9     -> v1.8.9
 * [new tag]         v1.9.0.beta13 -> v1.9.0.beta13
I, [2017-10-16T07:58:17.192877 #13]  INFO -- : Updating 4da4f98..229a10e
Fast-forward
 .travis.yml                                        |   5 +-
 .../discourse/components/d-editor.js.es6           |   2 +-
 .../discourse/components/topic-list-item.js.es6    |   3 +-
 .../discourse/components/topic-list.js.es6         |   5 +-
 .../components/user-summary-section.js.es6         |   3 +
 .../discourse/components/user-summary-topic.js.es6 |   3 +
 .../components/user-summary-topics-list.js.es6     |  13 ++
 .../discourse/components/user-summary-user.js.es6  |   3 +
 .../discourse/controllers/tags-show.js.es6         |   4 +-
 .../discourse/controllers/user-summary.js.es6      |   8 -
 .../javascripts/discourse/helpers/raw.js.es6       |  24 ++-
 .../discourse/lib/keyboard-shortcuts.js.es6        |   4 +-
 .../javascripts/discourse/models/user.js.es6       |  66 +++----
 .../discourse/raw-views/topic-status.js.es6        |  12 +-
 .../discourse/templates/application.hbs            |   3 +-
 .../templates/components/topic-entrance.hbs        |   2 +-
 .../discourse/templates/components/topic-list.hbs  |  39 ++--
 .../discourse/templates/components/user-stat.hbs   |   6 +-
 .../templates/components/user-summary-section.hbs  |   2 +
 .../templates/components/user-summary-topic.hbs    |   9 +
 .../components/user-summary-topics-list.hbs        |  16 ++
 .../templates/components/user-summary-user.hbs     |   4 +
 .../components/user-summary-users-list.hbs         |   9 +
 .../discourse/templates/discovery/topics.hbs       |  36 ++--
 .../templates/mobile/discovery/topics.hbs          |   1 -
 .../javascripts/discourse/templates/tags/show.hbs  |   1 -
 .../templates/topic-list-header-column.raw.hbs     |   2 +-
 .../discourse/templates/topic-status.raw.hbs       |   1 +
 .../discourse/templates/user/summary.hbs           | 150 +++++----------
 .../discourse/widgets/post-cooked.js.es6           |   5 +-
 .../engines/discourse-markdown/emoji.js.es6        |   2 +
 .../engines/discourse-markdown/quotes.js.es6       |   2 +
 .../javascripts/pretty-text/white-lister.js.es6    |   1 -
 .../stylesheets/common/admin/admin_base.scss       |  24 +--
 app/assets/stylesheets/common/admin/customize.scss |   4 +-
 app/assets/stylesheets/common/admin/flagging.scss  |   8 +-
 .../stylesheets/common/base/_topic-list.scss       |  22 +--
 app/assets/stylesheets/common/base/alert.scss      |   4 +-
 .../stylesheets/common/base/category-list.scss     |   2 +-
 app/assets/stylesheets/common/base/combobox.scss   |   2 +-
 app/assets/stylesheets/common/base/compose.scss    |   8 +-
 app/assets/stylesheets/common/base/directory.scss  |   4 +-
 app/assets/stylesheets/common/base/discourse.scss  |  10 +-
 app/assets/stylesheets/common/base/emoji.scss      |   6 +-
 app/assets/stylesheets/common/base/group.scss      |   4 +-
 app/assets/stylesheets/common/base/groups.scss     |   8 +-
 app/assets/stylesheets/common/base/header.scss     |   2 +-
 app/assets/stylesheets/common/base/history.scss    |   8 +-
 app/assets/stylesheets/common/base/login.scss      |  10 +-
 app/assets/stylesheets/common/base/menu-panel.scss |  16 +-
 app/assets/stylesheets/common/base/modal.scss      |   8 +-
 .../common/base/notifications-button.scss          |   2 +-
 app/assets/stylesheets/common/base/onebox.scss     |   8 +-
 app/assets/stylesheets/common/base/search.scss     |  12 +-
 app/assets/stylesheets/common/base/share_link.scss |   4 +-
 app/assets/stylesheets/common/base/tagging.scss    |  16 +-
 app/assets/stylesheets/common/base/topic-post.scss |  28 +--
 app/assets/stylesheets/common/base/topic.scss      |   4 +-
 .../stylesheets/common/base/user-badges.scss       |   4 +-
 app/assets/stylesheets/common/base/user.scss       |  22 ++-
 .../stylesheets/common/components/badges.scss      |   8 +-
 .../stylesheets/common/components/banner.scss      |   6 +-
 .../stylesheets/common/components/buttons.scss     |   8 +-
 .../common/components/dropdown-select-box.scss     |   4 +-
 .../stylesheets/common/components/hashtag.scss     |   4 +-
 .../stylesheets/common/components/select-box.scss  |   2 +-
 .../stylesheets/common/components/user-info.scss   |   8 +-
 .../common/components/user-stream-item.scss        |   8 +-
 .../stylesheets/common/foundation/helpers.scss     |   2 +-
 .../stylesheets/common/foundation/variables.scss   |  18 +-
 app/assets/stylesheets/common/topic-timeline.scss  |  14 +-
 app/assets/stylesheets/desktop/category-list.scss  |   6 +-
 app/assets/stylesheets/desktop/compose.scss        |  14 +-
 app/assets/stylesheets/desktop/discourse.scss      |  10 +-
 app/assets/stylesheets/desktop/group.scss          |   2 +-
 app/assets/stylesheets/desktop/header.scss         |   4 +-
 .../stylesheets/desktop/latest-topic-list.scss     |   6 +-
 app/assets/stylesheets/desktop/login.scss          |   4 +-
 app/assets/stylesheets/desktop/modal.scss          |   8 +-
 app/assets/stylesheets/desktop/queued-posts.scss   |   2 +-
 app/assets/stylesheets/desktop/topic-list.scss     |  20 +-
 app/assets/stylesheets/desktop/topic-post.scss     |  54 +++---
 app/assets/stylesheets/desktop/topic.scss          |   4 +-
 app/assets/stylesheets/desktop/upload.scss         |   2 +-
 app/assets/stylesheets/desktop/user.scss           |  12 +-
 app/assets/stylesheets/embed.scss                  |   2 +-
 .../mobile/components/user-stream-item.scss        |   2 +-
 app/assets/stylesheets/mobile/compose.scss         |  14 +-
 app/assets/stylesheets/mobile/directory.scss       |   2 +-
 app/assets/stylesheets/mobile/discourse.scss       |   4 +-
 app/assets/stylesheets/mobile/login.scss           |   4 +-
 app/assets/stylesheets/mobile/modal.scss           |   4 +-
 app/assets/stylesheets/mobile/topic-list.scss      |  18 +-
 app/assets/stylesheets/mobile/topic-post.scss      |  28 +--
 app/assets/stylesheets/mobile/topic.scss           |   8 +-
 app/assets/stylesheets/mobile/upload.scss          |   2 +-
 app/controllers/email_controller.rb                |   1 +
 app/controllers/invites_controller.rb              |   4 +-
 app/helpers/application_helper.rb                  |  22 ++-
 app/jobs/base.rb                                   |  39 +---
 app/jobs/regular/download_avatar_from_url.rb       |   2 +-
 app/jobs/regular/process_post.rb                   |   2 +-
 app/jobs/regular/pull_hotlinked_images.rb          |  48 +++--
 app/jobs/scheduled/clean_up_uploads.rb             |   2 +-
 app/models/backup.rb                               |   2 +-
 app/models/global_setting.rb                       |  15 ++
 app/models/invite.rb                               |   2 +-
 app/models/site_setting.rb                         |  42 ++++-
 app/models/topic_link_click.rb                     |   4 +-
 app/models/upload.rb                               |   2 +-
 app/models/user.rb                                 |   2 +-
 app/serializers/admin_user_list_serializer.rb      |   8 +
 app/serializers/user_summary_serializer.rb         |   4 +-
 app/services/user_destroyer.rb                     |   5 +-
 app/views/common/_discourse_javascript.html.erb    |   8 +-
 config/discourse_defaults.conf                     |   9 +
 config/environments/development.rb                 |   3 -
 config/initializers/000-rails-master-polyfills.rb  |   6 -
 config/initializers/005-site_settings.rb           |   4 +-
 .../100-rails3_ar_after_commit_tests.rb            |  23 ---
 config/initializers/100-sidekiq.rb                 |   2 +-
 config/locales/client.ar.yml                       | 203 ++++++++++++---------
 config/locales/client.el.yml                       |   9 +-
 config/locales/client.en.yml                       |  15 +-
 config/locales/client.es.yml                       |  30 ++-
 config/locales/client.fa_IR.yml                    |  24 ++-
 config/locales/client.fi.yml                       |   2 +-
 config/locales/client.it.yml                       |   9 +-
 config/locales/client.nb_NO.yml                    |   5 +-
 config/locales/client.nl.yml                       |  98 +++++++++-
 config/locales/client.uk.yml                       |   2 +-
 config/locales/client.zh_CN.yml                    |   2 +-
 config/locales/server.el.yml                       |   8 +
 config/locales/server.en.yml                       |   2 +-
 config/locales/server.es.yml                       |   8 +-
 config/locales/server.fa_IR.yml                    |  33 +++-
 config/locales/server.fi.yml                       |  37 ++++
 config/locales/server.he.yml                       |   7 +
 config/locales/server.nb_NO.yml                    |   3 +
 config/locales/server.nl.yml                       |   1 +
 config/unicorn.conf.rb                             |   2 +-
 lib/autospec/rspec_runner.rb                       |   8 +-
 lib/cooked_post_processor.rb                       |   2 +-
 lib/discourse.rb                                   |   2 +-
 lib/discourse_redis.rb                             |   2 +-
 lib/email/receiver.rb                              |   7 +
 lib/file_store/s3_store.rb                         |  27 ++-
 lib/final_destination.rb                           |   2 +-
 lib/global_path.rb                                 |   4 +-
 lib/guardian.rb                                    |   6 +-
 lib/import_export/topic_importer.rb                |   2 +-
 lib/pretty_text.rb                                 |   8 +-
 lib/s3_helper.rb                                   | 110 ++++++++---
 lib/scheduler/defer.rb                             |  16 +-
 lib/scheduler/manager.rb                           |  20 +-
 lib/scheduler/schedule_info.rb                     |   4 +-
 lib/scheduler/web.rb                               |   2 +-
 lib/site_setting_extension.rb                      |   6 +-
 lib/tasks/s3.rake                                  | 106 +++++------
 lib/tasks/uploads.rake                             |   8 +-
 lib/version.rb                                     |   2 +-
 .../config/locales/client.da.yml                   |   7 +-
 .../config/locales/server.ar.yml                   |  32 ++--
 .../config/locales/server.cs.yml                   |   2 +-
 .../config/locales/server.da.yml                   |   3 +
 .../config/locales/server.de.yml                   |  40 ++--
 .../config/locales/server.el.yml                   |  40 ++--
 .../config/locales/server.en.yml                   |  40 ++--
 .../config/locales/server.es.yml                   |  40 ++--
 .../config/locales/server.fa_IR.yml                |  26 +--
 .../config/locales/server.fi.yml                   |  40 ++--
 .../config/locales/server.fr.yml                   |  38 ++--
 .../config/locales/server.he.yml                   |  10 +-
 .../config/locales/server.it.yml                   |  42 ++---
 .../config/locales/server.ko.yml                   |  22 +--
 .../config/locales/server.pl_PL.yml                |  38 ++--
 .../config/locales/server.ru.yml                   |  40 ++--
 .../config/locales/server.zh_CN.yml                |  40 ++--
 .../discourse_narrative_bot/new_user_narrative.rb  |   2 +-
 plugins/discourse-narrative-bot/plugin.rb          |  17 --
 .../new_user_narrative_spec.rb                     |   6 +-
 spec/components/email/receiver_spec.rb             |  82 ++++++++-
 spec/components/file_store/s3_store_spec.rb        |   1 +
 spec/components/final_destination_spec.rb          |   1 +
 spec/components/guardian_spec.rb                   |  23 ++-
 spec/components/pretty_text_spec.rb                |  69 ++++---
 spec/components/stylesheet/importer_spec.rb        |   5 +
 spec/components/topic_creator_spec.rb              |   3 +-
 spec/controllers/admin/users_controller_spec.rb    |   2 +
 spec/controllers/invites_controller_spec.rb        |  13 ++
 spec/fixtures/emails/email_reply_like.eml          |  13 ++
 spec/fixtures/emails/email_reply_staged.eml        |  13 ++
 spec/fixtures/emails/no_date.eml                   |  10 +
 spec/helpers/application_helper_spec.rb            |  44 +++++
 spec/integration/watched_words_spec.rb             |   8 +
 spec/models/global_setting_spec.rb                 |  15 ++
 spec/models/invite_spec.rb                         |   8 +
 spec/models/post_action_spec.rb                    | 114 +++++++-----
 spec/models/post_analyzer_spec.rb                  |   4 +
 spec/models/post_spec.rb                           |   4 +
 spec/models/topic_link_click_spec.rb               |   3 +
 spec/multisite/jobs.rb                             |  31 ++++
 spec/rails_helper.rb                               |  44 +++++
 spec/requests/email_controller_spec.rb             |  13 ++
 spec/services/user_destroyer_spec.rb               |   7 +
 test/javascripts/acceptance/user-test.js.es6       |  15 +-
 test/javascripts/helpers/create-pretender.js.es6   |  18 +-
 207 files changed, 1982 insertions(+), 1225 deletions(-)
 create mode 100644 app/assets/javascripts/discourse/components/user-summary-section.js.es6
 create mode 100644 app/assets/javascripts/discourse/components/user-summary-topic.js.es6
 create mode 100644 app/assets/javascripts/discourse/components/user-summary-topics-list.js.es6
 create mode 100644 app/assets/javascripts/discourse/components/user-summary-user.js.es6
 create mode 100644 app/assets/javascripts/discourse/templates/components/user-summary-section.hbs
 create mode 100644 app/assets/javascripts/discourse/templates/components/user-summary-topic.hbs
 create mode 100644 app/assets/javascripts/discourse/templates/components/user-summary-topics-list.hbs
 create mode 100644 app/assets/javascripts/discourse/templates/components/user-summary-user.hbs
 create mode 100644 app/assets/javascripts/discourse/templates/components/user-summary-users-list.hbs
 delete mode 100644 config/initializers/000-rails-master-polyfills.rb
 delete mode 100644 config/initializers/100-rails3_ar_after_commit_tests.rb
 create mode 100644 spec/fixtures/emails/email_reply_like.eml
 create mode 100644 spec/fixtures/emails/email_reply_staged.eml
 create mode 100644 spec/fixtures/emails/no_date.eml
 create mode 100644 spec/multisite/jobs.rb
 create mode 100644 spec/requests/email_controller_spec.rb

I, [2017-10-16T07:58:17.192986 #13]  INFO -- : > cd /var/www/discourse && git fetch origin tests-passed
From https://github.com/discourse/discourse
 * branch            tests-passed -> FETCH_HEAD
I, [2017-10-16T07:58:18.432067 #13]  INFO -- : 
I, [2017-10-16T07:58:18.432186 #13]  INFO -- : > cd /var/www/discourse && git checkout tests-passed
Switched to a new branch 'tests-passed'
I, [2017-10-16T07:58:18.655660 #13]  INFO -- : Branch tests-passed set up to track remote branch tests-passed from origin.

I, [2017-10-16T07:58:18.655753 #13]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2017-10-16T07:58:18.658388 #13]  INFO -- : 
I, [2017-10-16T07:58:18.658452 #13]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2017-10-16T07:58:18.660588 #13]  INFO -- : 
I, [2017-10-16T07:58:18.660661 #13]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2017-10-16T07:58:18.662593 #13]  INFO -- : 
I, [2017-10-16T07:58:18.662659 #13]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2017-10-16T07:58:18.664813 #13]  INFO -- : 
I, [2017-10-16T07:58:18.664879 #13]  INFO -- : > cd /var/www/discourse && bash -c "touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log"
I, [2017-10-16T07:58:18.667956 #13]  INFO -- : 
I, [2017-10-16T07:58:18.668031 #13]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log /var/www/discourse/log"
I, [2017-10-16T07:58:18.671167 #13]  INFO -- : 
I, [2017-10-16T07:58:18.671241 #13]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2017-10-16T07:58:18.674475 #13]  INFO -- : 
I, [2017-10-16T07:58:18.674549 #13]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2017-10-16T07:58:18.677602 #13]  INFO -- : 
I, [2017-10-16T07:58:18.677675 #13]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups
I, [2017-10-16T07:58:18.680369 #13]  INFO -- : 
I, [2017-10-16T07:58:18.680498 #13]  INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2017-10-16T07:58:18.680734 #13]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2017-10-16T07:58:20.076870 #13]  INFO -- : 
I, [2017-10-16T07:58:20.077115 #13]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2017-10-16T07:58:20.085555 #13]  INFO -- : 
I, [2017-10-16T07:58:20.085615 #13]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2017-10-16T07:58:20.086950 #13]  INFO -- : 
I, [2017-10-16T07:58:20.087012 #13]  INFO -- : > mkdir -p /var/nginx/cache
I, [2017-10-16T07:58:20.088621 #13]  INFO -- : 
I, [2017-10-16T07:58:20.095337 #13]  INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2017-10-16T07:58:20.095599 #13]  INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf
I, [2017-10-16T07:58:20.095812 #13]  INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2017-10-16T07:58:20.096391 #13]  INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf
I, [2017-10-16T07:58:20.096930 #13]  INFO -- : > echo "done configuring web"
I, [2017-10-16T07:58:20.098219 #13]  INFO -- : done configuring web

I, [2017-10-16T07:58:20.098368 #13]  INFO -- : > cd /var/www/discourse && gem update bundler
I, [2017-10-16T07:58:23.846051 #13]  INFO -- : Updating installed gems
Nothing to update

I, [2017-10-16T07:58:23.846169 #13]  INFO -- : > cd /var/www/discourse && chown -R discourse /var/www/discourse
chown: cannot access '/var/www/discourse/config/initializers/000-rails-master-polyfills.rb': No such file or directory
chown: cannot access '/var/www/discourse/config/initializers/100-rails3_ar_after_commit_tests.rb': No such file or directory
155:signal-handler (1508140720) Received SIGTERM scheduling shutdown...
I, [2017-10-16T07:58:40.244840 #13]  INFO -- : 
I, [2017-10-16T07:58:40.252171 #13]  INFO -- : Terminating async processes
I, [2017-10-16T07:58:40.252212 #13]  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/9.5/bin/postmaster -D /etc/postgresql/9.5/main pid: 42
I, [2017-10-16T07:58:40.252253 #13]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 155
2017-10-16 07:58:40.252 UTC [42] LOG:  received fast shutdown request
2017-10-16 07:58:40.252 UTC [42] LOG:  aborting any active transactions
2017-10-16 07:58:40.253 UTC [49] LOG:  autovacuum launcher shutting down
2017-10-16 07:58:40.255 UTC [46] LOG:  shutting down
2017-10-16 07:58:40.263 UTC [46] LOG:  database system is shut down
155:M 16 Oct 07:58:40.286 # User requested shutdown...
155:M 16 Oct 07:58:40.286 * Saving the final RDB snapshot before exiting.
155:M 16 Oct 07:58:40.292 * DB saved on disk
155:M 16 Oct 07:58:40.292 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && chown -R discourse /var/www/discourse failed with return #<Process::Status: pid 268 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem update bundler", "chown -R discourse $home"]}
64ae61db639a02366d82688faeb5d5681052b6008f13b31f8574bd49dd4f242b
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Hmm ok this is the problem

fatal: ambiguous argument '@': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Not a valid object name @
/var/discourse/launcher: line 661: [: @: unary operator expected
/var/discourse/launcher: line 671: [: 0998a7c802006dfec5724c030131e7885c3e5d19: unary operator expected
Launcher has diverged source, this is only expected in Dev mode

Can you try just boostrapping the whole app again? Something is odd with your container

./launcher destroy app
./launcher bootstrap app
./launcher start app
1 Like

Then it fails at the bootstrap stage

[basvl@col-be-disc1 ~]$ sudo /var/discourse/launcher bootstrap app
flag provided but not defined: --format
See '/usr/bin/docker-current info --help'.
cd /pups && git pull && /pups/bin/pups --stdin
Already up-to-date.
I, [2017-10-16T08:19:35.558745 #13]  INFO -- : Loading --stdin
I, [2017-10-16T08:19:35.563216 #13]  INFO -- : > mkdir -p /shared/postgres_run
I, [2017-10-16T08:19:35.573677 #13]  INFO -- : 
I, [2017-10-16T08:19:35.573785 #13]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2017-10-16T08:19:35.582649 #13]  INFO -- : 
I, [2017-10-16T08:19:35.582747 #13]  INFO -- : > chmod 775 /shared/postgres_run
I, [2017-10-16T08:19:35.583936 #13]  INFO -- : 
I, [2017-10-16T08:19:35.584037 #13]  INFO -- : > rm -fr /var/run/postgresql
I, [2017-10-16T08:19:35.585820 #13]  INFO -- : 
I, [2017-10-16T08:19:35.585917 #13]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2017-10-16T08:19:35.593895 #13]  INFO -- : 
I, [2017-10-16T08:19:35.593995 #13]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2017/10/16 08:19:35 socat[21] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2017-10-16T08:19:35.621622 #13]  INFO -- : 
I, [2017-10-16T08:19:35.621732 #13]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2017-10-16T08:19:35.623548 #13]  INFO -- : 
I, [2017-10-16T08:19:35.623653 #13]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2017-10-16T08:19:35.625324 #13]  INFO -- : 
I, [2017-10-16T08:19:35.625428 #13]  INFO -- : > mkdir -p /shared/postgres_run/9.5-main.pg_stat_tmp
I, [2017-10-16T08:19:35.626846 #13]  INFO -- : 
I, [2017-10-16T08:19:35.626949 #13]  INFO -- : > chown postgres:postgres /shared/postgres_run/9.5-main.pg_stat_tmp
I, [2017-10-16T08:19:35.628446 #13]  INFO -- : 
I, [2017-10-16T08:19:35.631345 #13]  INFO -- : File > /etc/service/postgres/run  chmod: +x
I, [2017-10-16T08:19:35.634253 #13]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x
I, [2017-10-16T08:19:35.637167 #13]  INFO -- : File > /root/upgrade_postgres  chmod: +x
I, [2017-10-16T08:19:35.637348 #13]  INFO -- : > chown -R root /var/lib/postgresql/9.5/main
I, [2017-10-16T08:19:36.781197 #13]  INFO -- : 
I, [2017-10-16T08:19:36.781311 #13]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/9.5/bin/initdb -D /shared/postgres_data || exit 0
I, [2017-10-16T08:19:36.782913 #13]  INFO -- : 
I, [2017-10-16T08:19:36.782976 #13]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2017-10-16T08:19:36.793463 #13]  INFO -- : 
I, [2017-10-16T08:19:36.793526 #13]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2017-10-16T08:19:36.795045 #13]  INFO -- : 
I, [2017-10-16T08:19:36.795169 #13]  INFO -- : > /root/upgrade_postgres
I, [2017-10-16T08:19:36.798389 #13]  INFO -- : 
I, [2017-10-16T08:19:36.798498 #13]  INFO -- : > rm /root/upgrade_postgres
I, [2017-10-16T08:19:36.799797 #13]  INFO -- : 
I, [2017-10-16T08:19:36.800572 #13]  INFO -- : Replacing data_directory = '/var/lib/postgresql/9.5/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.800984 #13]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.801283 #13]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.801924 #13]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.802542 #13]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.805217 #13]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.805794 #13]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2017-10-16T08:19:36.815935 #13]  INFO -- : 
I, [2017-10-16T08:19:36.816109 #13]  INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.816424 #13]  INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.817525 #13]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.818162 #13]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.818751 #13]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:19:36.827953 #13]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/9.5/main/pg_hba.conf
I, [2017-10-16T08:19:36.828203 #13]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/9.5/main/pg_hba.conf
I, [2017-10-16T08:19:36.828434 #13]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main
I, [2017-10-16T08:19:36.829787 #13]  INFO -- : > sleep 5
2017-10-16 08:19:36.936 UTC [45] LOG:  database system was shut down at 2017-10-16 08:05:38 UTC
2017-10-16 08:19:36.956 UTC [45] LOG:  MultiXact member wraparound protections are now enabled
2017-10-16 08:19:36.958 UTC [42] LOG:  database system is ready to accept connections
2017-10-16 08:19:36.959 UTC [49] LOG:  autovacuum launcher started
I, [2017-10-16T08:19:41.831201 #13]  INFO -- : 
I, [2017-10-16T08:19:41.831397 #13]  INFO -- : > su postgres -c 'createdb discourse' || true
2017-10-16 08:19:42.027 UTC [54] postgres@postgres ERROR:  database "discourse" already exists
2017-10-16 08:19:42.027 UTC [54] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: database creation failed: ERROR:  database "discourse" already exists
I, [2017-10-16T08:19:42.028849 #13]  INFO -- : 
I, [2017-10-16T08:19:42.029026 #13]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2017-10-16 08:19:42.157 UTC [65] postgres@discourse ERROR:  role "discourse" already exists
2017-10-16 08:19:42.157 UTC [65] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2017-10-16T08:19:42.159044 #13]  INFO -- : 
I, [2017-10-16T08:19:42.159235 #13]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2017-10-16T08:19:42.213900 #13]  INFO -- : GRANT

I, [2017-10-16T08:19:42.214044 #13]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2017-10-16T08:19:42.277384 #13]  INFO -- : ALTER SCHEMA

I, [2017-10-16T08:19:42.277522 #13]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2017-10-16T08:19:42.346722 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T08:19:42.346857 #13]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2017-10-16T08:19:42.398764 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T08:19:42.398905 #13]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2017-10-16T08:19:42.457405 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T08:19:42.457554 #13]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2017-10-16T08:19:42.508888 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T08:19:42.509070 #13]  INFO -- : > sudo -u postgres psql discourse
I, [2017-10-16T08:19:42.515476 #13]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2017-10-16T08:19:42.653509 #13]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x
I, [2017-10-16T08:19:42.655281 #13]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod: 
I, [2017-10-16T08:19:42.655368 #13]  INFO -- : > echo postgres installed!
I, [2017-10-16T08:19:42.656578 #13]  INFO -- : postgres installed!

I, [2017-10-16T08:19:42.659486 #13]  INFO -- : File > /etc/service/redis/run  chmod: +x
I, [2017-10-16T08:19:42.662478 #13]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x
I, [2017-10-16T08:19:42.665409 #13]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2017-10-16T08:19:42.665745 #13]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2017-10-16T08:19:42.666023 #13]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2017-10-16T08:19:42.668074 #13]  INFO -- : 
I, [2017-10-16T08:19:42.668238 #13]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2017-10-16T08:19:42.668517 #13]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2017-10-16T08:19:42.669295 #13]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2017-10-16T08:19:42.670479 #13]  INFO -- : > echo redis installed
I, [2017-10-16T08:19:42.671709 #13]  INFO -- : redis installed

I, [2017-10-16T08:19:42.671812 #13]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2017-10-16T08:19:42.674788 #13]  INFO -- : logfile ""

I, [2017-10-16T08:19:42.674902 #13]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2017-10-16T08:19:42.676837 #13]  INFO -- : > sleep 10
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 155
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

155:M 16 Oct 08:19:42.695 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
155:M 16 Oct 08:19:42.695 # Server started, Redis version 3.0.6
155:M 16 Oct 08:19:42.696 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
155:M 16 Oct 08:19:42.696 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
155:M 16 Oct 08:19:42.700 * DB loaded from disk: 0.004 seconds
155:M 16 Oct 08:19:42.700 * The server is now ready to accept connections on port 6379
I, [2017-10-16T08:19:52.678174 #13]  INFO -- : 
I, [2017-10-16T08:19:52.687871 #13]  INFO -- : Replacing <policymap> with <policymap>
  <policy domain="coder" rights="none" pattern="EPHEMERAL" />
  <policy domain="coder" rights="none" pattern="URL" />
  <policy domain="coder" rights="none" pattern="HTTPS" />
  <policy domain="coder" rights="none" pattern="MVG" />
  <policy domain="coder" rights="none" pattern="MSL" />
  <policy domain="coder" rights="none" pattern="TEXT" />
  <policy domain="coder" rights="none" pattern="SHOW" />
  <policy domain="coder" rights="none" pattern="WIN" />
  <policy domain="coder" rights="none" pattern="PLT" />
 in /usr/local/etc/ImageMagick-6/policy.xml
I, [2017-10-16T08:19:52.688240 #13]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
I, [2017-10-16T08:19:52.732690 #13]  INFO -- : 
I, [2017-10-16T08:19:52.732826 #13]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_HOSTNAME"] == "discourse.example.com"; puts "Aborting! Domain is not configured!"; exit 1; end'
I, [2017-10-16T08:19:52.775737 #13]  INFO -- : 
I, [2017-10-16T08:19:52.775872 #13]  INFO -- : > chown -R discourse /home/discourse
I, [2017-10-16T08:19:52.784184 #13]  INFO -- : 
I, [2017-10-16T08:19:52.784284 #13]  INFO -- : > rm -f /etc/cron.d/anacron
I, [2017-10-16T08:19:52.785574 #13]  INFO -- : 
I, [2017-10-16T08:19:52.787281 #13]  INFO -- : File > /etc/cron.d/anacron  chmod: 
I, [2017-10-16T08:19:52.790120 #13]  INFO -- : File > /etc/runit/1.d/copy-env  chmod: +x
I, [2017-10-16T08:19:52.793014 #13]  INFO -- : File > /etc/runit/1.d/enable-brotli  chmod: +x
I, [2017-10-16T08:19:52.795949 #13]  INFO -- : File > /etc/service/unicorn/run  chmod: +x
I, [2017-10-16T08:19:52.798887 #13]  INFO -- : File > /etc/service/nginx/run  chmod: +x
I, [2017-10-16T08:19:52.801795 #13]  INFO -- : File > /etc/runit/3.d/01-nginx  chmod: +x
I, [2017-10-16T08:19:52.804679 #13]  INFO -- : File > /etc/runit/3.d/02-unicorn  chmod: +x
I, [2017-10-16T08:19:52.804780 #13]  INFO -- : Replacing # postgres with sv start postgres || exit 1 in /etc/service/unicorn/run
I, [2017-10-16T08:19:52.804996 #13]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2017-10-16T08:19:52.807691 #13]  INFO -- : > cd /var/www/discourse && git reset --hard
181:M 16 Oct 08:19:52.809 # Creating Server TCP listening socket *:6379: bind: Address already in use
Checking out files: 100% (24608/24608), done.
I, [2017-10-16T08:19:55.896570 #13]  INFO -- : HEAD is now at 4da4f98 FIX: Clicking on quote button was tricky

I, [2017-10-16T08:19:55.896668 #13]  INFO -- : > cd /var/www/discourse && git clean -f
I, [2017-10-16T08:19:56.013158 #13]  INFO -- : 
I, [2017-10-16T08:19:56.013262 #13]  INFO -- : > cd /var/www/discourse && git remote set-branches --add origin master
I, [2017-10-16T08:19:56.016180 #13]  INFO -- : 
I, [2017-10-16T08:19:56.016244 #13]  INFO -- : > cd /var/www/discourse && git pull
From https://github.com/discourse/discourse
   4da4f98..229a10e  master     -> origin/master
   5f0249f..744e061  beta       -> origin/beta
 * [new branch]      jomaxro-patch-1 -> origin/jomaxro-patch-1
   70bb2aa..a8b4255  s3_refactor -> origin/s3_refactor
   834eef7..3fd7f69  stable     -> origin/stable
   4da4f98..229a10e  tests-passed -> origin/tests-passed
 * [new tag]         v1.8.9     -> v1.8.9
 * [new tag]         v1.9.0.beta13 -> v1.9.0.beta13
I, [2017-10-16T08:19:59.239016 #13]  INFO -- : Updating 4da4f98..229a10e
Fast-forward
 .travis.yml                                        |   5 +-
 .../discourse/components/d-editor.js.es6           |   2 +-
 .../discourse/components/topic-list-item.js.es6    |   3 +-
 .../discourse/components/topic-list.js.es6         |   5 +-
 .../components/user-summary-section.js.es6         |   3 +
 .../discourse/components/user-summary-topic.js.es6 |   3 +
 .../components/user-summary-topics-list.js.es6     |  13 ++
 .../discourse/components/user-summary-user.js.es6  |   3 +
 .../discourse/controllers/tags-show.js.es6         |   4 +-
 .../discourse/controllers/user-summary.js.es6      |   8 -
 .../javascripts/discourse/helpers/raw.js.es6       |  24 ++-
 .../discourse/lib/keyboard-shortcuts.js.es6        |   4 +-
 .../javascripts/discourse/models/user.js.es6       |  66 +++----
 .../discourse/raw-views/topic-status.js.es6        |  12 +-
 .../discourse/templates/application.hbs            |   3 +-
 .../templates/components/topic-entrance.hbs        |   2 +-
 .../discourse/templates/components/topic-list.hbs  |  39 ++--
 .../discourse/templates/components/user-stat.hbs   |   6 +-
 .../templates/components/user-summary-section.hbs  |   2 +
 .../templates/components/user-summary-topic.hbs    |   9 +
 .../components/user-summary-topics-list.hbs        |  16 ++
 .../templates/components/user-summary-user.hbs     |   4 +
 .../components/user-summary-users-list.hbs         |   9 +
 .../discourse/templates/discovery/topics.hbs       |  36 ++--
 .../templates/mobile/discovery/topics.hbs          |   1 -
 .../javascripts/discourse/templates/tags/show.hbs  |   1 -
 .../templates/topic-list-header-column.raw.hbs     |   2 +-
 .../discourse/templates/topic-status.raw.hbs       |   1 +
 .../discourse/templates/user/summary.hbs           | 150 +++++----------
 .../discourse/widgets/post-cooked.js.es6           |   5 +-
 .../engines/discourse-markdown/emoji.js.es6        |   2 +
 .../engines/discourse-markdown/quotes.js.es6       |   2 +
 .../javascripts/pretty-text/white-lister.js.es6    |   1 -
 .../stylesheets/common/admin/admin_base.scss       |  24 +--
 app/assets/stylesheets/common/admin/customize.scss |   4 +-
 app/assets/stylesheets/common/admin/flagging.scss  |   8 +-
 .../stylesheets/common/base/_topic-list.scss       |  22 +--
 app/assets/stylesheets/common/base/alert.scss      |   4 +-
 .../stylesheets/common/base/category-list.scss     |   2 +-
 app/assets/stylesheets/common/base/combobox.scss   |   2 +-
 app/assets/stylesheets/common/base/compose.scss    |   8 +-
 app/assets/stylesheets/common/base/directory.scss  |   4 +-
 app/assets/stylesheets/common/base/discourse.scss  |  10 +-
 app/assets/stylesheets/common/base/emoji.scss      |   6 +-
 app/assets/stylesheets/common/base/group.scss      |   4 +-
 app/assets/stylesheets/common/base/groups.scss     |   8 +-
 app/assets/stylesheets/common/base/header.scss     |   2 +-
 app/assets/stylesheets/common/base/history.scss    |   8 +-
 app/assets/stylesheets/common/base/login.scss      |  10 +-
 app/assets/stylesheets/common/base/menu-panel.scss |  16 +-
 app/assets/stylesheets/common/base/modal.scss      |   8 +-
 .../common/base/notifications-button.scss          |   2 +-
 app/assets/stylesheets/common/base/onebox.scss     |   8 +-
 app/assets/stylesheets/common/base/search.scss     |  12 +-
 app/assets/stylesheets/common/base/share_link.scss |   4 +-
 app/assets/stylesheets/common/base/tagging.scss    |  16 +-
 app/assets/stylesheets/common/base/topic-post.scss |  28 +--
 app/assets/stylesheets/common/base/topic.scss      |   4 +-
 .../stylesheets/common/base/user-badges.scss       |   4 +-
 app/assets/stylesheets/common/base/user.scss       |  22 ++-
 .../stylesheets/common/components/badges.scss      |   8 +-
 .../stylesheets/common/components/banner.scss      |   6 +-
 .../stylesheets/common/components/buttons.scss     |   8 +-
 .../common/components/dropdown-select-box.scss     |   4 +-
 .../stylesheets/common/components/hashtag.scss     |   4 +-
 .../stylesheets/common/components/select-box.scss  |   2 +-
 .../stylesheets/common/components/user-info.scss   |   8 +-
 .../common/components/user-stream-item.scss        |   8 +-
 .../stylesheets/common/foundation/helpers.scss     |   2 +-
 .../stylesheets/common/foundation/variables.scss   |  18 +-
 app/assets/stylesheets/common/topic-timeline.scss  |  14 +-
 app/assets/stylesheets/desktop/category-list.scss  |   6 +-
 app/assets/stylesheets/desktop/compose.scss        |  14 +-
 app/assets/stylesheets/desktop/discourse.scss      |  10 +-
 app/assets/stylesheets/desktop/group.scss          |   2 +-
 app/assets/stylesheets/desktop/header.scss         |   4 +-
 .../stylesheets/desktop/latest-topic-list.scss     |   6 +-
 app/assets/stylesheets/desktop/login.scss          |   4 +-
 app/assets/stylesheets/desktop/modal.scss          |   8 +-
 app/assets/stylesheets/desktop/queued-posts.scss   |   2 +-
 app/assets/stylesheets/desktop/topic-list.scss     |  20 +-
 app/assets/stylesheets/desktop/topic-post.scss     |  54 +++---
 app/assets/stylesheets/desktop/topic.scss          |   4 +-
 app/assets/stylesheets/desktop/upload.scss         |   2 +-
 app/assets/stylesheets/desktop/user.scss           |  12 +-
 app/assets/stylesheets/embed.scss                  |   2 +-
 .../mobile/components/user-stream-item.scss        |   2 +-
 app/assets/stylesheets/mobile/compose.scss         |  14 +-
 app/assets/stylesheets/mobile/directory.scss       |   2 +-
 app/assets/stylesheets/mobile/discourse.scss       |   4 +-
 app/assets/stylesheets/mobile/login.scss           |   4 +-
 app/assets/stylesheets/mobile/modal.scss           |   4 +-
 app/assets/stylesheets/mobile/topic-list.scss      |  18 +-
 app/assets/stylesheets/mobile/topic-post.scss      |  28 +--
 app/assets/stylesheets/mobile/topic.scss           |   8 +-
 app/assets/stylesheets/mobile/upload.scss          |   2 +-
 app/controllers/email_controller.rb                |   1 +
 app/controllers/invites_controller.rb              |   4 +-
 app/helpers/application_helper.rb                  |  22 ++-
 app/jobs/base.rb                                   |  39 +---
 app/jobs/regular/download_avatar_from_url.rb       |   2 +-
 app/jobs/regular/process_post.rb                   |   2 +-
 app/jobs/regular/pull_hotlinked_images.rb          |  48 +++--
 app/jobs/scheduled/clean_up_uploads.rb             |   2 +-
 app/models/backup.rb                               |   2 +-
 app/models/global_setting.rb                       |  15 ++
 app/models/invite.rb                               |   2 +-
 app/models/site_setting.rb                         |  42 ++++-
 app/models/topic_link_click.rb                     |   4 +-
 app/models/upload.rb                               |   2 +-
 app/models/user.rb                                 |   2 +-
 app/serializers/admin_user_list_serializer.rb      |   8 +
 app/serializers/user_summary_serializer.rb         |   4 +-
 app/services/user_destroyer.rb                     |   5 +-
 app/views/common/_discourse_javascript.html.erb    |   8 +-
 config/discourse_defaults.conf                     |   9 +
 config/environments/development.rb                 |   3 -
 config/initializers/000-rails-master-polyfills.rb  |   6 -
 config/initializers/005-site_settings.rb           |   4 +-
 .../100-rails3_ar_after_commit_tests.rb            |  23 ---
 config/initializers/100-sidekiq.rb                 |   2 +-
 config/locales/client.ar.yml                       | 203 ++++++++++++---------
 config/locales/client.el.yml                       |   9 +-
 config/locales/client.en.yml                       |  15 +-
 config/locales/client.es.yml                       |  30 ++-
 config/locales/client.fa_IR.yml                    |  24 ++-
 config/locales/client.fi.yml                       |   2 +-
 config/locales/client.it.yml                       |   9 +-
 config/locales/client.nb_NO.yml                    |   5 +-
 config/locales/client.nl.yml                       |  98 +++++++++-
 config/locales/client.uk.yml                       |   2 +-
 config/locales/client.zh_CN.yml                    |   2 +-
 config/locales/server.el.yml                       |   8 +
 config/locales/server.en.yml                       |   2 +-
 config/locales/server.es.yml                       |   8 +-
 config/locales/server.fa_IR.yml                    |  33 +++-
 config/locales/server.fi.yml                       |  37 ++++
 config/locales/server.he.yml                       |   7 +
 config/locales/server.nb_NO.yml                    |   3 +
 config/locales/server.nl.yml                       |   1 +
 config/unicorn.conf.rb                             |   2 +-
 lib/autospec/rspec_runner.rb                       |   8 +-
 lib/cooked_post_processor.rb                       |   2 +-
 lib/discourse.rb                                   |   2 +-
 lib/discourse_redis.rb                             |   2 +-
 lib/email/receiver.rb                              |   7 +
 lib/file_store/s3_store.rb                         |  27 ++-
 lib/final_destination.rb                           |   2 +-
 lib/global_path.rb                                 |   4 +-
 lib/guardian.rb                                    |   6 +-
 lib/import_export/topic_importer.rb                |   2 +-
 lib/pretty_text.rb                                 |   8 +-
 lib/s3_helper.rb                                   | 110 ++++++++---
 lib/scheduler/defer.rb                             |  16 +-
 lib/scheduler/manager.rb                           |  20 +-
 lib/scheduler/schedule_info.rb                     |   4 +-
 lib/scheduler/web.rb                               |   2 +-
 lib/site_setting_extension.rb                      |   6 +-
 lib/tasks/s3.rake                                  | 106 +++++------
 lib/tasks/uploads.rake                             |   8 +-
 lib/version.rb                                     |   2 +-
 .../config/locales/client.da.yml                   |   7 +-
 .../config/locales/server.ar.yml                   |  32 ++--
 .../config/locales/server.cs.yml                   |   2 +-
 .../config/locales/server.da.yml                   |   3 +
 .../config/locales/server.de.yml                   |  40 ++--
 .../config/locales/server.el.yml                   |  40 ++--
 .../config/locales/server.en.yml                   |  40 ++--
 .../config/locales/server.es.yml                   |  40 ++--
 .../config/locales/server.fa_IR.yml                |  26 +--
 .../config/locales/server.fi.yml                   |  40 ++--
 .../config/locales/server.fr.yml                   |  38 ++--
 .../config/locales/server.he.yml                   |  10 +-
 .../config/locales/server.it.yml                   |  42 ++---
 .../config/locales/server.ko.yml                   |  22 +--
 .../config/locales/server.pl_PL.yml                |  38 ++--
 .../config/locales/server.ru.yml                   |  40 ++--
 .../config/locales/server.zh_CN.yml                |  40 ++--
 .../discourse_narrative_bot/new_user_narrative.rb  |   2 +-
 plugins/discourse-narrative-bot/plugin.rb          |  17 --
 .../new_user_narrative_spec.rb                     |   6 +-
 spec/components/email/receiver_spec.rb             |  82 ++++++++-
 spec/components/file_store/s3_store_spec.rb        |   1 +
 spec/components/final_destination_spec.rb          |   1 +
 spec/components/guardian_spec.rb                   |  23 ++-
 spec/components/pretty_text_spec.rb                |  69 ++++---
 spec/components/stylesheet/importer_spec.rb        |   5 +
 spec/components/topic_creator_spec.rb              |   3 +-
 spec/controllers/admin/users_controller_spec.rb    |   2 +
 spec/controllers/invites_controller_spec.rb        |  13 ++
 spec/fixtures/emails/email_reply_like.eml          |  13 ++
 spec/fixtures/emails/email_reply_staged.eml        |  13 ++
 spec/fixtures/emails/no_date.eml                   |  10 +
 spec/helpers/application_helper_spec.rb            |  44 +++++
 spec/integration/watched_words_spec.rb             |   8 +
 spec/models/global_setting_spec.rb                 |  15 ++
 spec/models/invite_spec.rb                         |   8 +
 spec/models/post_action_spec.rb                    | 114 +++++++-----
 spec/models/post_analyzer_spec.rb                  |   4 +
 spec/models/post_spec.rb                           |   4 +
 spec/models/topic_link_click_spec.rb               |   3 +
 spec/multisite/jobs.rb                             |  31 ++++
 spec/rails_helper.rb                               |  44 +++++
 spec/requests/email_controller_spec.rb             |  13 ++
 spec/services/user_destroyer_spec.rb               |   7 +
 test/javascripts/acceptance/user-test.js.es6       |  15 +-
 test/javascripts/helpers/create-pretender.js.es6   |  18 +-
 207 files changed, 1982 insertions(+), 1225 deletions(-)
 create mode 100644 app/assets/javascripts/discourse/components/user-summary-section.js.es6
 create mode 100644 app/assets/javascripts/discourse/components/user-summary-topic.js.es6
 create mode 100644 app/assets/javascripts/discourse/components/user-summary-topics-list.js.es6
 create mode 100644 app/assets/javascripts/discourse/components/user-summary-user.js.es6
 create mode 100644 app/assets/javascripts/discourse/templates/components/user-summary-section.hbs
 create mode 100644 app/assets/javascripts/discourse/templates/components/user-summary-topic.hbs
 create mode 100644 app/assets/javascripts/discourse/templates/components/user-summary-topics-list.hbs
 create mode 100644 app/assets/javascripts/discourse/templates/components/user-summary-user.hbs
 create mode 100644 app/assets/javascripts/discourse/templates/components/user-summary-users-list.hbs
 delete mode 100644 config/initializers/000-rails-master-polyfills.rb
 delete mode 100644 config/initializers/100-rails3_ar_after_commit_tests.rb
 create mode 100644 spec/fixtures/emails/email_reply_like.eml
 create mode 100644 spec/fixtures/emails/email_reply_staged.eml
 create mode 100644 spec/fixtures/emails/no_date.eml
 create mode 100644 spec/multisite/jobs.rb
 create mode 100644 spec/requests/email_controller_spec.rb

I, [2017-10-16T08:19:59.239142 #13]  INFO -- : > cd /var/www/discourse && git fetch origin beta
From https://github.com/discourse/discourse
 * branch            beta       -> FETCH_HEAD
I, [2017-10-16T08:20:00.899722 #13]  INFO -- : 
I, [2017-10-16T08:20:00.899824 #13]  INFO -- : > cd /var/www/discourse && git checkout beta
Switched to a new branch 'beta'
I, [2017-10-16T08:20:01.135270 #13]  INFO -- : Branch beta set up to track remote branch beta from origin.

I, [2017-10-16T08:20:01.135363 #13]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/pids
I, [2017-10-16T08:20:01.137911 #13]  INFO -- : 
I, [2017-10-16T08:20:01.137976 #13]  INFO -- : > cd /var/www/discourse && mkdir -p tmp/sockets
I, [2017-10-16T08:20:01.139984 #13]  INFO -- : 
I, [2017-10-16T08:20:01.140047 #13]  INFO -- : > cd /var/www/discourse && touch tmp/.gitkeep
I, [2017-10-16T08:20:01.141825 #13]  INFO -- : 
I, [2017-10-16T08:20:01.141890 #13]  INFO -- : > cd /var/www/discourse && mkdir -p                    /shared/log/rails
I, [2017-10-16T08:20:01.143852 #13]  INFO -- : 
I, [2017-10-16T08:20:01.143916 #13]  INFO -- : > cd /var/www/discourse && bash -c "touch -a           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log"
I, [2017-10-16T08:20:01.146840 #13]  INFO -- : 
I, [2017-10-16T08:20:01.146905 #13]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log /var/www/discourse/log"
I, [2017-10-16T08:20:01.149872 #13]  INFO -- : 
I, [2017-10-16T08:20:01.149936 #13]  INFO -- : > cd /var/www/discourse && bash -c "mkdir -p           /shared/{uploads,backups}"
I, [2017-10-16T08:20:01.153250 #13]  INFO -- : 
I, [2017-10-16T08:20:01.153308 #13]  INFO -- : > cd /var/www/discourse && bash -c "ln    -s           /shared/{uploads,backups} /var/www/discourse/public"
I, [2017-10-16T08:20:01.156344 #13]  INFO -- : 
I, [2017-10-16T08:20:01.156403 #13]  INFO -- : > cd /var/www/discourse && chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups
I, [2017-10-16T08:20:01.158924 #13]  INFO -- : 
I, [2017-10-16T08:20:01.159040 #13]  INFO -- : Replacing # redis with sv start redis || exit 1 in /etc/service/unicorn/run
I, [2017-10-16T08:20:01.159310 #13]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/discourse/docker_manager.git
Cloning into 'docker_manager'...
I, [2017-10-16T08:20:04.083260 #13]  INFO -- : 
I, [2017-10-16T08:20:04.083486 #13]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2017-10-16T08:20:04.085705 #13]  INFO -- : 
I, [2017-10-16T08:20:04.085773 #13]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2017-10-16T08:20:04.087127 #13]  INFO -- : 
I, [2017-10-16T08:20:04.087188 #13]  INFO -- : > mkdir -p /var/nginx/cache
I, [2017-10-16T08:20:04.088706 #13]  INFO -- : 
I, [2017-10-16T08:20:04.088816 #13]  INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2017-10-16T08:20:04.089048 #13]  INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf
I, [2017-10-16T08:20:04.089288 #13]  INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2017-10-16T08:20:04.089883 #13]  INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf
I, [2017-10-16T08:20:04.090402 #13]  INFO -- : > echo "done configuring web"
I, [2017-10-16T08:20:04.091664 #13]  INFO -- : done configuring web

I, [2017-10-16T08:20:04.091817 #13]  INFO -- : > cd /var/www/discourse && gem update bundler
I, [2017-10-16T08:20:07.371667 #13]  INFO -- : Updating installed gems
Nothing to update

I, [2017-10-16T08:20:07.371774 #13]  INFO -- : > cd /var/www/discourse && chown -R discourse /var/www/discourse
chown: cannot access '/var/www/discourse/config/initializers/000-rails-master-polyfills.rb': No such file or directory
chown: cannot access '/var/www/discourse/config/initializers/100-rails3_ar_after_commit_tests.rb': No such file or directory
I, [2017-10-16T08:20:24.031214 #13]  INFO -- : 
I, [2017-10-16T08:20:24.031506 #13]  INFO -- : Terminating async processes
I, [2017-10-16T08:20:24.031546 #13]  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/9.5/bin/postmaster -D /etc/postgresql/9.5/main pid: 42
I, [2017-10-16T08:20:24.031586 #13]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 155
2017-10-16 08:20:24.031 UTC [42] LOG:  received fast shutdown request
2017-10-16 08:20:24.031 UTC [42] LOG:  aborting any active transactions
2017-10-16 08:20:24.032 UTC [49] LOG:  autovacuum launcher shutting down
155:signal-handler (1508142024) Received SIGTERM scheduling shutdown...
2017-10-16 08:20:24.034 UTC [46] LOG:  shutting down
2017-10-16 08:20:24.040 UTC [46] LOG:  database system is shut down
155:M 16 Oct 08:20:24.056 # User requested shutdown...
155:M 16 Oct 08:20:24.056 * Saving the final RDB snapshot before exiting.
155:M 16 Oct 08:20:24.062 * DB saved on disk
155:M 16 Oct 08:20:24.062 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && chown -R discourse /var/www/discourse failed with return #<Process::Status: pid 268 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem update bundler", "chown -R discourse $home"]}
564dc6ba6662fc46b22d048e0fad256269950c276dd67935b051847c1ddc035b
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

What does your app.yml look like? Please censor all the credentials before posting it here.

Current result with a copy of the stock yml taken from https://github.com/discourse/discourse_docker/blob/master/samples/standalone.yml

[basvl@col-be-disc1 ~]$ cat /var/discourse/containers/app.yml
## this is the all-in-one, standalone Discourse Docker container template
##
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
##
## BE *VERY* CAREFUL WHEN EDITING!
## YAML FILES ARE SUPER SUPER SENSITIVE TO MISTAKES IN WHITESPACE OR ALIGNMENT!
## visit http://www.yamllint.com/ to validate this file as needed

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  #- "templates/web.ssl.template.yml"
  #- "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "80:80"   # http
  - "443:443" # https

params:
  db_default_text_search_config: "pg_catalog.english"

  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can override
  #db_shared_buffers: "256MB"

  ## can improve sorting performance, but adds memory usage per-connection
  #db_work_mem: "40MB"

  ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed

env:
  LANG: en_US.UTF-8
  # DISCOURSE_DEFAULT_LOCALE: en

  ## How many concurrent web requests are supported? Depends on memory and CPU cores.
  ## will be set automatically by bootstrap based on detected CPUs, or you can override
  #UNICORN_WORKERS: 3

  ## TODO: The domain name this Discourse instance will respond to
  DISCOURSE_HOSTNAME: 'discourse.example.com'

  ## Uncomment if you want the container to be started with the same
  ## hostname (-h option) as specified above (default "$hostname-$config")
  #DOCKER_USE_HOSTNAME: true

  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: 'me@example.com,you@example.com'

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  DISCOURSE_SMTP_ADDRESS: smtp.example.com         # required
  #DISCOURSE_SMTP_PORT: 587                        # (optional, default 587)
  #DISCOURSE_SMTP_USER_NAME: user@example.com      # required
  #DISCOURSE_SMTP_PASSWORD: pa$$word               # required, WARNING the char '#' in pw can cause problems!
  #DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate
  #LETSENCRYPT_ACCOUNT_EMAIL: me@example.com

  ## The CDN address for this Discourse instance (configured to pull)
  ## see https://meta.discourse.org/t/14857 for details
  #DISCOURSE_CDN_URL: //discourse-cdn.example.com

## The Docker container is stateless; all data is stored in /shared
volumes:
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git

## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  #- exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "End of custom commands"
[basvl@col-be-disc1 ~]$ sudo /var/discourse/launcher rebuild app
flag provided but not defined: --format
See '/usr/bin/docker-current info --help'.
Ensuring launcher is up to date
Fetching origin
fatal: ambiguous argument '@': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Not a valid object name @
/var/discourse/launcher: line 661: [: @: unary operator expected
/var/discourse/launcher: line 671: [: 0998a7c802006dfec5724c030131e7885c3e5d19: unary operator expected
Launcher has diverged source, this is only expected in Dev mode
cd /pups && git pull && /pups/bin/pups --stdin
Already up-to-date.
I, [2017-10-16T08:28:42.924690 #13]  INFO -- : Loading --stdin
I, [2017-10-16T08:28:42.929403 #13]  INFO -- : > mkdir -p /shared/postgres_run
I, [2017-10-16T08:28:42.931734 #13]  INFO -- : 
I, [2017-10-16T08:28:42.931857 #13]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2017-10-16T08:28:42.933682 #13]  INFO -- : 
I, [2017-10-16T08:28:42.933792 #13]  INFO -- : > chmod 775 /shared/postgres_run
I, [2017-10-16T08:28:42.935004 #13]  INFO -- : 
I, [2017-10-16T08:28:42.935126 #13]  INFO -- : > rm -fr /var/run/postgresql
I, [2017-10-16T08:28:42.936419 #13]  INFO -- : 
I, [2017-10-16T08:28:42.936525 #13]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2017-10-16T08:28:42.937765 #13]  INFO -- : 
I, [2017-10-16T08:28:42.937874 #13]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2017/10/16 08:28:42 socat[21] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2017-10-16T08:28:42.940643 #13]  INFO -- : 
I, [2017-10-16T08:28:42.940742 #13]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2017-10-16T08:28:42.942443 #13]  INFO -- : 
I, [2017-10-16T08:28:42.942552 #13]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2017-10-16T08:28:42.944306 #13]  INFO -- : 
I, [2017-10-16T08:28:42.944411 #13]  INFO -- : > mkdir -p /shared/postgres_run/9.5-main.pg_stat_tmp
I, [2017-10-16T08:28:42.945852 #13]  INFO -- : 
I, [2017-10-16T08:28:42.945959 #13]  INFO -- : > chown postgres:postgres /shared/postgres_run/9.5-main.pg_stat_tmp
I, [2017-10-16T08:28:42.947495 #13]  INFO -- : 
I, [2017-10-16T08:28:42.950636 #13]  INFO -- : File > /etc/service/postgres/run  chmod: +x
I, [2017-10-16T08:28:42.953753 #13]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x
I, [2017-10-16T08:28:42.956750 #13]  INFO -- : File > /root/upgrade_postgres  chmod: +x
I, [2017-10-16T08:28:42.956940 #13]  INFO -- : > chown -R root /var/lib/postgresql/9.5/main
I, [2017-10-16T08:28:43.842032 #13]  INFO -- : 
I, [2017-10-16T08:28:43.842156 #13]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/9.5/bin/initdb -D /shared/postgres_data || exit 0
I, [2017-10-16T08:28:43.843784 #13]  INFO -- : 
I, [2017-10-16T08:28:43.843848 #13]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2017-10-16T08:28:43.854135 #13]  INFO -- : 
I, [2017-10-16T08:28:43.854202 #13]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2017-10-16T08:28:43.855790 #13]  INFO -- : 
I, [2017-10-16T08:28:43.855906 #13]  INFO -- : > /root/upgrade_postgres
I, [2017-10-16T08:28:43.859063 #13]  INFO -- : 
I, [2017-10-16T08:28:43.859187 #13]  INFO -- : > rm /root/upgrade_postgres
I, [2017-10-16T08:28:43.860467 #13]  INFO -- : 
I, [2017-10-16T08:28:43.860659 #13]  INFO -- : Replacing data_directory = '/var/lib/postgresql/9.5/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.861068 #13]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.861346 #13]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.861953 #13]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.862530 #13]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.864797 #13]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.865343 #13]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2017-10-16T08:28:43.867374 #13]  INFO -- : 
I, [2017-10-16T08:28:43.867524 #13]  INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.867777 #13]  INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.868786 #13]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.869362 #13]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.869933 #13]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/9.5/main/postgresql.conf
I, [2017-10-16T08:28:43.870979 #13]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/9.5/main/pg_hba.conf
I, [2017-10-16T08:28:43.871221 #13]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/9.5/main/pg_hba.conf
I, [2017-10-16T08:28:43.871434 #13]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main
I, [2017-10-16T08:28:43.873268 #13]  INFO -- : > sleep 5
2017-10-16 08:28:43.904 UTC [45] LOG:  database system was shut down at 2017-10-16 08:27:23 UTC
2017-10-16 08:28:43.905 UTC [45] LOG:  MultiXact member wraparound protections are now enabled
2017-10-16 08:28:43.907 UTC [42] LOG:  database system is ready to accept connections
2017-10-16 08:28:43.908 UTC [49] LOG:  autovacuum launcher started
I, [2017-10-16T08:28:48.880241 #13]  INFO -- : 
I, [2017-10-16T08:28:48.880426 #13]  INFO -- : > su postgres -c 'createdb discourse' || true
2017-10-16 08:28:48.928 UTC [54] postgres@postgres ERROR:  database "discourse" already exists
2017-10-16 08:28:48.928 UTC [54] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: database creation failed: ERROR:  database "discourse" already exists
I, [2017-10-16T08:28:48.929701 #13]  INFO -- : 
I, [2017-10-16T08:28:48.929851 #13]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2017-10-16 08:28:48.981 UTC [65] postgres@discourse ERROR:  role "discourse" already exists
2017-10-16 08:28:48.981 UTC [65] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2017-10-16T08:28:48.982981 #13]  INFO -- : 
I, [2017-10-16T08:28:48.983154 #13]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2017-10-16T08:28:49.034945 #13]  INFO -- : GRANT

I, [2017-10-16T08:28:49.035077 #13]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2017-10-16T08:28:49.089544 #13]  INFO -- : ALTER SCHEMA

I, [2017-10-16T08:28:49.089683 #13]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2017-10-16T08:28:49.141551 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T08:28:49.141661 #13]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2017-10-16T08:28:49.191648 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T08:28:49.191769 #13]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2017-10-16T08:28:49.241823 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T08:28:49.241940 #13]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2017-10-16T08:28:49.291794 #13]  INFO -- : CREATE EXTENSION

I, [2017-10-16T08:28:49.291955 #13]  INFO -- : > sudo -u postgres psql discourse
I, [2017-10-16T08:28:49.295177 #13]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2017-10-16T08:28:49.346655 #13]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x
I, [2017-10-16T08:28:49.348417 #13]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod: 
I, [2017-10-16T08:28:49.348502 #13]  INFO -- : > echo postgres installed!
I, [2017-10-16T08:28:49.349683 #13]  INFO -- : postgres installed!

I, [2017-10-16T08:28:49.352595 #13]  INFO -- : File > /etc/service/redis/run  chmod: +x
I, [2017-10-16T08:28:49.355549 #13]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x
I, [2017-10-16T08:28:49.355673 #13]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2017-10-16T08:28:49.355991 #13]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2017-10-16T08:28:49.356248 #13]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2017-10-16T08:28:49.358248 #13]  INFO -- : 
I, [2017-10-16T08:28:49.358456 #13]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2017-10-16T08:28:49.358735 #13]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2017-10-16T08:28:49.359461 #13]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2017-10-16T08:28:49.364222 #13]  INFO -- : > echo redis installed
I, [2017-10-16T08:28:49.365471 #13]  INFO -- : redis installed

I, [2017-10-16T08:28:49.365573 #13]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2017-10-16T08:28:49.368473 #13]  INFO -- : logfile ""

I, [2017-10-16T08:28:49.368592 #13]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2017-10-16T08:28:49.371238 #13]  INFO -- : > sleep 10
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 3.0.6 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 155
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

155:M 16 Oct 08:28:49.373 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
155:M 16 Oct 08:28:49.373 # Server started, Redis version 3.0.6
155:M 16 Oct 08:28:49.373 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
155:M 16 Oct 08:28:49.373 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
155:M 16 Oct 08:28:49.378 * DB loaded from disk: 0.005 seconds
155:M 16 Oct 08:28:49.378 * The server is now ready to accept connections on port 6379
I, [2017-10-16T08:28:59.378316 #13]  INFO -- : 
I, [2017-10-16T08:28:59.378546 #13]  INFO -- : Replacing <policymap> with <policymap>
  <policy domain="coder" rights="none" pattern="EPHEMERAL" />
  <policy domain="coder" rights="none" pattern="URL" />
  <policy domain="coder" rights="none" pattern="HTTPS" />
  <policy domain="coder" rights="none" pattern="MVG" />
  <policy domain="coder" rights="none" pattern="MSL" />
  <policy domain="coder" rights="none" pattern="TEXT" />
  <policy domain="coder" rights="none" pattern="SHOW" />
  <policy domain="coder" rights="none" pattern="WIN" />
  <policy domain="coder" rights="none" pattern="PLT" />
 in /usr/local/etc/ImageMagick-6/policy.xml
I, [2017-10-16T08:28:59.379034 #13]  INFO -- : > /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end'
155:signal-handler (1508142539) Received SIGTERM scheduling shutdown...
I, [2017-10-16T08:28:59.439299 #13]  INFO -- : Aborting! Mail is not configured!

I, [2017-10-16T08:28:59.439532 #13]  INFO -- : Terminating async processes
I, [2017-10-16T08:28:59.439571 #13]  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/9.5/bin/postmaster -D /etc/postgresql/9.5/main pid: 42
I, [2017-10-16T08:28:59.439608 #13]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 155
2017-10-16 08:28:59.439 UTC [42] LOG:  received fast shutdown request
2017-10-16 08:28:59.439 UTC [42] LOG:  aborting any active transactions
2017-10-16 08:28:59.441 UTC [49] LOG:  autovacuum launcher shutting down
2017-10-16 08:28:59.443 UTC [46] LOG:  shutting down
2017-10-16 08:28:59.450 UTC [46] LOG:  database system is shut down
155:M 16 Oct 08:28:59.489 # User requested shutdown...
155:M 16 Oct 08:28:59.489 * Saving the final RDB snapshot before exiting.
155:M 16 Oct 08:28:59.497 * DB saved on disk
155:M 16 Oct 08:28:59.497 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: /usr/local/bin/ruby -e 'if ENV["DISCOURSE_SMTP_ADDRESS"] == "smtp.example.com"; puts "Aborting! Mail is not configured!"; exit 1; end' failed with return #<Process::Status: pid 160 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params "/usr/local/bin/ruby -e 'if ENV[\"DISCOURSE_SMTP_ADDRESS\"] == \"smtp.example.com\"; puts \"Aborting! Mail is not configured!\"; exit 1; end'"
fda424a946e9215f6b2eb03c39cece31e21c55fcde55501419f4916fc4da8560
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Note: before this I did use a heavily edited app.yml to get some private plugins working. Should I still post that one?

Related question: Iā€™m still in the setup/test phase, there is not a lot of vital content in the container. Is it prudent to just delete everything and start over?

If you donā€™t have alot of important content, you can just start another container. To preserve the previous data, just name your new yaml file app2.yml or something different.

Iā€™m still getting the ā€œfatal: ambiguous argument ā€˜@ā€™: unknown revision or path not in the working tree.ā€ error.

Just copied app.yml (which is a direct copy paste from source) to app2.yml and rebuilt.

[basvl@col-be-disc1 ~]$ sudo cp /var/discourse/containers/app.yml /var/discourse/containers/app2.yml
[basvl@col-be-disc1 ~]$ sudo /var/discourse/launcher rebuild app2
flag provided but not defined: --format
See '/usr/bin/docker-current info --help'.
Ensuring launcher is up to date
Fetching origin
fatal: ambiguous argument '@': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Not a valid object name @
/var/discourse/launcher: line 661: [: @: unary operator expected
/var/discourse/launcher: line 671: [: 0998a7c802006dfec5724c030131e7885c3e5d19: unary operator expected
Launcher has diverged source, this is only expected in Dev mode
cd /pups && git pull && /pups/bin/pups --stdin
Already up-to-date.
I, [2017-10-16T09:34:56.460892 #13]  INFO -- : Loading --stdin
I, [2017-10-16T09:34:56.465682 #13]  INFO -- : > mkdir -p /shared/postgres_run

(....)

** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Hmm something is definitely off with your launcher as I was able to use launcher just fine on one of my test siteā€¦ If you donā€™t need any of the data, I suggest that you nuke the /var/discourse directory and follow the setup again. If you need to retain the data, just take a backup of /var/discourse/shared.

2 Likes