# Our Discourse instance failed to (manually) upgrade

**URL:** https://meta.discourse.org/t/our-discourse-instance-failed-to-manually-upgrade/102372
**Category:** Bug
**Created:** [11월 20, 2018, 10:12오전 UTC](https://meta.discourse.org/t/our-discourse-instance-failed-to-manually-upgrade/102372 "2018-11-20T10:12:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Zas666](https://avatars.discourse-cdn.com/v4/letter/z/258eb7/32.png) [@Zas666](https://meta.discourse.org/u/Zas666)
#### Post date: [11월 20, 2018, 10:12오전 UTC](https://meta.discourse.org/t/our-discourse-instance-failed-to-manually-upgrade/102372/1 "2018-11-20T10:12:45Z")

</div>

we have a discourse instance ([https://community.metabrainz.org/](https://community.metabrainz.org/)) with 3 containers setup (web, data, redis), and two days ago a manual upgrade was required, which is quite usual.  
But, and that’s unusual, it went bad.

This is the log output after running `./launcher rebuild web`:

```
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
/var/www/discourse/lib/migration/safe_migrate.rb:50:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.0/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
I, [2018-11-18T14:09:52.795384 #14] INFO -- : == 20180916195601 MigrateS3BackupSiteSettings: migrating ======================
-- execute("UPDATE site_settings\nSET name = 'backup_location',\n data_type = 7,\n value = 's3'\nWHERE name = 'enable_s3_backups' AND value = 't';\n")
   -> 0.0011s
-- execute("DELETE\nFROM site_settings\nWHERE name = 'enable_s3_backups';\n")
   -> 0.0004s
== 20180916195601 MigrateS3BackupSiteSettings: migrated (0.1247s) =============

== 20180927135248 CreateJavascriptCaches: migrating ===========================
-- create_table(:javascript_caches)
   -> 0.4579s
== 20180927135248 CreateJavascriptCaches: migrated (0.4604s) ==================

== 20181005084357 AddSsoProviderSecretsToSiteSettings: migrating ==============
-- execute("INSERT INTO site_settings(name, data_type, value, created_at, updated_at)\n VALUES ('sso_provider_secrets', 8, '*|\#@hHBok|9ZU\"]~Ht&>Y`G9dr({t3aSm:BTH~`9dCRdH.h['1W@e|E_Z8;Dpt&+:', now(), now())")

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 272 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
a150000d63dcb771f37f434b7833b909a782748ed7c3cd047228d7adbab0af2e
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one

```

I changed a bit the sso\_provider\_secrets value (it’s a secret…) but punctuation is displayed as it was logged, likely related to [FEATURE: allow multiple secrets for Discourse SSO provider · discourse/discourse@27e732a · GitHub](https://github.com/discourse/discourse/commit/27e732a58d92b051ce36ca6886a119581c335a59)

We went back to previous working version (v2.2.0.beta3 +4), which is currently running.

This issue blocks any further upgrade, which is annoying 😉

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [11월 20, 2018, 10:35오전 UTC](https://meta.discourse.org/t/our-discourse-instance-failed-to-manually-upgrade/102372/2 "2018-11-20T10:35:32Z")

</div>

@maja can you have a look? We should properly escape this value 😉

---

<div class="post-metadata">

### Author: ![maja](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maja/32/129533_2.png) [@maja](https://meta.discourse.org/u/maja)
#### Post date: [11월 20, 2018, 3:50오후 UTC](https://meta.discourse.org/t/our-discourse-instance-failed-to-manually-upgrade/102372/4 "2018-11-20T15:50:13Z")

</div>

I have added a fix  
[https://github.com/discourse/discourse/commit/592f8c163727e43c2c4fc1da6a844314ce33ed0c](https://github.com/discourse/discourse/commit/592f8c163727e43c2c4fc1da6a844314ce33ed0c)

Can you try to upgrade again?

---

<div class="post-metadata">

### Author: ![Zas666](https://avatars.discourse-cdn.com/v4/letter/z/258eb7/32.png) [@Zas666](https://meta.discourse.org/u/Zas666)
#### Post date: [11월 20, 2018, 6:12오후 UTC](https://meta.discourse.org/t/our-discourse-instance-failed-to-manually-upgrade/102372/5 "2018-11-20T18:12:46Z")

</div>

> [@maja](#):
>
> Can you try to upgrade again?

Yes, it was it, upgrade went smoothly.  
Thanks 👍

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [11월 20, 2018, 6:23오후 UTC](https://meta.discourse.org/t/our-discourse-instance-failed-to-manually-upgrade/102372/6 "2018-11-20T18:23:50Z")

</div>


