+15
nixos/doc/manual/from_md/release-notes/rl-2305.section.xml
+15
nixos/doc/manual/from_md/release-notes/rl-2305.section.xml
···
+2
nixos/doc/manual/release-notes/rl-2305.section.md
+2
nixos/doc/manual/release-notes/rl-2305.section.md
···- A new option `recommendedBrotliSettings` has been added to `services.nginx`. Learn more about compression in Brotli format [here](https://github.com/google/ngx_brotli/blob/master/README.md).+- [Garage](https://garagehq.deuxfleurs.fr/) version is based on [system.stateVersion](options.html#opt-system.stateVersion), existing installations will keep using version 0.7. New installations will use version 0.8. In order to upgrade a Garage cluster, please follow [upstream instructions](https://garagehq.deuxfleurs.fr/documentation/cookbook/upgrading/) and force [services.garage.package](options.html#opt-services.garage.package) or upgrade accordingly [system.stateVersion](options.html#opt-system.stateVersion).- Resilio sync secret keys can now be provided using a secrets file at runtime, preventing these secrets from ending up in the Nix store.
+139
nixos/modules/services/web-servers/garage-doc.xml
+139
nixos/modules/services/web-servers/garage-doc.xml
···+<link xlink:href="https://garagehq.deuxfleurs.fr/documentation/cookbook/upgrading/">https://garagehq.deuxfleurs.fr/documentation/cookbook/upgrading/</link>+<para>Garage has two types of upgrades: patch-level upgrades and minor/major version upgrades.</para>+<para>In all cases, you should read the changelog and ideally test the upgrade on a staging cluster.</para>+<para>Checking the health of your cluster can be achieved using <literal>garage-manage repair</literal>.</para>+Upgrades must be performed one by one, i.e. for each node, stop it, upgrade it : change <link linkend="opt-system.stateVersion">stateVersion</link> or <link linkend="opt-services.garage.package">services.garage.package</link>, restart it if it was not already by switching.+this is enforced automatically. The module will issue a warning to remind the user to upgrade to latest+<para>Here are some baseline instructions to handle advanced upgrades in Garage, when in doubt, please refer to upstream instructions.</para>+<listitem><para>Perform <literal>garage-manage repair --all-nodes --yes tables</literal> and <literal>garage-manage repair --all-nodes --yes blocks</literal>.</para></listitem>+<listitem><para>Verify the resulting logs and check that data is synced properly between all nodes.+If you have time, do additional checks (<literal>scrub</literal>, <literal>block_refs</literal>, etc.).</para></listitem>+<listitem><para>Check if queues are empty by <literal>garage-manage stats</literal> or through monitoring tools.</para></listitem>+<listitem><para>Run <literal>systemctl stop garage</literal> to stop the actual Garage version.</para></listitem>+<listitem><para>Backup the metadata folder of ALL your nodes, e.g. for a metadata directory (the default one) in <literal>/var/lib/garage/meta</literal>,+you can run <literal>pushd /var/lib/garage; tar -acf meta-v0.7.tar.zst meta/; popd</literal>.</para></listitem>+<listitem><para>Run the offline migration: <literal>nix-shell -p garage_0_8 --run "garage offline-repair --yes"</literal>, this can take some time depending on how many objects are stored in your cluster.</para></listitem>+<listitem><para>Bump Garage version in your NixOS configuration, either by changing <link linkend="opt-system.stateVersion">stateVersion</link> or bumping <link linkend="opt-services.garage.package">services.garage.package</link>, this should restart Garage automatically.</para></listitem>+<listitem><para>Perform <literal>garage-manage repair --all-nodes --yes tables</literal> and <literal>garage-manage repair --all-nodes --yes blocks</literal>.</para></listitem>
+9
-4
nixos/modules/services/web-servers/garage.nix
+9
-4
nixos/modules/services/web-servers/garage.nix
······+description = lib.mdDoc "Garage package to use, if you are upgrading from a major version, please read NixOS and Garage release notes for upgrade instructions.";
+1
-1
nixos/tests/all-tests.nix
+1
-1
nixos/tests/all-tests.nix
···
+5
-53
nixos/tests/garage.nix
nixos/tests/garage/with-3node-replication.nix
+5
-53
nixos/tests/garage.nix
nixos/tests/garage/with-3node-replication.nix
······assert (node.succeed(f"curl -H 'Host: {url}' http://localhost:3902")).strip() == 'hello world'···
+98
nixos/tests/garage/basic.nix
+98
nixos/tests/garage/basic.nix
···+key_creation_regex = re.compile('Key name: (?P<key_name>.*)\nKey ID: (?P<key_id>.*)\nSecret key: (?P<secret_key>.*)')+return S3Key(key_name=m.group('key_name'), key_id=m.group('key_id'), secret_key=m.group('secret_key'))
+54
nixos/tests/garage/default.nix
+54
nixos/tests/garage/default.nix
···+"basic${toString ver}" = import ./basic.nix { inherit system pkgs; mkNode = mkNode pkgs."garage_${ver}"; };+"with-3node-replication${toString ver}" = import ./with-3node-replication.nix { inherit system pkgs; mkNode = mkNode pkgs."garage_${ver}"; };
+78
-38
pkgs/tools/filesystems/garage/default.nix
+78
-38
pkgs/tools/filesystems/garage/default.nix
···
+5
-2
pkgs/top-level/all-packages.nix
+5
-2
pkgs/top-level/all-packages.nix
···