[systemd-devel] [EXT] The periodic change in MACAddressPolicy in ubuntu 2022

Windl, Ulrich u.windl at ukr.de
Wed Dec 18 09:55:58 UTC 2024


Hi!

There is a tool named monit (https://en.wikipedia.org/wiki/Monit) that can check for changes to files; maybe give it a try. Like this (you’ll have to adjust it):

  check file bootid with path /proc/sys/kernel/random/boot_id
    #if changed timestamp then alert
    if content !=
       "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
    then alert
    if changed checksum then alert
    group local


Kind regards,
Ulrich Windl

From: systemd-devel <systemd-devel-bounces at lists.freedesktop.org> On Behalf Of Choi yenos
Sent: Tuesday, December 17, 2024 1:04 PM
To: systemd-devel at lists.freedesktop.org
Subject: [EXT] [systemd-devel] The periodic change in MACAddressPolicy in ubuntu 2022

HI all, It seems that the MACAddressPolicy is periodically changing or being updated on my Ubuntu 22.04 cluster.

When I create the 22.04 image, I set the file /usr/lib/systemd/network/99-default.link to MACAddressPolicy=none and generate the image.

However, after a certain period of time (24 hours?), the value changes back to MACAddressPolicy=persistent. Strangely, even though the value has changed, the date still points to 2022.

-rw-r--r-- 1 root root 499 Mar 11  2022 /usr/lib/systemd/network/99-default.link
Is there a specific systemd daemon that might be changing this value?

As a solution, I can set the �file with a higher priority, but I am curious about why it is being changed.
----------------
[Match]
OriginalName=*

[Link]
NamePolicy=keep kernel database onboard slot path
AlternativeNamesPolicy=database onboard slot path
MACAddressPolicy=persistent
thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20241218/d8b29be9/attachment.htm>


More information about the systemd-devel mailing list