zulip.{lix.systems,afnix.fr}: init #279
No reviewers
Labels
No labels
Compat/Breaking
Difficulty
Architectural
Difficulty
Easy
Difficulty
Hard
Help Wanted
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Security
Silenced Alert
Status
Abandoned
Status
Blocked
Status
Need More Info
Status
Postponed
Tracking Issue
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: the-distro/infra#279
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "zulip"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is an application of #271.
@ -115,3 +115,3 @@
nixpkgs.overlays = [(self: super: {
prometheus-smartctl-exporter = super.prometheus-smartctl-exporter.overrideAttrs (final: prev: {
patches = (prev.patches or []) ++ [ ./exporters/smartctl-exporter-i305.patch ];
patches = (prev.patches or []) ++ lib.optional (prev.meta.__i305 or false) [ ./exporters/smartctl-exporter-i305.patch ];
this happens due to a double overlaying
WIP: zulip.lix.systems: initto WIP: zulip.{lix.systems,afnix.fr}: initc3c49318f7
toe41694ea3f
WIP: zulip.{lix.systems,afnix.fr}: initto zulip.{lix.systems,afnix.fr}: init@ -93,6 +93,7 @@ let
mkInterface = name:
let
interface = cfg.interfaces.${name};
mkIntfName = { intfName, vmName }: "vm-${substring 0 (11 - stringLength intfName) vmName}-${intfName}";
This seems dangerous to me given that common prefixes seems like a very common case (e.g. superservice01 and superservice02 would both truncate to exactly the same thing).
Yep, I forgot to put a TODO that I'd go for suffixes, @delroth do you have another suggestion? I'd prefer proper altnames here but I think this requires patching microvm.nix.
I don't.
@delroth Are you fine with suffixes?
It's slightly better but it still feels super fragile. Like, we're already one letter off from "lix-zulip01" and "afnix-zulip01" having the same 11 character suffix...
@delroth The easiest way out is to introduce additional evaluation checks to verify that no collision can happen, would that be sufficient for you? It will cost us evaluation time though.
I don't have a strong opinion about how/whether to resolve this.
OK, I will go for a O(n^2) assertion check and suffixes, thanks.
In this case, suffix will fail, but prefixes work (a miracle, we could say).
The prefix calculation is simpler and works, I'm inclined to go back to prefixes for now, leave to assert which catch indesirable events, leave a TODO to move to either altnames AND/OR hashed interface names based on the full VM name.
I suppose you're still fine with it, if not, please object.
I implemented the hostId idea, resolving.
@ -0,0 +153,4 @@
};
};
networking.firewall.allowedTCPPorts = [ 80 443 28464 ];
What's 28464?
It's the port for appservice communication for Matrix servers. We actually don't need it here for AFNix, dropping.
@ -0,0 +1,158 @@
{ pkgs, secretsPath, config, lib, ... }:
I'm confused why "zulip01" is not tenant-prefixed and then we have "afnix-zulip01" which is tenant-prefixed?
Also the file path does not match the commit message (but it does in the next commit in the chain?)
Historical reasons, this can be prefixed.
Same reasons for the filepath stuff.
Actually, this raise an important question to solve.
When renaming VMs, zvols datasets are not following them, our sole identifier is the VM ID which is right now the attribute name in the
vms
attribute set.So, when renaming, the state is busted and created anew, which is fine.
A manual intervention can simply: zfs rename the dataset and it's all good again.
The open question though is when you rename into an existing dataset, this can only happen if the VM for which the dataset existed went away. The current script is safe and will not overwrite the current zvol dataset, but, the VM might run and attach that zvol dataset and the VM itself can start doing things to the pool.
If a VM goes away, its ZFS pool should be renamed to
spiritedaway-$ORIG_NAME
and left to the operator to purge such zvol datasets.Does that make sense?
I implemented the hostId idea, resolving.
e41694ea3f
tofa0554b784
fa0554b784
toca6fe4ef3c
@ -7,3 +4,3 @@
# FIXME(Raito): Please test this and confirm that the route is installed automatically (this requires an hypervisor reboot).
microvm.binScripts.tap-up = ''
${lib.getExe' pkgs.iproute2 "ip"} route replace 57.129.18.76 dev vm-n64gw01-v4 scope link
${lib.getExe' pkgs.iproute2 "ip"} route replace 57.129.18.76 dev vm-b8ac-v4 scope link
the interface name should probably be derived from a helper library
@ -0,0 +1,157 @@
{ pkgs, secretsPath, config, lib, ... }:
Commit message still refers to the old path, I think.
raito referenced this pull request2025-08-27 00:28:40 +00:00
ca6fe4ef3c
toa45a9e1232