Server: Re-enable disabled »Official« apps during update

Created on 28 Jun 2016  Â·  14Comments  Â·  Source: nextcloud/server

So we had this issue come up several times and it’s still annoying. Every time even a tiny small update comes, basically all apps are disabled. This is especially annoying for the apps we purportedly support like Calendar, Contacts, Mail.

These, or »Official« apps, or »shipped« or however we solve it – should not be disabled. That’s a stupid update mechanism which requires people to do bullshit work in enabling them again step-by-step. If an app breaks the instance then it’s also probably gonna do that when you enable it again.

@karlitschek @LukasReschke

bug install and update high

Most helpful comment

Just a side note:

what happens? It just doesn’t work, or does it also break the server?

This is incorrect. if you enable the app via app management it checks if the server is still up. Otherwise we have an additional route that allows to disable the app again. See owncloud/core#17435

The only way to avoid this is that we are 1000% sure that every app only used public APIs and that this public APIs are 1000% stable. We had plenty of cases where this was not the case -> full data lose for users

That is the reason why we implemented the above mentioned stuff.

The only thing missing is that the update screen should just do that. Try to enable the app and if it fails directly disable it again.

Refs: owncloud/core#18312 owncloud/core#14754

All 14 comments

let me explain again. In the past we didn't disable this apps. And if an app is not compatible with the new server version the complete sever is broken and not recoverable. The only option to bring back such a server is to manually change a value in the database which is nothing a norma user can do. So this means killed all the data of all users.
Because of that we decided to better be on the safe side and disable all apps that are not shipped aka fully tested.
I understand that is is annoying to enabling them manually. But we we enable them automatically then there is the an X% chance to kill user data.
The only way to avoid this is that we are 1000% sure that every app only used public APIs and that this public APIs are 1000% stable. We had plenty of cases where this was not the case -> full data lose for users

@karlitschek says that apps can make the server broken and not recoverable without database editing, but how does the timing of when an app is enabled affect that?

@karlitschek sure, I know that. And I’m not saying we should do that for all apps. But at least for Calendar and Contacts (maybe Mail) of which we say on the website that they are supported we should make an effort to coordinate.

Also as I asked above: If an app is disabled and incompatible, and I then enable it … what happens? It just doesn’t work, or does it also break the server? I. e. what’s the difference, when the server is still broken?

@jancborchardt I agree. The real fix is to do a full compatibility check first. there where some prove of concepts. but nothing is ready

Just a side note:

what happens? It just doesn’t work, or does it also break the server?

This is incorrect. if you enable the app via app management it checks if the server is still up. Otherwise we have an additional route that allows to disable the app again. See owncloud/core#17435

The only way to avoid this is that we are 1000% sure that every app only used public APIs and that this public APIs are 1000% stable. We had plenty of cases where this was not the case -> full data lose for users

That is the reason why we implemented the above mentioned stuff.

The only thing missing is that the update screen should just do that. Try to enable the app and if it fails directly disable it again.

Refs: owncloud/core#18312 owncloud/core#14754

@jancborchardt - Maybe rename the OP to "Re-enable disabled official apps..."? Not all official apps should be enabled by default at install time, but when they are, they should be updated and re-enabled like any other shipped app.

It should be doable to make app enabling automatically rollback in case of error (enable the app in a db transaction, only commit after we've verified that we still live)

Clearly something for 11 ... backporting can be discussed, when this is implemented

Won't make it into 11 -> moving to 12

Since the new two-factor authentication is implemented via a module, this is also disabled after each and every update. Very annoying and weakens that quite a bit.

Re-enabling shouldn't be restricted to official apps, but any previously enabled (and compatible) app should be handled.
Maybe an occ command to disable unoffical apps if things fail is a good idea.

This is fixed in master aka 12.0.0 if PHP >= 7.0 is used.

I'm still getting apps disabled every time there's an update, claiming they're incompatible, but then I go to apps to re-enable them, and they say nothing about being incompatible.

@melikyuksel please create a new issue. This one has been closed 3 years ago. I'm sure your issue is not related to this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mama21mama picture mama21mama  Â·  3Comments

williambargent picture williambargent  Â·  3Comments

Django-BOfH picture Django-BOfH  Â·  3Comments

ThomasLeister picture ThomasLeister  Â·  3Comments

MorrisJobke picture MorrisJobke  Â·  3Comments