I encountered this problem on Alibaba Cloud instance,OS system is rhel 8.7
Step 1: I have a kvm guest image, the file /etc/udev/rules.d/70-persistent-net.rules linked to /dev/null
[root@rhel8test ~]# ls -al /etc/udev/rules.d/70-persistent-net.rules
lrwxrwxrwx. 1 root root 9 Nov 25 17:12 /etc/udev/rules.d/70-persistent-net.rules -> /dev/null
[root@rhel8test ~]# cloud-init --version
/usr/bin/cloud-init 22.1-5.el8
The purpose of linked to /dev/null to disable this rule and not allow the udevd service to resolve it, and the permissions for /dev/null in kvm image is 666
Step 2: Create an instance with this image
Step 3: After logging in to the instance, I found that the permissions for/dev/null have changed to 644, and there is such a print in the cloud init log
I encountered this problem on Alibaba Cloud instance,OS system is rhel 8.7 rules.d/ 70-persistent- net.rules linked to /dev/null rules.d/ 70-persistent- net.rules rules.d/ 70-persistent- net.rules -> /dev/null
Step 1: I have a kvm guest image, the file /etc/udev/
[root@rhel8test ~]# ls -al /etc/udev/
lrwxrwxrwx. 1 root root 9 Nov 25 17:12 /etc/udev/
[root@rhel8test ~]# cloud-init --version
/usr/bin/cloud-init 22.1-5.el8
The purpose of linked to /dev/null to disable this rule and not allow the udevd service to resolve it, and the permissions for /dev/null in kvm image is 666
Step 2: Create an instance with this image
Step 3: After logging in to the instance, I found that the permissions for/dev/null have changed to 644, and there is such a print in the cloud init log
[root@rhel8test ~]# cat /var/log/ cloud-init. log rules.d/ 70-persistent- net.rules - wb: [644] 96 bytes
...
util.py[DEBUG]: Writing to /etc/udev/
...
so, we expect cloud-init to check this situation before writing udev files when configuring the network.