Skip to content
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

Update nextcloud to v16 #972

Closed
kyrofa opened this issue Apr 25, 2019 · 35 comments
Closed

Update nextcloud to v16 #972

kyrofa opened this issue Apr 25, 2019 · 35 comments

Comments

@kyrofa
Copy link
Member

kyrofa commented Apr 25, 2019

No description provided.

kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Apr 25, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Apr 25, 2019
Also make sure occ is always called with the non-interactive flag to
ensure it doesn't prompt (v16 started doing so when trying to enable
maintenance mode before nextcloud is installed).

Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Apr 25, 2019
Also make sure occ is always called with the non-interactive flag to
ensure it doesn't prompt (v16 started doing so when trying to enable
maintenance mode before nextcloud is installed).

Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Apr 27, 2019
Also make sure occ is always called with the non-interactive flag to
ensure it doesn't prompt (v16 started doing so when trying to enable
maintenance mode before nextcloud is installed).

The tests started failing in Trusty/Xenial against webkit, so also move
tests over to use Chrome in headless mode.

Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Apr 28, 2019
Also make sure occ is always called with the non-interactive flag to
ensure it doesn't prompt (v16 started doing so when trying to enable
maintenance mode before nextcloud is installed).

The tests started failing in Trusty/Xenial against webkit, so also move
tests over to use Chrome in headless mode.

Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Apr 28, 2019
Also make sure occ is always called with the non-interactive flag to
ensure it doesn't prompt (v16 started doing so when trying to enable
maintenance mode before nextcloud is installed).

The tests started failing in Trusty/Xenial against webkit, so also move
tests over to use Chrome in headless mode.

Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Apr 29, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue May 3, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue May 16, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue May 17, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue May 17, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue May 17, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@kyrofa
Copy link
Member Author

kyrofa commented May 23, 2019

We haven't updated yet since core apps don't yet support v16. We're holding out for that. If you want to upgrade ahead of when we believe it's ready for everyone, use the 16/candidate channel:

$ sudo snap refresh nextcloud --channel=16/candidate

kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Jun 7, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@Flobin
Copy link

Flobin commented Jun 27, 2019

Just out of curiosity (and sorry if this is not the proper place to ask): which core apps are not supported in v16?

And thank you for all your hard work, @kyrofa!

@robwent
Copy link

robwent commented Jun 27, 2019

I'm curious about this too since the latest post about the new text app :)

@kyrofa
Copy link
Member Author

kyrofa commented Jun 27, 2019

End-to-end encryption, specifically: nextcloud/end_to_end_encryption#108. We don't want to put people in the situation of using highly-hyped core features only to force upgrades upon them that disables it. We're all about stability, here! If you want to upgrade to v16 before we roll it out for everyone you certainly can!

@robwent
Copy link

robwent commented Jun 27, 2019

Is that specifically the app 'Default encryption module'?
When I was looking for the text app that was one of the 3 that are disabled on my install.
So I should be good to go?

@kyrofa
Copy link
Member Author

kyrofa commented Jun 27, 2019

So I should be good to go?

I offer no promises in a non-stable channel, but if it's working for you, go for it!

@robwent
Copy link

robwent commented Jun 27, 2019

I'm just trying to understand if I have end-to-end encryption enabled as I see no app with that name.
If it's the default encryption module then when I check the details it says it can't be installed as I don't have server-side encryption enabled (It's off).
If that's the case, can I update without the issue you linked to?

@the-sane
Copy link

@robwent I believe it's specifically the end-to-end encryption app, which is not installed by default. The app's page lists it as an alpha and it is listed as "in testing phase" on the nextcloud website here.

@robwent
Copy link

robwent commented Jun 27, 2019

@the-sane thanks.
I'm going for it...

@kyrofa
Copy link
Member Author

kyrofa commented Jun 27, 2019

@robwent if you run into issues you're a simple sudo snap revert nextcloud away from safety!

@robwent
Copy link

robwent commented Jun 27, 2019

Well, that was easy :)

Version Cloud 16.0.1

Weirdly, the text folder in /extra-apps/ seemed to get deleted after the refresh but others I had previously installed are still there like notes and unsplash.
I now see a download and install button when I look in the apps area though and it installed without any issue.

Created a new text file in a folder and get the new editor.

Happy days.

Thank you @kyrofa @the-sane

@kyrofa
Copy link
Member Author

kyrofa commented Jun 27, 2019

Very good, @robwent. Keep an eye on when v16 is released to stable so you can refresh back (otherwise you won't get v17 when it comes out): sudo snap refresh --stable nextcloud

@robwent
Copy link

robwent commented Jun 27, 2019

Noted, thanks @kyrofa

kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Jul 9, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Jul 10, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@kyrofa
Copy link
Member Author

kyrofa commented Jul 15, 2019

Even in 16.0.3, the calendar app is disabled upon upgrade. Still working on this. This comment still applies though, i.e. if you want to upgrade ahead of when we believe v16 is ready for everyone, use the 16/candidate channel:

$ sudo snap refresh nextcloud --channel=16/candidate

@kyrofa
Copy link
Member Author

kyrofa commented Jul 23, 2019

Just so folks know, we're no longer considering end to end encryption in our tests. We're blocked on nextcloud/server#15416 landing and being backported to v16 for the calendar app specifically (though it will fix other things as well).

@Flobin
Copy link

Flobin commented Jul 23, 2019

Just so folks know, we're no longer considering end to end encryption in our tests.

Any particular reason why? Just curious.

@kyrofa
Copy link
Member Author

kyrofa commented Jul 23, 2019

Any particular reason why? Just curious.

Because they've made it pretty clear that it's too early-stage to be considered an important feature, regardless of how much it was hyped. We can't block releases on stuff like that.

kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Jul 23, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Aug 15, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@kyrofa
Copy link
Member Author

kyrofa commented Aug 15, 2019

Update: just waiting on this PR to land (and be released): nextcloud/server#16753 . No other known blocking issues at this time.

kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Aug 16, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Aug 16, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Sep 6, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@Flaburgan
Copy link

I see the PR you were talking about has been merged and you did the bump to 16.0.4, is there anything else missing to push that as the new stable? I'm eagerly waiting for it as the email app is deeply broken on 15.x and they said they will not update it on that version.

@kyrofa
Copy link
Member Author

kyrofa commented Sep 12, 2019

@Flaburgan in the above comment I referenced nextcloud/server#16753. It has landed, but we're still waiting for it to be released. If you take a look you'll see that it's on the 16.0.5 milestone, so now we're holding out for that release.

@the-sane
Copy link

https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule

next version
16.0.5 (2019-09-26)

@robwent
Copy link

robwent commented Sep 13, 2019

Just to note. I just tried going back to the stable version and get an error message when I try to access the site:

Downgrading is not supported and is likely to cause unpredictable issues (from 16.0.4.1 to 15.0.11.1)
And when trying sudo snap refresh nextcloud --channel=16/candidate again I get service unavailable when trying to access the site.

Update: used sudo snap refresh nextcloud --channel=16/beta and it's running again.

The reason I tried to downgrade was that I saw a message about needing to finish off an update when I tried to log in and a button to start the update. When I pressed it it started spinning but didn't seem to do anything and showed no logs. Opening another window just showed the same update message.

@kyrofa
Copy link
Member Author

kyrofa commented Sep 13, 2019

Indeed, upstream Nextcloud doesn't support downgrading. You can't refresh down major versions, you can only revert (thus picking up the database as it was in the old version).

@robwent
Copy link

robwent commented Sep 13, 2019

@robwent if you run into issues you're a simple sudo snap revert nextcloud away from safety!

I feel I was missold lol.

All good now anyway, I assume when the 16 snap is available I will still be able to move to the latest stable?

@kyrofa
Copy link
Member Author

kyrofa commented Sep 13, 2019

@robwent sorry, let me clarify. There are two operations to consider in this scenario: a refresh, and revert. I said you were a simple revert away, and you refreshed, which is not the same.

Snaps (this is universal, not unique to the Nextcloud snap) have unique revisions in the store. Let's say you're currently on revision X. When you refresh (update), you fetch the most recent revision in that chanel (let's call it Y) and the following happens:

  1. The data for X is copied and put into place for Y. This includes the database, SSL certs, pretty much everything except Nextcloud's raw data (it's too large to copy, thus it's stored elsewhere).
  2. Y is mounted into place and given access to its data, which is really a copy of X's data, and its services are fired up.

Importantly, X's data is still there, just not being used (snap data is held for three revisions).

Anyway, let's say X was v15, and Y was v16. When its services were fired up, it noticed that it needed to upgrade, so it did, running database migrations and whatnot, thus making the database not backward compatible with v15.

Now if you run snap refresh nextcloud --channel=one-with-v15-in-it, let's call it revision Z, snapd will go through this same process, making a copy of revision Y's data for revision Z and firing Z up. Well, Z knows it's v15 and has no idea what to do with your database, thus the error you saw.

What I said to do is run some rendition of snap revert, which would have moved you from revision Y back to revision X. This means you stop using revision Y's data and pick up revision X's data where you left off. That means you lose any data in Y's database (contacts added, apps enabled, etc.). Typically that's most useful if you upgraded to v16, immediately realized that it was broken, and ran snap revert. You've now been running v16 for quite a while, I suspect the data loss that comes with a revert would upset you at this point. You can still do it if snap list nextcloud --all still shows a v15 snap there by running sudo snap revert nextcloud --revision=<the 15 one>, but again, you'll lose any database modifications that you made while using v16.

Note however that you will not lose any raw data modifications you made though (files uploaded/deleted etc.), as again, those aren't stored in a revision-specific area.

@robwent
Copy link

robwent commented Sep 13, 2019

Thanks for the excellent explanation!

I did actually try revert originally and that's what gave me the error message. Probably a good thing though as going back to the snapshot of the install 2 months ago might have been worse.
I'm guessing that going to the beta made whatever changes were needed to the database that I was getting prompted to do when trying to log in.

@kyrofa
Copy link
Member Author

kyrofa commented Sep 13, 2019

Alright, glad that resolved things.

I assume when the 16 snap is available I will still be able to move to the latest stable?

Indeed, when this issue is closed and snap info nextcloud shows v16 in the stable channel, run sudo snap refresh --stable nextcloud. You'll upgrade to the stable release, and also start tracking the stable channel. Note that you will also be able to use 16/stable if you prefer not to upgrade to v17 when it comes out.

kyrofa added a commit to kyrofa/nextcloud-snap that referenced this issue Sep 26, 2019
Resolve nextcloud-snap#972

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@kyrofa kyrofa closed this as completed in 764be49 Sep 27, 2019
@kyrofa
Copy link
Member Author

kyrofa commented Sep 28, 2019

Thanks to everyone who participated in the discussion, helped getting this done, and was generally very patient with the slow progress here. I know I for one remember the issue number by heart now 😉 . I'm pleased to say that 16.0.5snap1 is now in the stable channel and is rolling out to everyone.

@kyrofa
Copy link
Member Author

kyrofa commented Sep 28, 2019

By the way, if you've been hanging on 16/candidate, you have two options:

  1. Refresh to 16/stable. Use this channel if you want to get all the v16 updates, but not automatically update to v17. I hope you've seen how seriously we take breakage and trust that an automatic update to v17 will probably not break you, but this is a perfectly valid option if you want major version updates to be under your control (e.g. by refreshing to 17/stable on your own terms).
  2. Refresh to stable. Use this channel if you want to stay on the latest stable (stable in the snap sense, not in the Nextcloud sense, obviously) release. This will update you to v17 when it comes around.

The command to do that is:

$ sudo snap refresh nextcloud --channel=<channel>

@Flaburgan
Copy link

Thank you for your work here. Upgraded to the 16 version was smooth, and I now have access to Mail v17 instead of 11! Thank you very much.

@robwent
Copy link

robwent commented Sep 30, 2019

I did a sudo snap refresh --stable nextcloud and everything seems fine.

Thanks for all the info about how this works!

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

No branches or pull requests

5 participants