-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OC 6.04 -> 7.0.0 upgrade fails with "Failed to upgrade "files_sharing"" #9810
Comments
I believe this might have to do with the activity app:
This bug was reported multiple times on Twitter and the forum. @karlitschek @nickvergessen |
this one is of interest as well |
in addition: the upgrade procedure is triggered by a webdav request - we should not do this from my understanding |
@DeepDiver1975 it shouldn't, I explicitly disabled that in |
you are right - sorry for the noise |
Experienced this too, and server is now down (though just a non-crucial test server). Will this/can this be fixed with a patch, or is there a manual method of correction? |
@PVince81 and webdav does upgrade apps:
|
@PVince81 looks like core migration is finished but not the app upgrade |
I think it might be explained as follows: normally the update itself consists of "core update" and "apps update". In the case of @HackintoshHD it seems the "core update" went through but not "apps update". |
can this duplicate key be caused by multiple updateApp() calls in parallel? @polaris20 @HackintoshHD please ensure that no webdav client is connected during upgrade - hopefully this helps - THX |
Hmmm... I suppose that could happen, yes. We can probably prevent app upgrades as well when the original call comes from remote.php, cron.php and only allow them to run over then web UI. But this means version checking needs to be done early because it might be more risky to "jump out" of the app loading code at a later stage with an exception. I'll make a ticket to continue this discussion. |
good point - thx |
Here it is: #9817 |
@DeepDiver1975 The ownCloud instance for which I reported the issue above is no longer in maintenance mode and now reports its version number as "7.0.0", so I can't re-run the upgrade (the only way to do that now would involve going back to my 6.0.4 backup and the corresponding MySQL dump, what I'd rather avoid as this is a productive system). |
@polaris20 @HackintoshHD @Grobwiefein @RobBentley did you all have the I've posted a patch in #9817 that should prevent setting the version to Let me have a quick look at the logs posted here. Do you all have similar entries ? |
@PVince81 It was the files_sharing update issue I had for sure. As per the other thread, if someone can point me in the direction of a new tar thats patched, i'll give the upgrade a whirl again. |
From reading the log I understand how the PROPFIND sneaked in to update the activity app in parallel to the regular update. The second row with Let's look further. |
I have the same upgrade issue, server is now down. SIDENOTE: Not sure where to address this, but is OC 7.0 considered stable, or some sort of testing build? Seems a ton of issues have popped up this morning, more than should be there for a stable build. |
Still, the |
I got something similar. The updgrade was a success but this was in my owncloud.log after the upgrade
Edit: reformatted stack trace |
Interesting, seems like it tries to create the key a second time. I guess thats due to some migrations issue? And I guess activity app is the first one (alphabetic order) in most cases so that's why it's reported the most. |
I have reformatted the log from @HackintoshHD for better readability here:
|
I went back to my ownCloud 6.0.4 backup, extracted the ownCloud 7.0.0 files and tested @PVince81 's patch from tracker issue #9817:
Result: Now the upgrade went through flawlessly. I have to say I stopped all ownCloud Desktop Clients from running this time, so admittedly, it may not have been exactly the test you had ask for. |
@PVince81 Could you still anonymise the two names at |
Removed the names |
I tried simulating the broken situation locally:
The remote.php calls were blocked by the maintenance mode. @HackintoshHD do you think there is any possibility that maybe the PHP process could not write the |
@dyioulos , I am unsure what your issue could be, perhaps @PVince81 could shed some light on this? I (and several others) are in the same boat as you in not having backups, to be honest, it is a bit easy to skip it when you do an upgrade of OC from a package manager as you are not going out and looking for an OC upgrade; however, that is not an excuse as there really is not one for creating a backup! |
@dradux Thank you, it worked for me ! I'll script the backup of my owncloud.db as soon as tonite ;-) |
I experienced the same error message. Obviously with other reasons. I have the PosgreSQL DB backend in use. I fixed the upgrade process with these commands in psql: postgres=# \c owncloud |
I also had the problem, coming from 6.0.2 to 7.0.1. The patch could not be applied (2 rejected hunks). I fixed it afterwards by the described method exporting, droping, reimporting the shares. |
Is this patch supposed to work in 7.0.1 or is it built into it perhaps? |
The patch #9819 should be in 7.0.1 already. |
@schiesbn any idea what could go wrong if |
Same problem from 6.0.2.2 to 7.0.1. Ubuntu server (installation of owncloud by apt-get install owncloud), using sqlite: fails upgrading files_sharing. I still don't know what to do... Any help? |
Most importantly it would be good to know whether the entry "Upgrading files_sharing" appears TWICE for you in the log. If you only see that message ONCE, then it is likely to be a different issue. If you didn't experience a timeout issue, then we'll need to look at your logs and/or DB to find out what kind of situation lead to having the files_sharing app's migration fail. Note: the upgrade code for the files_sharing app is mostly converting the old "Shared" folder to the new structure that allows for flexible / freely movable shared files/folders. Hope this helps a bit. |
With "for you" I meant, all you guys in the thread, especially the ones who said "me too", so please check 😄 |
I've got no "Upgrading..." messages at all in my owncloud.log, but I have loglevel 0, so it might be due to that. Or there's a log location I don't know of. |
@McNetic hmmm log level 0 is DEBUG so you should see such messages in owncloud.log, like in the first post #9810 (comment) But this would only happen during the first upgrade try. If the apps were already upgraded, even with an error, it might not try to upgrade again the second time you try. (just guessing) |
Ok, sorry. I grepped for "Upgrading files_sharing", which is different from what was posted above. I took a closer look, and found I also don't have messages like above (containing "starting app upgrade"). Maybe because I came from 6.0.2.
That's the only message containing "files_sharing" in the log. I suppose this is maybe a different issue than mentioned above. I got this message only once per try to upgrade (went back with db backup several times). |
Any more luck with 7.0.3 ? |
No problem with the upgrade (from 7.0.1). But I made sure to have a full backup first :) |
Has this still been observed when upgrading from OC 6 to OC 7.0.4 ? |
Anyone still having issues with this ? (Upgrading from OC 6 to OC 7.0.4) |
Nope. I did the upgrade few weeks ago, it works. |
Thanks a lot. If anyone is still having issues with 7.0.5 or 8.0.2, feel free to reopen. |
The upgrade of an ownCloud 6.0.4 instance to ownCloud 7.0.0 fails with the error message "Failed to upgrade 'files_sharing'":
This had obviously already been reported here five days before the OC7 release.
From the instance's owncloud.log:
The text was updated successfully, but these errors were encountered: