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

[orchagent]: Export platform information before orchagent run. #835

Merged
merged 1 commit into from
Jul 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dockers/docker-orchagent/orchagent.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env bash

# Export platform information. Required to be able to write
# vendor specific code.
export platform=`sonic-cfggen -m /etc/sonic/minigraph.xml -v onie_switch_asic`
Copy link
Collaborator

@lguohan lguohan Jul 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use the asic_type? line 7.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has different output:

root@arc-switch1026:/home/admin# sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type
mellanox
root@arc-switch1026:/home/admin# sonic-cfggen -m /etc/sonic/minigraph.xml -v onie_switch_asic
mlnx

Everywere in swss code mlnx is expected.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this change ASAP to be able to run images on MLNX platforms. If it is critical please let me know and I'll change code here and in swss to use asic_type.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @oleksandrivantsiv , Could you create a pull request to switch the code in swss to use mellanox instead? I think that could be a cleaner solution. After that we could clean up code here.


ASIC=`sonic-cfggen -y /etc/sonic/sonic_version.yml -v asic_type`

MAC_ADDRESS=`ip link show eth0 | grep ether | awk '{print $2}'`
Expand Down