Skip to content

Commit

Permalink
[systemd] disable default systemd udev rules for interfaces (sonic-ne…
Browse files Browse the repository at this point in the history
…t#7369)

Fix sonic-net#7364

99-default.link - was always in SONiC, but previous systemd (<247) had an issue and it did not work due to issue systemd/systemd#3374. Now systemd 247 works.

However, such policy overrides teamd provided mac address which causes teamd netdev to use a random mac
address. Therefore, needs to be disabled.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
  • Loading branch information
stepanblyschak authored and Carl Keene committed Aug 7, 2021
1 parent eda7130 commit 4cbc3c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ sudo cp files/dhcp/90-dhcp6-systcl.conf.j2 $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMP
sudo cp $IMAGE_CONFIGS/interfaces/init_interfaces $FILESYSTEM_ROOT/etc/network/interfaces
sudo mkdir -p $FILESYSTEM_ROOT/etc/network/interfaces.d

# System'd network udev rules
sudo cp $IMAGE_CONFIGS/systemd/network/* $FILESYSTEM_ROOT_ETC/systemd/network/

# copy core file uploader files
sudo cp $IMAGE_CONFIGS/corefile_uploader/core_uploader.service $FILESYSTEM_ROOT_USR_LIB_SYSTEMD_SYSTEM
sudo LANG=C chroot $FILESYSTEM_ROOT systemctl disable core_uploader.service
Expand Down
7 changes: 7 additions & 0 deletions files/image_config/systemd/network/99-default.link
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Match]
OriginalName=*

[Link]
# Override default systemd policy
MACAddressPolicy=none

0 comments on commit 4cbc3c4

Please sign in to comment.