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

nextcloud19: init at 19.0.0 #89427

Merged
merged 2 commits into from Jun 20, 2020
Merged

nextcloud19: init at 19.0.0 #89427

merged 2 commits into from Jun 20, 2020

Conversation

@Ma27
Copy link
Member

Ma27 commented Jun 3, 2020

Motivation for this change

https://nextcloud.com/blog/nextcloud-hub-brings-productivity-to-home-office/

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@samueldr
Copy link
Member

samueldr commented Jun 3, 2020

The wording of the warnings looks alright. Though I will not test as I am not using Nextcloud in the end.

@bachp
Copy link
Member

bachp commented Jun 3, 2020

@Ma27 When I to access a file after the upgrade a get an error:

\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Message\":\"filesystem not setup\"

Running systemctl restart phpfpm-nextcloud.service seems to fix the issue.

@Ma27
Copy link
Member Author

Ma27 commented Jun 4, 2020

That's interesting. I experienced a similar behavior, but (wrongly) assumed that I screwed up my initial upgrade attempt.

In my case, Nextcloud reported that The files of the app [all apps in /var/lib/nextcloud/apps] were not replaced correctly and I also managed to fix this by restarting phpfpm.

Before merging this, we should at least find the cause for issue.

@ajs124
Copy link
Member

ajs124 commented Jun 4, 2020

We've also been observing weird issues with nextcloud where restarting phpfpm-nextcloud helps. For now, I've added the configured nextcloud package and some php stuff as a restartTrigger to it, as a workaround.

@bachp
Copy link
Member

bachp commented Jun 4, 2020

@ajs124 I was also thinking if adding package to the restart trigger would be the safest option.

@Ma27
Copy link
Member Author

Ma27 commented Jun 4, 2020

Sounds reasonable. I'd like to investigate the why before that though :)

Ma27 added a commit to Ma27/nixpkgs that referenced this pull request Jun 11, 2020
Enhance the heuristics to make sure that a user doesn't accidentally
upgrade across two major versions of Nextcloud (e.g. from v17 to v19).

The original idea/discussion has been documented in the nixpkgs manual[1].

This includes the following changes:

* `nextcloud19` will be selected automatically when having a stateVersion
  greater or equal than 20.09. For existing setups, the package has to
  be selected manually to avoid accidental upgrades.

* When using `nextcloud18` or older, a warning will be thrown which recommends
  upgrading to `nextcloud19`.

* Added a brief paragraph about `nextcloud19` in the NixOS 19.09 release
  notes.

* Restart `phpfpm` if the Nextcloud-package (`cfg.package`) changes[2].

[1] https://nixos.org/nixos/manual/index.html#module-services-nextcloud-maintainer-info
[2] NixOS#89427 (comment)
@Ma27 Ma27 force-pushed the Ma27:nextcloud19 branch from 44d2aa1 to fa0c3a4 Jun 11, 2020
@Ma27
Copy link
Member Author

Ma27 commented Jun 11, 2020

I managed to reproduce the issue in a minimal NixOS container using the configs from nixos/tests/nextcloud/basic.nix. Unfortunately I didn't find the culprit (neither in the code nor in the issue-tracker), but @ajs124's suggestion seems reasonable and fixed the issue in my local test environment.

I assume that most of the people hosting Nextcloud somewhere else are probably restarting these services anyways and didn't notice this.

Ma27 added a commit to Ma27/nixpkgs that referenced this pull request Jun 16, 2020
Enhance the heuristics to make sure that a user doesn't accidentally
upgrade across two major versions of Nextcloud (e.g. from v17 to v19).

The original idea/discussion has been documented in the nixpkgs manual[1].

This includes the following changes:

* `nextcloud19` will be selected automatically when having a stateVersion
  greater or equal than 20.09. For existing setups, the package has to
  be selected manually to avoid accidental upgrades.

* When using `nextcloud18` or older, a warning will be thrown which recommends
  upgrading to `nextcloud19`.

* Added a brief paragraph about `nextcloud19` in the NixOS 19.09 release
  notes.

* Restart `phpfpm` if the Nextcloud-package (`cfg.package`) changes[2].

[1] https://nixos.org/nixos/manual/index.html#module-services-nextcloud-maintainer-info
[2] NixOS#89427 (comment)
@Ma27 Ma27 force-pushed the Ma27:nextcloud19 branch from fa0c3a4 to 05a2ae3 Jun 16, 2020
@Ma27
Copy link
Member Author

Ma27 commented Jun 16, 2020

Rebased the patches onto latest master to resolve the merge-conflict in the release-notes.

@Ma27
Copy link
Member Author

Ma27 commented Jun 16, 2020

@ajs124 @bachp can you have another look? I'd merge this in a few days otherwise :)

@bachp
bachp approved these changes Jun 17, 2020
Copy link
Member

bachp left a comment

Still works with the updated MR.

Ma27 added a commit to Ma27/nixpkgs that referenced this pull request Jun 19, 2020
Enhance the heuristics to make sure that a user doesn't accidentally
upgrade across two major versions of Nextcloud (e.g. from v17 to v19).

The original idea/discussion has been documented in the nixpkgs manual[1].

This includes the following changes:

* `nextcloud19` will be selected automatically when having a stateVersion
  greater or equal than 20.09. For existing setups, the package has to
  be selected manually to avoid accidental upgrades.

* When using `nextcloud18` or older, a warning will be thrown which recommends
  upgrading to `nextcloud19`.

* Added a brief paragraph about `nextcloud19` in the NixOS 19.09 release
  notes.

* Restart `phpfpm` if the Nextcloud-package (`cfg.package`) changes[2].

[1] https://nixos.org/nixos/manual/index.html#module-services-nextcloud-maintainer-info
[2] NixOS#89427 (comment)
@Ma27 Ma27 force-pushed the Ma27:nextcloud19 branch from 05a2ae3 to cc454cd Jun 19, 2020
@Ma27
Copy link
Member Author

Ma27 commented Jun 19, 2020

Rebased onto master to resolve the merge-conflict. Anything else tbd or is this mergeable now?

@ofborg ofborg bot requested a review from bachp Jun 19, 2020
@Ma27 Ma27 requested a review from nlewo Jun 20, 2020
Enhance the heuristics to make sure that a user doesn't accidentally
upgrade across two major versions of Nextcloud (e.g. from v17 to v19).

The original idea/discussion has been documented in the nixpkgs manual[1].

This includes the following changes:

* `nextcloud19` will be selected automatically when having a stateVersion
  greater or equal than 20.09. For existing setups, the package has to
  be selected manually to avoid accidental upgrades.

* When using `nextcloud18` or older, a warning will be thrown which recommends
  upgrading to `nextcloud19`.

* Added a brief paragraph about `nextcloud19` in the NixOS 19.09 release
  notes.

* Restart `phpfpm` if the Nextcloud-package (`cfg.package`) changes[2].

[1] https://nixos.org/nixos/manual/index.html#module-services-nextcloud-maintainer-info
[2] #89427 (comment)
@Ma27 Ma27 force-pushed the Ma27:nextcloud19 branch from cc454cd to f326e5a Jun 20, 2020
@Ma27 Ma27 requested a review from nlewo Jun 20, 2020
@nlewo
nlewo approved these changes Jun 20, 2020
@nlewo
Copy link
Member

nlewo commented Jun 20, 2020

Thanks!

@nlewo nlewo merged commit 2fd146f into NixOS:master Jun 20, 2020
17 checks passed
17 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f326e5a"; rev="f326e5a35e82574f6f7107bdd607dd703ec37a58"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f326e5a"; rev="f326e5a35e82574f6f7107bdd607dd703ec37a58"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f326e5a"; rev="f326e5a35e82574f6f7107bdd607dd703ec37a58"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f326e5a"; rev="f326e5a35e82574f6f7107bdd607dd703ec37a58"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f326e5a"; rev="f326e5a35e82574f6f7107bdd607dd703ec37a58"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f326e5a"; rev="f326e5a35e82574f6f7107bdd607dd703ec37a58"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="f326e5a"; rev="f326e5a35e82574f6f7107bdd607dd703ec37a58"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
nextcloud19, nextcloud19.passthru.tests on aarch64-linux Success
Details
nextcloud19, nextcloud19.passthru.tests on x86_64-darwin Success
Details
nextcloud19, nextcloud19.passthru.tests on x86_64-linux Success
Details
@Ma27 Ma27 deleted the Ma27:nextcloud19 branch Jun 20, 2020
@Ma27
Copy link
Member Author

Ma27 commented Jun 20, 2020

Ported the addition of nextcloud19 as cdd1ece to stable as documented in https://nixos.org/nixos/manual/index.html#module-services-nextcloud-maintainer-info

The module changes are targeted for 20.09 only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.