-
Notifications
You must be signed in to change notification settings - Fork 1.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
Generate the unique machine-id from mac address #13061
base: master
Are you sure you want to change the base?
Conversation
* Originally, the machine-id is generated randomly during the building process. And will be copied to each device during installing. * After this, the machine-id will be generated according to mac address which is unique for each device. And will be consistent even installing new image.
it is unclear what the machine id is used for, why unique machine id is needed. |
From the man page, https://manpages.ubuntu.com/manpages/kinetic/en/man5/machine-id.5.html |
i cannot agree with on current approach to use mac address and make it consistent across installation. check the machine-id here. https://wiki.debian.org/MachineId
generating machine-id during installation makes sense |
Regarding this page, I think the machine-id should be different for each version SONiC on a device. |
Hi @lguohan
Actually, there is no restriction on the method to generate machine-id and no clear regulation on the life cycle of a machine-id. I think the description in https://wiki.debian.org/MachineId tells you what 'machine-id' is for and when it is generated in general, which can be considered as a guidance but not a regulation. In https://alexforencich.com/wiki/en/linux/nfs_unique_machineid, it describes the way to generate a unique machine id in 'initramfs' stage on the machine that uses NFS as its root file system. What is your concern if we generate the machine-id during 'initramfs' stage instead of on the 'installation' stage? And what is your concern if the machine-id is consistent across installation? Do you have any scenario in your mind that it might cause problems if the machine-id is consistent across installation? |
Hi @lguohan, May I have your comment on the solution for machine-id generation on SONiC? I think it's OK to revise the PR to generate machine-id during the installation stage. What about the part on the content of 'machine-id'? If you think it should not use 'mac address' to generate 'machine-id'? |
Why I did it
How I did it
How to verify it
After the change, the behavior will be:
Which release branch to backport (provide reason below if selected)
This change can fit to any release which using build_debian.sh to build the SONiC image.
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)