nextcloud / nextcloud/updater

Update failed with `core/shipped.json is not available`

Open
#131 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug feature: deletion hotspot: shipped.json mode: web robustness 💪
Dominant language
PHP
Stars
51
Forks
40
Avg merge
2d 19h
Merged PRs (30d)
3

Description

Hi,

so I finally get some time to get new version, but update failed (again :)).

  1. Start updater
  2. Updater failed with gateway timeout from nginx (need to tune that)
  3. I push retry - it said step 7 is still running
  4. I wait a while until I get endsep of 7, I pushed retry again
  5. Ended here :)

Here is the log:

2017-08-15T20:09:55+0000 uilDzvyw2l [info] POST request for step "6"
2017-08-15T20:09:55+0000 uilDzvyw2l [info] startStep("6")
2017-08-15T20:09:55+0000 uilDzvyw2l [info] extractDownload()
2017-08-15T20:09:55+0000 uilDzvyw2l [info] storage location: /var/www/owncloud/data/updater-ocn0mgjslvwm/downloads/
2017-08-15T20:10:50+0000 uilDzvyw2l [info] end of extractDownload()
2017-08-15T20:10:50+0000 uilDzvyw2l [info] endStep("6")
2017-08-15T20:11:07+0000 45vb4zxvXO [info] request to updater
2017-08-15T20:11:07+0000 45vb4zxvXO [info] currentStep()
2017-08-15T20:11:07+0000 45vb4zxvXO [info] Step 6 is in state "end".
2017-08-15T20:11:07+0000 45vb4zxvXO [info] POST request for step "7"
2017-08-15T20:11:07+0000 45vb4zxvXO [info] startStep("7")
2017-08-15T20:11:07+0000 45vb4zxvXO [info] replaceEntryPoints()
2017-08-15T20:11:07+0000 45vb4zxvXO [info] replace index.php
2017-08-15T20:11:07+0000 45vb4zxvXO [info] replace status.php
2017-08-15T20:11:07+0000 45vb4zxvXO [info] replace remote.php
2017-08-15T20:11:07+0000 45vb4zxvXO [info] replace public.php
2017-08-15T20:11:07+0000 45vb4zxvXO [info] replace ocs/v1.php
2017-08-15T20:11:07+0000 45vb4zxvXO [info] replace ocs/v2.php
2017-08-15T20:11:07+0000 45vb4zxvXO [info] end of replaceEntryPoints()
2017-08-15T20:11:07+0000 45vb4zxvXO [info] endStep("7")
2017-08-15T20:11:24+0000 GZpjXPNiuX [info] request to updater
2017-08-15T20:11:24+0000 GZpjXPNiuX [info] currentStep()
2017-08-15T20:11:24+0000 GZpjXPNiuX [info] Step 7 is in state "end".
2017-08-15T20:11:24+0000 GZpjXPNiuX [info] POST request for step "8"
2017-08-15T20:11:25+0000 GZpjXPNiuX [info] startStep("8")
2017-08-15T20:11:44+0000 GZpjXPNiuX [info] deleteOldFiles()
2017-08-15T20:11:48+0000 GZpjXPNiuX [info] config sample exists
2017-08-15T20:11:48+0000 GZpjXPNiuX [info] thmes README exists
2017-08-15T20:12:57+0000 KHPcY5KwSk [info] request to updater
2017-08-15T20:12:57+0000 KHPcY5KwSk [info] currentStep()
2017-08-15T20:12:57+0000 KHPcY5KwSk [info] Step 8 is in state "start".
2017-08-15T20:13:01+0000 GZpjXPNiuX [info] end of deleteOldFiles()
2017-08-15T20:13:01+0000 GZpjXPNiuX [info] endStep("8")
2017-08-15T20:13:06+0000 hqmFdHuUot [info] request to updater
2017-08-15T20:13:06+0000 hqmFdHuUot [info] currentStep()
2017-08-15T20:13:06+0000 hqmFdHuUot [info] Step 8 is in state "end".
2017-08-15T20:13:06+0000 hqmFdHuUot [info] POST request for step "8"
2017-08-15T20:13:06+0000 hqmFdHuUot [info] startStep("8")
2017-08-15T20:13:06+0000 hqmFdHuUot [info] deleteOldFiles()
2017-08-15T20:13:06+0000 hqmFdHuUot [error] POST request failed with other exception
2017-08-15T20:13:06+0000 hqmFdHuUot [error] Exception: Exception
Message: core/shipped.json is not available
Code:0
Trace:
#0 /var/www/owncloud/updater/index.php(1138): Updater->deleteOldFiles()
#1 {main}
File:/var/www/owncloud/updater/index.php
Line:703

2017-08-15T20:13:06+0000 hqmFdHuUot [info] rollbackChanges("8")

But file is here: /owncloud/data/updater-ocn0mgjslvwm/backups/nextcloud-11.0.4.1/core.

Files in /var/www listed (don't worry about rights, it's running in docker container):

total 44
drwxr-xr-x  7 6662 6662 4096 Aug 15 22:13 .
drwxrwxr-x  3 root root 4096 Dec 11  2016 ..
drwxr-xr-x 11 6662 6662 4096 Aug 15 22:11 apps
drwxrwxr-x  2 6662 6662 4096 Aug 15 22:11 config
drwxr-xr-x  2 6662 6662 4096 Oct  4  2016 data
-rw-r--r--  1 6662 6662   57 Aug 15 22:11 index.php
-rw-r--r--  1 6662 6662   57 Aug 15 22:11 public.php
-rw-r--r--  1 6662 6662   57 Aug 15 22:11 remote.php
-rw-r--r--  1 6662 6662   57 Aug 15 22:11 status.php
drwxr-xr-x  2 6662 6662 4096 Aug 15 22:11 themes
drwxr-xr-x  2 6662 6662 4096 Mar  4 11:39 updater

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in updater/index.php at deleteOldFiles(), around line 703, and trace how the updater resolves core/shipped.json during step 8 and rollback. Compare that lookup with the reported backup path; done means the retry path handles this state without raising the missing-file exception or rolling back the update.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
devops, release
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.