Skip to content

Critical changes for developers & admins for Nextcloud 21 #23210

Description

@ChristophWurst

Continuation of #20953

Front-end

tbd

Deprecated global variables

  • tbd

Backend

Removed from public namespace:

Removed from private namespace:

Deprecations

Deprecations of Events & Hooks

Deprecated event names Use instead this typed event (in Nextcloud 21 onwards) Pull request
\OC\User::postCreateUser OCP\User\Events\CreateUserEvent #23901
\OC\SubAdmin::postCreateSubAdmin OCP\Group\Events\SubAdminAddedEvent #23765
OC_SubAdmin::post_createSubAdmin (was removed) OCP\Group\Events\SubAdminAddedEvent #23765
\OC\SubAdmin::postDeleteSubAdmin OCP\Group\Events\SubAdminRemovedEvent #23765
OC_SubAdmin::post_deleteSubAdmin (was removed) OCP\Group\Events\SubAdminRemovedEvent #23765
OC_Group::pre_createGroup (was removed) OCP\Group\Events\BeforeGroupCreatedEvent (since NC 17) #24041
OC_User::post_createGroup (was removed) OCP\Group\Events\GroupCreatedEvent (since NC 17) #24041
OC_Group::pre_deleteGroup (was removed) OCP\Group\Events\BeforeGroupDeletedEvent (since NC 17) #24041
OC_User::post_deleteGroup (was removed) OCP\Group\Events\GroupDeletedEvent (since NC 17) #24041
OC_Group::pre_addToGroup (was removed) OCP\Group\Events\BeforeUserAddedEvent (since NC 17) #24041
OC_Group::post_addToGroup (was removed) OCP\Group\Events\UserAddedEvent (since NC 17) #24041
\OC\User::preCreateUser OCP\User\Events\BeforeUserCreatedEvent (since NC18) #24319
OC_User::pre_createUser OCP\User\Events\BeforeUserCreatedEvent (since NC18) #24319
\OC\User::postCreateUser OCP\User\Events\UserCreatedEvent (since NC18) #24319
OC_User::post_createUser OCP\User\Events\UserCreatedEvent (since NC18) #24319
\OC\User::preDelete OCP\User\Events\BeforeUserDeletedEvent (since NC18) #24319
OC_User::pre_deleteUser OCP\User\Events\BeforeUserDeletedEvent (since NC18) #24319
\OC\User::postDelete OCP\User\Events\UserDeletedEvent (since NC18) #24319
OC_User::post_deleteUser OCP\User\Events\UserDeletedEvent (since NC18) #24319
OCP\Files\Cache\CacheInsertEvent OCP\Files\Cache\CacheEntryInsertedEvent #24113
OCP\Files\Cache\CacheUpdateEvent OCP\Files\Cache\CacheEntryUpdatedEvent #24113

Behavorial changes

  • filesystem is now not initialized anymore by default Do not setup the default FS on normal routes #23821 - this has only impact on file system access that is NOT done via the public Node API but only for access via private API (nevertheless stating here for visibility)

Activity

  1. changed the title [-]Critical changes for developers & admins for Nextcloud 20[/-] [+]Critical changes for developers & admins for Nextcloud 21[/+] on Oct 6, 2020
  2. pinned this issue on Nov 13, 2020
  3. b-pfl commented on Mar 6, 2021

    @b-pfl

    What about the discontinued support of MySQL 5.7? This seems to be an essential one, but users are rather left alone with this issue. Why has this support been dropped and what has changed so that 5.7 cannot be used any longer?

  4. nickvergessen commented on Mar 6, 2021

    @nickvergessen
    Member

    The library we use for database interaction (Doctrine/DBAL) dropped support for MySQL 5.7
    Not sure what you mean by left alone. You see a warning on Nextcloud 20 about it, and hitting any search engine with "mysql update 5.7 to 8.0" brings up guides in all kind of languages.

  5. ChristophWurst commented on Mar 8, 2021

    @ChristophWurst
    MemberAuthor

    Also has we had to learn the hard way there are some ugly bugs in mysql 5.7 that they only fixed for 8.x and later nextcloud/mail#4412

  6. b-pfl commented on Mar 8, 2021

    @b-pfl

    The library we use for database interaction (Doctrine/DBAL) dropped support for MySQL 5.7
    Not sure what you mean by left alone. You see a warning on Nextcloud 20 about it, and hitting any search engine with "mysql update 5.7 to 8.0" brings up guides in all kind of languages.

    Regarding being left alone: If you do not use your own (virtual) server, you can only use those services that your provider offers. While this obviously applies mainly to smaller installations, I guess this affects many private Nextcloud users.
    I do not have a full overview but can at least share some insights: Quite a few smaller hosting companies use Plesk to offer services to their customers. Plesk only started very recently to allow switching to MySQL 8 (and the process to do so related to their platform is not well-documented). As you can expect, it may therefore take a while until these hosting platforms will be upgraded to MySQL 8. Similarly, I just double-checked with one of my own accounts at 1&1 Ionos (which is still one of the largest providers in Germany): At least in my services package, they only allow the creation of MySQL 5.7 databases. It seems that the same for instance applies to Strato and netcup. This means that all these users are either forced to switch to running their own server, switch providers, or wait until their provider may be chance offer MySQL 8. Until then, they are forced to stay with NC 20, which only will receive updates until this fall.
    Luckily I am running my own server, but due to potential side effects and multiple services running, I also did not try to upgrade MySQL and, thus, am stuck at NC20.

  7. nickvergessen commented on Mar 24, 2021

    @nickvergessen
    Member

    Until then, they are forced to stay with NC 20, which only will receive updates until this fall.

    This should be a long enough time period.

  8. unpinned this issue on Apr 1, 2021
  9. nickvergessen commented on Apr 6, 2021

    @nickvergessen
    Member

    22 TIcket at #26407

  10. cesarizu commented on Apr 10, 2021

    @cesarizu

    @nickvergessen I checked dbal's documentation and saw no mention of mysql 5.7 deprecation. Can you point us where this information is? Version 3 (current version) seems to support versions 5 and up. Nextcloud code seems to be using MySqlPlatform which is for verion 5 and up and not MySql57Platform or MySql80Platform which are specific for newer versions. See:

    https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/platforms.html

    On another note, for example Godaddy and Dreamhost, and a lot of other hosting companies only support mysql 5.5 and 5.7 but not 8.0. Is there anything that blocks mysql 5.7 from working?

  11. ChristophWurst commented on Apr 12, 2021

    @ChristophWurst
    MemberAuthor

    In Mail we recently had lots of trouble with MySQL 5.7 as the DB started to seemingly reuse deleted primary key and then some dangling pointers pointed to unrelated data rows. Turns out only MySQL8 fixed that.

  12. b-pfl commented on Apr 13, 2021

    @b-pfl

    Until then, they are forced to stay with NC 20, which only will receive updates until this fall.

    This should be a long enough time period.

    @nickvergessen I think you underestimate how slow many providers are!

  13. b-pfl commented on Apr 13, 2021

    @b-pfl

    @nickvergessen There seems to be a dangerous issue right now: It seems that the updater on a MySQL 5.7 instance automatically tries to upgrade from NC 20.0.8 directly to NC 21.0.1 (instead of 20.0.9) without any warning (see #26472). So in case MySQL 5.7 is not supported by NC21, this should clearly not happen (see also #26470).

    In Mail we recently had lots of trouble with MySQL 5.7 as the DB started to seemingly reuse deleted primary key and then some dangling pointers pointed to unrelated data rows. Turns out only MySQL8 fixed that.

    @ChristophWurst so is the Mail app the only problematic app?

  14. ChristophWurst commented on Apr 13, 2021

    @ChristophWurst
    MemberAuthor

    @ChristophWurst so is the Mail app the only problematic app?

    No, the same problem affects any other application.

  15. b-pfl commented on Apr 13, 2021

    @b-pfl

    @ChristophWurst so is the Mail app the only problematic app?

    No, the same problem affects any other application.

    Any idea how / if we could fix the MySQL issues? As mentioned above and confirmed by @cesarizu it would really help people if we can continue using MySQL 5.7 beyond September 2021.

  16. bjoernv commented on Apr 13, 2021

    @bjoernv

    @ChristophWurst, does this mean, that all Mail apps in NC <= 20 are broken, if NC is used with MySQL <= 5.7 or does the issues with MySQL <= 5.7 only apply for recent Mail apps used in NC >= 21?

    I read about this re-using issue of AUTO_INCREMENT primary keys in MySQL 5.7. This happens when the MySQL server is re-started, because the AUTO_INCREMENT offset is only stored in memory in MySQL <= 5.7.

  17. ChristophWurst commented on Apr 14, 2021

    @ChristophWurst
    MemberAuthor

    it happens with any version of nextcloud or mail as you research confirms.

  18. nook24 commented on Oct 28, 2021

    @nook24

    I'm sorry to heat this up again. I installed Nextcloud 22 using Docker yesterday and I connected it to a central MySQL server, which is still MySQL 5.7. To be honest, the behavior/bug of the primary keys is the same since 2003, so this should not be a big surprise for any one: https://stackoverflow.com/a/18692168/11885414

    So far my Nextcloud is running fine and i do not use the mail app. Is it safe to run my Nextcloud setup with MySQL 5.7 for now? I will update to MySQL 8, hopefully in Q1 2022.
    Bildschirmfoto 2021-10-28 um 08 48 36

  19. bluikko commented on Feb 17, 2022

    @bluikko

    Good to hear that NC 22 seems to work with MySQL 5.7 if not using mail or other special apps. I am sure I am not alone having a shared MySQL cluster where several apps do not support 8.0 yet - so I could not upgrade MySQL to 8.0 just because of NC 22.
    For me NC 21 has also been fine with 5.7 so far. What about NC23?
    @nook24 please do report back if you find something broken when using 5.7.
    To be honest it sounds like a copout to point to autoinc columns behavior in pre-8.0 - why would you have rows with foreign keys that point to deleted rows in the first place?

    Edit: almost 1 year later we're still no closer to upgrade MySQL cluster to 8.0. We are now running NC 22 which of course no longer gets updates and are looking at updating to NC 23 (which also already no updates). There have been some reports that seem to indicate NC 23 in a very basic use will work with MySQL 5.7 so will test this soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions