Skip to content

Commit

Permalink
[FC-42763] fix multiple trash dirs on one vm
Browse files Browse the repository at this point in the history
Adjust the merging behaviour of the `serviceConfig` option value by
defining the values as lists so that multiple trash directories can be defined per VM.

Previously, multiple definitions would collide when merging since they differ.
Defining the value as a list makes the option's values mergeable in the
indended way.
  • Loading branch information
PhilTaken committed Jan 7, 2025
1 parent 23e316e commit 88888a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fix using multiple DeploymentTrash Component on a single host breaking the Nix rebuild, especially across different deployments to the same machine.
This was because the values for the IOPS read and write Limits in the Systemd serviceConfig attribute set were defined as strings (which cannot be merged unless identical) instead of lists (which can always be merged).
4 changes: 2 additions & 2 deletions src/batou_ext/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ def configure(self):
];
systemd.services."systemd-tmpfiles-clean".serviceConfig = {
IOReadIOPSMax="{{component.trashdir}} {{component.read_iops_limit}}";
IOWriteIOPSMax="{{component.trashdir}} {{component.write_iops_limit}}";
IOReadIOPSMax=["{{component.trashdir}} {{component.read_iops_limit}}"];
IOWriteIOPSMax=["{{component.trashdir}} {{component.write_iops_limit}}"];
};
}
"""
Expand Down

0 comments on commit 88888a2

Please sign in to comment.