-
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
[sonic-cfggen] Remove machine.conf info and add get_system_mac support #1397
Conversation
# Try to take old configuration saved during installation | ||
if test_config; then | ||
rm -f /host/old_config/sonic_version.yml | ||
mv -f /host/old_config/* /etc/sonic/ | ||
if [ ! -f /etc/sonic/config_db.json ]; then | ||
sonic-cfggen -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json | ||
sonic-cfggen -H -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need init_cfg.json? here, what if init_cfg.json does not exist? will it have issue here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the catch. Fixed in the 2nd iteration.
Please note that this PR does not intent to make any logic change - I will submit a PR later to remove graph-selecting and config-loading logic from rc.local and unify them in update_graph.
sonic-net#1397) * [201911]Handled both REDIRECT and REDIRECT_ACTION ACL rules in ACL orchagent * Fixed the LGTM failure in test_acl.py script Co-authored-by: Madhan Babu <madhan@arc-build-server.mtr.labs.mlnx>
… naming mode "alias" sonic-net#1397 (sonic-net#1411) #### What I did Added fix for Issue in CLI output alignment with shorter alias names in intf naming mode "alias" #### How I did it Added code to remove last few extra characters from string (-------…) using Slicing & Positive Indexing in python, to match the width to alias's name(not interface)
- What I did
-H
option insonic-cfggen
to read platform info and system mac address intoDEVICE_METADATA
.rc.local
.machine.conf
is no longer included insonic-cfggen
output.