-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trace: warning: mdadm: Neither MAILADDR nor PROGRAM has been set. This will cause the mdmon
service to crash.
#254807
Comments
I also noticed this warning, but why do you think I am a maintainer of an affected module or package? :D |
@yu-re-ka oh, apologies. In the history of commits, your name came on the second list, so I thought adding the recent contributors made sense. |
@Ashvith10 are you using software raid? if so, does your /etc/mdadm.conf show any of the two options? does the mdmonitor service run? |
@ctheune I believe that I am not using raid. My configuration file is closest to the default GNOME desktop setup, and with the exception of enabling firewall and using GRUB. Also, |
I am experiencing this as well. I think it is not GRUB-related, as switching to systemd-boot still trigger this warning. |
It's interesting that |
Alternatively, would you mind double checking your |
@ctheune the default value of boot.swraid.enable is |
Hmm. Interesting. That's a weird combination we end up with ... :) I'll think about that. |
@yu-re-ka made the right observation. The options |
I was able to reproduce the error when this option was set to true. Perhaps |
The issue is that it was enabled silently and by default previously (which is a bit weird because that basically means there are lots and lots and lots of systems out there with a non-functional broken unit an "unclean" overall systemd state ... o_O) |
Ooooooooh. Maybe those systems aren't really running with broken systemd states. Would you guys mind checking? I think the complexity of the software raid module working on upstream systemd units and upstream udev rules that poke each other might mean that if it's enabled but not running then it won't ever trigger the monitor unit ... maybe ... Brrrrrrr. This thing is a bit of a nightmare. |
Just noticed this error on a rebuild. Not sure if related, but I run on ZFS root. I see in the docs for this option https://search.nixos.org/options?channel=unstable&show=boot.swraid.enable&from=0&size=50&sort=relevance&type=packages&query=swraid that the logic for defaulting it to Part of the problem is that my (very slightly older) unstable version of NixOS didn't even understand that option and errored, so I basically have to update it and experience potential "unsoundness" just to get to the part where I can configure it to Not sure if the Nix language has something like an "only set this option if it's an understood/defined option" function |
I get this error message when running nixosTest on package where we definitely don't set any raid array. |
Can you share how can we check the same? What should we look for while checking out |
I am quite sure this is what happened:
My suggestion: Add a condition to only show the warning on systems with stateVersion >= 23.11, since we can't assume the users of older systems actually intended to use swraid functionality. |
A link to this issue or a little more text around |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: |
The default just recently changed in 23.11. Users that had swraid enabled implicitly by NixOS in previous releases got surprised by warnings even though they do not actually use software RAID. Fixes NixOS#254807
@pmarreck it's possible, but it's not very pretty. You'd need to inspect the { options, config, ... }: {
config.boot.${if options.boot ? swraid then "swraid" else null} = ...;
} Where we rely on the fact that if the attribute name is null, nix ignores it (as documented in the manual). |
The default just recently changed in 23.11. Users that had swraid enabled implicitly by NixOS in previous releases got surprised by warnings even though they do not actually use software RAID. Fixes #254807
@yu-re-ka can I remove the |
@Ashvith10 the way you phrase it: no. you might break your system by doing that. but also I might be missing context. |
@yu-re-ka I'm still not sure if I understand the new changes well enough: Is |
No, it's not a compulsory option. It's just enabled by default if your The PR that resolves this issue makes it so that the warning only shows if If your configuration's |
@ctheune is it possible to add a parameter that disables the monitor service?
|
The problem with that is that the services are enabled/disabled imperatively and dynamically by the udev rules. To clarify: do you have any swraid volumes in your system? |
Not sure if messing around with the |
We did change the situation so that systems that rely on implicit configuration from older stateVersions will not generate the warning any longer. |
Yes, there is one volume.
For a long time in boot logs I encountered an error when starting mdmonitor. In the end I just turned it off. |
In that case, I'd strongly recommend to actually configure it. It's fine to add a non-sensical email address (nobody@example.com). The dynamic tooling that mdadm does (with a whole suite of pre-defined systemd units and udev rules that interact dynamically) isn't really made to override this from a nixos environment. As its so dynamic we also decided to not re-invent the wheel and try to play continuous catch up with the upstream project by replicating their very intricate work. |
Ok. Just need to add an email address? Or should PROGRAM also be specified? |
One of either is sufficient. I'd use an email if you don't care. |
I have a question about installation-device.nix. how would you suggest to not get the warning all the times? is this something we should fix? is this intentional? For me having this enabled on a installation device make sense, but having this setup to report errors does not. |
Yeah, I'd suggest to add a non-functional example email in that config to silence the warning and get the mdadm working in an installation environment. |
If you don't use raid, then just set |
@ctheune or is setting the |
Not sure whether |
Not sure if I should open a new issue or not, but I found this issue while running into the same thing. That being said, instead of mdadm logging to an email address or a program, you can also make it log to syslog. Annoyingly though, it cannot be configured to do that from mdadm.conf. I had to override the mdmonitor systemd unit file in a roundabout way (couldn't directly override the ExecStart= command, and the unit file was ending up with two because mdadm packages its own services files instead of the nix module creating them. Might still be a better way to do this though):
mdmonitor.service works now, without having MAILADDR or PROGRAM specified, and logs to syslog as expected. Perhaps having an option |
Describe the bug
After updating the unstable channel to the recent version, and trying to run
nixos-rebuild switch
, I get this warning.Steps To Reproduce
Steps to reproduce the behavior:
nixos-rebuild switch
Expected behavior
-
Screenshots
-
Additional context
I am not sure how this trace could affect the working of my current instance.
Notify maintainers
@Ekleog
@arcnmx
@yu-re-ka
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: