From 4eee0541761e177ee21e80a551049a180ad3d2d7 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Mon, 20 Dec 2021 16:17:07 -0500 Subject: [PATCH] Fit the label inside the magic 16 byte limit! mkfs silently truncates "zkapissuer-database" to "zkapissuer-datab" and everything falls apart. --- DEPLOYMENT-NOTES.rst | 2 +- morph/lib/hardware-vagrant.nix | 4 ++-- morph/lib/issuer-aws.nix | 2 +- morph/lib/issuer.nix | 2 +- nixos/modules/issuer.nix | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DEPLOYMENT-NOTES.rst b/DEPLOYMENT-NOTES.rst index 5d8bd469..2a8a5708 100644 --- a/DEPLOYMENT-NOTES.rst +++ b/DEPLOYMENT-NOTES.rst @@ -19,7 +19,7 @@ Deployment notes 3. Create a labeled filesystem on the partition :: - mkfs.ext4 -L zkapissuer-database /dev/nvme1n1p1 + mkfs.ext4 -L zkapissuer-db /dev/nvme1n1p1 4. Deploy the PrivateStorageio update. diff --git a/morph/lib/hardware-vagrant.nix b/morph/lib/hardware-vagrant.nix index 36ecc5b6..6c41af49 100644 --- a/morph/lib/hardware-vagrant.nix +++ b/morph/lib/hardware-vagrant.nix @@ -42,8 +42,8 @@ options = ["bind"]; }; - # XXX This should be handled by the storage module like zkapissuer-database - # is handled by the issuer module. + # XXX This should be handled by the storage module like the zkap + # filesystem above is handled by the issuer module. fileSystems."/storage" = { fsType = "tmpfs"; }; fileSystems."/" = diff --git a/morph/lib/issuer-aws.nix b/morph/lib/issuer-aws.nix index 85070bd9..f9417429 100644 --- a/morph/lib/issuer-aws.nix +++ b/morph/lib/issuer-aws.nix @@ -23,7 +23,7 @@ # PaymentServer voucher database. This makes it easier to manage for # tasks like backup/recovery and encryption. services.private-storage-issuer.databaseFileSystem = { - label = "zkapissuer-database"; + label = "zkapissuer-db"; }; # Clean up packages after a while diff --git a/morph/lib/issuer.nix b/morph/lib/issuer.nix index c4515b37..1216eb32 100644 --- a/morph/lib/issuer.nix +++ b/morph/lib/issuer.nix @@ -55,6 +55,6 @@ in { ristrettoSigningKeyPath = config.deployment.secrets.ristretto-signing-key.destination; stripeSecretKeyPath = config.deployment.secrets.stripe-secret-key.destination; database = "SQLite3"; - databasePath = "${config.fileSystems."zkapissuer-database".mountPoint}/vouchers.sqlite3"; + databasePath = "${config.fileSystems."zkapissuer-db".mountPoint}/vouchers.sqlite3"; }; } diff --git a/nixos/modules/issuer.nix b/nixos/modules/issuer.nix index 82a28622..468170b8 100644 --- a/nixos/modules/issuer.nix +++ b/nixos/modules/issuer.nix @@ -135,7 +135,7 @@ in { in lib.mkIf cfg.enable { # Make sure the voucher database filesystem is mounted. fileSystems = { - "zkapissuer-database" = cfg.databaseFileSystem // { + "zkapissuer-db" = cfg.databaseFileSystem // { mountPoint = "/var/lib/${stateDirectory}"; }; }; -- GitLab