Skip to content
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

Merged
merged 3 commits into from
Feb 20, 2018

Conversation

taoyl-ms
Copy link
Contributor

- What I did

  1. Add -H option in sonic-cfggen to read platform info and system mac address into DEVICE_METADATA.
  2. Corresponding logic is removed from rc.local.
  3. Information in machine.conf is no longer included in sonic-cfggen output.
  4. Modify callers to adapt to this change. (This include Adapt to config engine change to load platform info properly sonic-utilities#205.)

# 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
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@taoyl-ms taoyl-ms merged commit 04b6944 into sonic-net:master Feb 20, 2018
abdosi added a commit that referenced this pull request Aug 14, 2020
Ignore IPv6 link-local and multicast entries as Vnet routes (#1401)
[201911]Handled both REDIRECT and REDIRECT_ACTION ACL rules in ACL (#1397)

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request Jan 14, 2021
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>
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this pull request May 10, 2021
… 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants