!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

605 Members
NixOS ❤️ systemd173 Servers

Load older messages


SenderMessageTime
15 Oct 2021
@andi:kack.itandi-Also, AFAICT it can't validate a couple of things that are time and cgroup related in the sandbox. So perhaps worth reading the code.12:42:12
@genofire:matrix.sum7.eugenofire
In reply to @andi:kack.it
You can always set extraConfig
Nice hint, i have not recognise this Option. Thanks
12:44:32
@andreas.schraegle:helsinki-systems.deajs124
In reply to @andi:kack.it
You can always set extraConfig
That didn't work in our case. Do you remember exactly why Janne Heß? I think something about where extraConfig is inserted into network or netdev files?
12:47:16
@andi:kack.itandi-Would be interesting to know when that doesn't work. IIRC it is inserted at the end of the unit and should therefore be able to override any other values. Keep in mind that assigning to some systemd values multiple times means adding an item to a list. You might have to reset a value first.12:48:12
@andreas.schraegle:helsinki-systems.deajs124It's apparently because sections in network files can't be duplicated. We needed to insert something in one of the "upper" sections, so appending to the end didn't work.12:49:36
@andi:kack.itandi-That worked for me12:50:00
@andi:kack.itandi-I've been using that for all the new feeatures I added to networkd on older NixOS12:50:14
@andreas.schraegle:helsinki-systems.deajs124🤔 let me check again12:50:24
@andreas.schraegle:helsinki-systems.deajs124 So: assuming that a section cannot be defined twice, which I haven't found a good source for and have not verified, [https://github.com/NixOS/nixpkgs/blob/release-21.05/nixos/modules/system/boot/networkd.nix#L1568] inserts extraConfig all the way at the end.
So if you've defined a network unit with the module and need something in the [Network] section, but are also using some of the declarative options, extraConfig cannot be used.
14:21:33
@andreas.schraegle:helsinki-systems.deajs124 * So: assuming that a section cannot be defined twice, which I haven't found a good source for and have not verified, this inserts extraConfig all the way at the end.
So if you've defined a network unit with the module and need something in the [Network] section, but are also using some of the declarative options, extraConfig cannot be used.
14:21:47
@andi:kack.itandi-why do you say that? It is the same unit logic parsing that is done with regular systemd units. You can have the same section multiple times (e.g. various files) and it'll be merged. A section doesn't really cause any kind of initialization they are just used to group options.14:49:32
@withoutwithin:matrix.orgXe Iaso changed their profile picture.19:14:41
@genofire:matrix.sum7.eugenofire hmm i also miss option to set properties e.g. CPUQuota and MemoryMax -> this could maybe be part of container(ing) by set it at container@NAME.service ;) 22:02:01
@genofire:matrix.sum7.eugenofireor is there any solution?22:02:09
16 Oct 2021
@andi:kack.itandi- services."container@NAME.service".serviceConfig.CPUQuota = "0": ? 11:21:02
@andi:kack.itandi- * systemd.services."container@NAME.service".serviceConfig.CPUQuota = "0": ? 11:21:09
@janne.hess:helsinki-systems.deJanne Heß
In reply to @andi:kack.it
systemd.services."container@NAME.service".serviceConfig.CPUQuota = "0": ?
I don't think you need that .service. Or is that different for insantiated units?
11:22:09
@janne.hess:helsinki-systems.deJanne Heß
In reply to @andi:kack.it
systemd.services."container@NAME.service".serviceConfig.CPUQuota = "0": ?
* I don't think you need that .service. Or is that different for instantiated units?
11:22:30
@andi:kack.itandi-ahh yes ofc11:22:30
@eyjhb:eyjhb.dkeyJhbA annoying thing with netdevs is, that if you remove a netdev config from your configuration, then it will still be active on the server (ie. the device will still be there etc.). Is there a nice way to ensure that if a netdev is removed, it will be destroyed from the server?12:14:08
@andi:kack.itandi-mhm12:14:24
@andi:kack.itandi-networkctl reconfigure doesn't discard it?12:14:33
@andi:kack.itandi-I could see how a restart of networkd wouldnt12:14:43
@andi:kack.itandi-but perhaps it knows it generated it on reconfigure?12:14:55
@janne.hess:helsinki-systems.deJanne Heß ajs124: didn't we have a workaround for that? Or do we just live with the pain? 12:26:50
@eyjhb:eyjhb.dkeyJhb
In reply to @andi:kack.it
networkctl reconfigure doesn't discard it?
Unsure, didn't try that and no longer use the config. As it was quite the pain :/
12:30:32
@eyjhb:eyjhb.dkeyJhb Please do ping me if you had the same issue Janne Heß && ajs124 12:30:49
@eyjhb:eyjhb.dkeyJhbSeems like networking.wireguard is the "better" option for now12:35:18
@andreas.schraegle:helsinki-systems.deajs124don't remember, tbh12:43:09
@eyjhb:eyjhb.dkeyJhb

andi-:

 reload

    Reload .netdev and .network files. If a new .netdev file is found, then the corresponding netdev is created. Note that even if an existing .netdev is modified or removed, systemd-networkd does not update or remove the netdev. If a new, modified or removed .network file is found, then all interfaces which match the file are reconfigured.
15:17:27

Show newer messages


Back to Room ListRoom Version: 6