garage: remove 0.8, mark 0.9 eol, rename 1.0 (#419392)

This commit is contained in:
Adam C. Stephens 2025-06-28 10:18:34 -04:00 committed by GitHub
commit b0dc55b783
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 37 deletions

View File

@ -7,9 +7,6 @@ The server setup can be automated using
client configured to your local Garage instance is available in
the global environment as `garage-manage`.
The current default by NixOS is `garage_0_8` which is also the latest
major version available.
## General considerations on upgrades {#module-services-garage-upgrade-scenarios}
Garage provides a cookbook documentation on how to upgrade:
@ -21,20 +18,14 @@ Garage has two types of upgrades: patch-level upgrades and minor/major version u
In all cases, you should read the changelog and ideally test the upgrade on a staging cluster.
Checking the health of your cluster can be achieved using `garage-manage repair`.
:::
::: {.warning}
Until 1.0 is released, patch-level upgrades are considered as minor version upgrades.
Minor version upgrades are considered as major version upgrades.
i.e. 0.6 to 0.7 is a major version upgrade.
:::
- **Straightforward upgrades (patch-level upgrades).**
Upgrades must be performed one by one, i.e. for each node, stop it, upgrade it : change [stateVersion](#opt-system.stateVersion) or [services.garage.package](#opt-services.garage.package), restart it if it was not already by switching.
- **Multiple version upgrades.**
Garage do not provide any guarantee on moving more than one major-version forward.
E.g., if you're on `0.7`, you cannot upgrade to `0.9`.
You need to upgrade to `0.8` first.
E.g., if you're on `0.9`, you cannot upgrade to `2.0`.
You need to upgrade to `1.2` first.
As long as [stateVersion](#opt-system.stateVersion) is declared properly,
this is enforced automatically. The module will issue a warning to remind the user to upgrade to latest
Garage *after* that deploy.
@ -51,7 +42,7 @@ Here are some baseline instructions to handle advanced upgrades in Garage, when
- Run `systemctl stop garage` to stop the actual Garage version.
- Backup the metadata folder of ALL your nodes, e.g. for a metadata directory (the default one) in `/var/lib/garage/meta`,
you can run `pushd /var/lib/garage; tar -acf meta-v0.7.tar.zst meta/; popd`.
- Run the offline migration: `nix-shell -p garage_0_8 --run "garage offline-repair --yes"`, this can take some time depending on how many objects are stored in your cluster.
- Run the offline migration: `nix-shell -p garage_1 --run "garage offline-repair --yes"`, this can take some time depending on how many objects are stored in your cluster.
- Bump Garage version in your NixOS configuration, either by changing [stateVersion](#opt-system.stateVersion) or bumping [services.garage.package](#opt-services.garage.package), this should restart Garage automatically.
- Perform `garage-manage repair --all-nodes --yes tables` and `garage-manage repair --all-nodes --yes blocks`.
- Wait for a full table sync to run.
@ -67,8 +58,8 @@ This is inspired from how Nextcloud does it.
While patch-level updates are no problem and can be done directly in the
package-expression (and should be backported to supported stable branches after that),
major-releases should be added in a new attribute (e.g. Garage `v0.8.0`
should be available in `nixpkgs` as `pkgs.garage_0_8_0`).
major-releases should be added in a new attribute (e.g. Garage `v3.0.0`
should be available in `nixpkgs` as `pkgs.garage_3`).
To provide simple upgrade paths it's generally useful to backport those as well to stable
branches. As long as the package-default isn't altered, this won't break existing setups.
After that, the versioning-warning in the `garage`-module should be
@ -83,8 +74,8 @@ packages, but mark them as insecure in an expression like this (in
```nix
/* ... */
{
garage_0_7_3 = generic {
version = "0.7.3";
garage_1_2_0 = generic {
version = "1.2.0";
sha256 = "0000000000000000000000000000000000000000000000000000";
eol = true;
};

View File

@ -102,6 +102,7 @@ let
homepage = "https://garagehq.deuxfleurs.fr";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
adamcstephens
nickcao
_0x4A6F
teutat3s
@ -113,24 +114,12 @@ let
};
in
rec {
# Until Garage hits 1.0, 0.7.3 is equivalent to 7.3.0 for now, therefore
# we have to keep all the numbers in the version to handle major/minor/patch level.
# for <1.0.
# Please add new versions to nixos/tests/garage/default.nix as well.
garage_0_8_7 = generic {
version = "0.8.7";
hash = "sha256-2QGbR6YvMQeMxN3n1MMJ5qfBcEJ5hjXARUOfEn+m4Jc=";
cargoHash = "sha256-NmeAkm35Su4o5JEn75pZmxhVHh+VMwKwULKY0eCVlYo=";
cargoPatches = [ ./update-time-0.8.patch ];
broken = stdenv.hostPlatform.isDarwin;
};
garage_0_9_4 = generic {
version = "0.9.4";
hash = "sha256-2ZaxenwaVGYYUjUJaGgnGpZNQprQV9+Jns2sXM6cowk=";
cargoHash = "sha256-ittesFz1GUGipQecsmMA+GEaVoUY+C9DtEvsO0HFNCc=";
cargoPatches = [ ./update-time.patch ];
eol = true;
};
garage_1_2_0 = generic {
@ -145,14 +134,11 @@ rec {
cargoHash = "sha256-6VM/EesrUIaQOeDGqzb0kOqMz4hW7zBJUnaRQ9C3cqc=";
};
garage_0_8 = garage_0_8_7;
garage_0_9 = garage_0_9_4;
garage_1_x = garage_1_2_0;
garage_1 = garage_1_x;
garage_1 = garage_1_2_0;
garage_2 = garage_2_0_0;
garage = garage_1_x;
garage = garage_1;
}

View File

@ -729,6 +729,9 @@ mapAliases {
g4music = gapless; # Added 2024-07-26
g4py = throw "'g4py' has been renamed to/replaced by 'python3Packages.geant4'"; # Converted to throw 2024-10-17
gamin = throw "'gamin' has been removed as it is unmaintained upstream"; # Added 2024-04-19
garage_0_8 = throw "'garage_0_8' has been removed as it is unmaintained upstream"; # Added 2025-06-23
garage_0_8_7 = throw "'garage_0_8_7' has been removed as it is unmaintained upstream"; # Added 2025-06-23
garage_1_x = lib.warnOnInstantiate "'garage_1_x' has been renamed to 'garage_1'" garage_1; # Added 2025-06-23
gbl = throw "'gbl' has been removed because the upstream repository no longer exists"; # Added 2025-01-26
gcc48 = throw "gcc48 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-10
gcc49 = throw "gcc49 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-11

View File

@ -3013,13 +3013,10 @@ with pkgs;
inherit (callPackages ../tools/filesystems/garage { })
garage
garage_0_8
garage_0_9
garage_0_8_7
garage_0_9_4
garage_1_2_0
garage_1_x
garage_1
garage_2_0_0